mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 10:58:31 -05:00
Our JS includes belong at the top of the file, that way we can start
downloading and parsing them earlier and not wait for the rest of the page Our noscript stuff belongs at the bottom, we should not hold off any js work while noscript is downloading
This commit is contained in:
parent
5b08f73561
commit
c9321cae7f
2 changed files with 24 additions and 24 deletions
|
@ -15,12 +15,6 @@
|
|||
})();
|
||||
</script>
|
||||
|
||||
<%# load the selected locale before any other scripts %>
|
||||
<%= javascript_include_tag "locales/#{I18n.locale}" %>
|
||||
<%= javascript_include_tag "application" %>
|
||||
<%- if staff? %>
|
||||
<%= javascript_include_tag "admin"%>
|
||||
<%- end %>
|
||||
|
||||
<script>
|
||||
Discourse.CDN = '<%= Rails.configuration.action_controller.asset_host %>';
|
||||
|
|
|
@ -13,6 +13,12 @@
|
|||
<link rel="apple-touch-icon" type="image/png" href="<%=SiteSetting.apple_touch_icon_url%>">
|
||||
<%= javascript_include_tag "preload_store" %>
|
||||
|
||||
<%= javascript_include_tag "locales/#{I18n.locale}" %>
|
||||
<%= javascript_include_tag "application" %>
|
||||
<%- if staff? %>
|
||||
<%= javascript_include_tag "admin"%>
|
||||
<%- end %>
|
||||
|
||||
<%= render :partial => "common/special_font_face" %>
|
||||
<%= render :partial => "common/discourse_stylesheet" %>
|
||||
|
||||
|
@ -26,24 +32,6 @@
|
|||
|
||||
<%=SiteCustomization.custom_header(session[:preview_style])%>
|
||||
<section id='main'>
|
||||
<noscript data-path="<%= request.env['PATH_INFO'] %>">
|
||||
<header class="d-header">
|
||||
<div class="container">
|
||||
<div class="contents">
|
||||
<div class="row">
|
||||
<div class="title span13">
|
||||
<a href="/"><img src="<%=SiteSetting.logo_url%>" alt="<%=SiteSetting.title%>" id="site-logo"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div id="main-outlet" class="container">
|
||||
<!-- preload-content: -->
|
||||
<%= yield %>
|
||||
<!-- :preload-content -->
|
||||
</div>
|
||||
</noscript>
|
||||
</section>
|
||||
|
||||
<% unless current_user %>
|
||||
|
@ -70,6 +58,24 @@
|
|||
<%= render :partial => "common/discourse_javascript" %>
|
||||
<%= render_google_analytics_code %>
|
||||
|
||||
<noscript data-path="<%= request.env['PATH_INFO'] %>">
|
||||
<header class="d-header">
|
||||
<div class="container">
|
||||
<div class="contents">
|
||||
<div class="row">
|
||||
<div class="title span13">
|
||||
<a href="/"><img src="<%=SiteSetting.logo_url%>" alt="<%=SiteSetting.title%>" id="site-logo"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div id="main-outlet" class="container">
|
||||
<!-- preload-content: -->
|
||||
<%= yield %>
|
||||
<!-- :preload-content -->
|
||||
</div>
|
||||
</noscript>
|
||||
<!-- Discourse Version: <%= Discourse::VERSION::STRING %> -->
|
||||
<!-- Git Version: <%= Discourse.git_version %> -->
|
||||
</body>
|
||||
|
|
Loading…
Reference in a new issue