docbrown/app/views/shell/_top.html.erb
Ben Halpern 630c1b7425
Migrate to streaming app shell via serviceworkers (#5020) [deploy]
* Initial work for streaming app shell way of using serviceworkers

* Close in on serviceworker adjustment finalization

* Add docs and loading indicator

* Remove useless code

* Don't run on API

* Update app/javascript/contentDisplayPolicy/hideBlockedContent.js

* Fix small details

* Don't run serviceworker.js code in test env

* Fix JS in serviceworker

* Move private keyword to proper place in async controller

* Change shell_version to HEROKU_SLUG_COMMIT

* Update caching config

* Add test for async_info/shell_version
2019-12-16 12:21:33 -05:00

75 lines
No EOL
3.3 KiB
Text

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<% title = yield(:title) %>
<title><%= title || "#{ApplicationConfig['COMMUNITY_NAME']} Community" %></title>
<% unless internal_navigation? %>
<meta name="last-updated" content="<%= Time.current %>">
<meta name="user-signed-in" content="<%= user_signed_in? %>">
<meta name="algolia-public-id" content="<%= ApplicationConfig["ALGOLIASEARCH_APPLICATION_ID"] %>">
<meta name="algolia-public-key" content="<%= ALGOLIASEARCH_PUBLIC_SEARCH_ONLY_KEY %>">
<meta name="environment" content="<%= Rails.env %>">
<%= render "layouts/styles" %>
<style>
.home {
overflow: hidden;
position: relative;
text-align: center;
min-height: 440px;
margin: auto;
max-width: 1250px;
}
@media screen and (min-width: 950px) {
.home {
margin-top: 26px;
}
}
</style>
<%= javascript_pack_tag "manifest", defer: true %>
<%= javascript_pack_tag "vendor", defer: true %>
<%= javascript_pack_tag "Search", defer: true %>
<%= javascript_include_tag "base", defer: true %>
<% if user_signed_in? %>
<%= javascript_pack_tag "onboardingRedirectCheck", defer: true %>
<%= javascript_pack_tag "contentDisplayPolicy", defer: true %>
<% end %>
<%= yield(:page_meta) %>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<%= favicon_link_tag ApplicationConfig["FAVICON_URL"] %>
<link rel="apple-touch-icon" href="<%= asset_path "apple-icon.png" %>">
<link rel="apple-touch-icon" sizes="152x152" href="<%= asset_path "apple-icon-152x152.png" %>">
<link rel="apple-touch-icon" sizes="180x180" href="<%= asset_path "apple-icon-180x180.png" %>">
<link rel="apple-touch-icon" sizes="167x167" href="<%= asset_path "apple-icon-167x167.png" %>">
<link href="<%= asset_path "android-icon-192x192.png" %>" rel="icon" sizes="192x192" />
<link href="<%= asset_path "android-icon-128x128.png" %>" rel="icon" sizes="128x128" />
<meta name="apple-mobile-web-app-title" content="dev.to">
<meta name="application-name" content="dev.to">
<meta property="fb:pages" content="568966383279687" />
<meta name="theme-color" content="#000000" />
<% if view_class.include? "users-signout_confirm" %>
<%= csrf_meta_tags %>
<% end %>
<link rel="manifest" href="/manifest.json" />
<link rel="search" href="https://dev.to/search.xml" type="application/opensearchdescription+xml" title="<%= community_qualified_name %>" />
<% end %>
</head>
<% unless internal_navigation? %>
<body data-user-status="<%= user_logged_in_status %>" data-pusher-key="<%= ApplicationConfig["PUSHER_KEY"] %>">
<div id="body-styles"></div>
<% if user_signed_in? %>
<%= render "layouts/user_config" %>
<% end %>
<div id="audiocontent">
<%= yield(:audio) %>
</div>
<% cache("application-top-bar--#{user_signed_in?}", expires_in: 100.hours) do %>
<%= render "layouts/top_bar" %>
<% end %>
<div id="message-notice"></div>
<div class="app-shell-loader">
loading...
</div>
<!-- End Top Shell -->
<% end %>