-
Notifications
You must be signed in to change notification settings - Fork 17
/
landing.html.erb
57 lines (53 loc) · 2.35 KB
/
landing.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html lang="<%= html_lang %>">
<head>
<meta charset="utf-8">
<title><%= @page_title %></title>
<%= yield :head %>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=yes, viewport-fit=cover">
<%- if @theme_id.present? %>
<meta name="discourse_theme_id" content="<%= @theme_id %>">
<%- end %>
<meta name="theme-color" content="#<%= ColorScheme.hex_for_name('header_background', scheme_id) %>">
<%- if SiteSetting.site_favicon_url.present? %>
<link rel="icon" type="image/png" href="<%=SiteSetting.site_favicon_url%>">
<%- end %>
<% site_apple_touch_icon_url = SiteSetting.site_apple_touch_icon_url %>
<%- if site_apple_touch_icon_url.present? %>
<link rel="apple-touch-icon" type="image/png" href="<%= ::UrlHelper.absolute(site_apple_touch_icon_url) %>">
<%- end %>
<%= csrf_meta_tag %>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js" defer="defer"></script>
<%= discourse_stylesheet_link_tag "landing_page", theme_id: nil %>
<%- if @theme_id.present? %>
<%= discourse_color_scheme_stylesheets %>
<%- if @theme_id == 1 %>
<%= discourse_stylesheet_link_tag (mobile_view? ? :mobile : :desktop) %>
<%- end %>
<%= discourse_stylesheet_link_tag (mobile_view? ? :mobile_theme : :desktop_theme), theme_id: @theme_id %>
<%= theme_lookup("head_tag") %>
<%- end %>
</head>
<body class="landing-page <%= @classes %>">
<% if @scripts %>
<% @scripts.each do |script| %>
<script src="<%= script %>"></script>
<% end %>
<% end %>
<%- if @theme_id.present? %>
<%= theme_lookup("header") %>
<%- end %>
<% if @header %>
<%= render partial: "header", locals: @header %>
<% end %>
<%= yield %>
<% if @footer %>
<%= render partial: "footer", locals: @footer %>
<% end %>
<%- if @theme_id.present? %>
<%= theme_lookup("body_tag") %>
<%- end %>
<%= javascript_include_tag "/plugins/discourse-landing-pages/javascripts/common.js", defer: "defer", type: "application/javascript" %>
<%= javascript_include_tag (mobile_view? ? "/plugins/discourse-landing-pages/javascripts/mobile" : "/plugins/discourse-landing-pages/javascripts/desktop.js"), defer: "defer", type: "application/javascript" %>
</body>
</html>