mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 13:37:37 +08:00
683b172104
These were originally very similar, but have diverged over time. This makes it very difficult to manage styling. This commit moves the noscript header and footer into partials so they can be reused in both the crawler view and the `<noscript>` view. It also makes browser-update render the noscript content **instead of** the `<section id='main'>`, rather than adding adding the noscript inside the `<section>`. This provides better parity with the server-rendered crawler view.
32 lines
1.4 KiB
Plaintext
32 lines
1.4 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="<%= html_lang %>">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title><%= content_for?(:title) ? yield(:title) : SiteSetting.title %></title>
|
|
<meta name="description" content="<%= @description_meta || SiteSetting.site_description %>">
|
|
<%= render partial: "layouts/head" %>
|
|
<%= render partial: "common/discourse_stylesheet" %>
|
|
<%= theme_lookup("head_tag") %>
|
|
<%= render_google_universal_analytics_code %>
|
|
<%= yield :head %>
|
|
<% if show_browser_update? %>
|
|
<style>.buorg {position:absolute; z-index:111111; width:100%; top:0px; left:0px; background:#FDF2AB; text-align:left; font-family: sans-serif; color:#000; font-size: 14px;} .buorg div {padding: 8px;} .buorg a, .buorg a:visited {color:#E25600; text-decoration: underline;} @media print { .buorg { display: none !important; } }</style>
|
|
<% end %>
|
|
<%= build_plugin_html 'server:before-head-close-crawler' %>
|
|
</head>
|
|
<body class="crawler">
|
|
<%= theme_lookup("header") %>
|
|
<%= render partial: "layouts/noscript_header" %>
|
|
<div id="main-outlet" class="wrap" role="main">
|
|
<%= yield %>
|
|
</div>
|
|
<%= render partial: "layouts/noscript_footer" %>
|
|
<%= theme_lookup("footer") %>
|
|
<%= theme_lookup("body_tag") %>
|
|
<% if show_browser_update? %>
|
|
<div class="buorg"><div><%= I18n.t("js.browser_update").html_safe %></div></div>
|
|
<% end %>
|
|
</body>
|
|
<%= yield :after_body %>
|
|
</html>
|