diff --git a/app/views/layouts/_head.html.erb b/app/views/layouts/_head.html.erb new file mode 100644 index 00000000000..1ff73291e86 --- /dev/null +++ b/app/views/layouts/_head.html.erb @@ -0,0 +1,14 @@ + + + + + + + + + <%= canonical_link_tag %> + + <%= render partial: "common/special_font_face" %> + <%= render partial: "common/discourse_stylesheet" %> + + <%= discourse_csrf_tags %> \ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index e5668394a64..8dd46d9b66d 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -3,19 +3,13 @@ <%= content_for?(:title) ? yield(:title) + ' - ' + SiteSetting.title : SiteSetting.title %> - - - + + <%= render partial: "layouts/head" %> <%- if SiteSetting.enable_escaped_fragments? %> <%- end %> - <%= canonical_link_tag %> - - - - <%= script "preload_store" %> <%= javascript_include_tag "locales/#{I18n.locale}" %> <%= script "vendor" %> @@ -24,11 +18,6 @@ <%= script "admin"%> <%- end %> - <%= render :partial => "common/special_font_face" %> - <%= render :partial => "common/discourse_stylesheet" %> - - <%= discourse_csrf_tags %> - <%= raw SiteContent.content_for(:head) %> <%= render_google_universal_analytics_code %> @@ -92,8 +81,5 @@ <%= render :partial => "common/discourse_javascript" %> <%= render_google_analytics_code %> - - - diff --git a/app/views/layouts/crawler.html.erb b/app/views/layouts/crawler.html.erb index c1c4475f051..c11d73a075f 100644 --- a/app/views/layouts/crawler.html.erb +++ b/app/views/layouts/crawler.html.erb @@ -3,18 +3,8 @@ <%= content_for?(:title) ? yield(:title) + ' - ' + SiteSetting.title : SiteSetting.title %> - - - - - <%= canonical_link_tag %> - - - - - <%= render :partial => "common/special_font_face" %> - <%= render :partial => "common/discourse_stylesheet" %> - <%= discourse_csrf_tags %> + + <%= render partial: "layouts/head" %> <%= raw SiteContent.content_for(:head) %> <%= yield :head %> diff --git a/app/views/layouts/no_js.html.erb b/app/views/layouts/no_js.html.erb index bb9a232d7ac..3d6dc48aca2 100644 --- a/app/views/layouts/no_js.html.erb +++ b/app/views/layouts/no_js.html.erb @@ -3,13 +3,8 @@ <%=SiteSetting.title%> - - - - > - <%= render :partial => "common/special_font_face" %> - <%= render :partial => "common/discourse_stylesheet" %> - <%= discourse_csrf_tags %> + + <%= render partial: "layouts/head" %> <%= raw SiteContent.content_for(:head) %>