* Removes :runtime_banner feature flag + repositioning * Switch to https://udl.forem.com + fix spec * Fix URL specs * Adds data_update_script to remove feature flag * Fix banner overlay on reactions for small screens + iPad max width * Append -only to Runtime Filter CSS * Add import to fix assets:precompile * Implement design update * Apply suggestions from code review Co-authored-by: Lisa Sy <lisasyis@gmail.com> * Add ; * Trigger Travis Co-authored-by: Lisa Sy <lisasyis@gmail.com>
137 lines
7.4 KiB
Text
137 lines
7.4 KiB
Text
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<% title = yield(:title) %>
|
|
<title><%= title || community_name.to_s %></title>
|
|
<% unless internal_navigation? %>
|
|
<meta name="last-updated" content="<%= Time.current %>">
|
|
<meta name="user-signed-in" content="<%= user_signed_in? %>">
|
|
<meta name="head-cached-at" content="<%= Time.current.to_i %>">
|
|
<% if Settings::General.payment_pointer.present? %>
|
|
<!-- Experimental web monetization payment pointer for micropayments -->
|
|
<!-- It lets readers make micropayments to websites they visit. -->
|
|
<!-- This is step 1: Get live in production to test for platform-wide payment pointer. -->
|
|
<!-- Step 2: Allow authors to set their payment pointer so they can directly monetize their content based on visitors. -->
|
|
<!-- Step 3: Enable further functionality based on what we learn from this experimentation and how the ecosystem evolves. -->
|
|
<meta name="monetization" content="<%= Settings::General.payment_pointer %>">
|
|
<% end %>
|
|
<meta name="environment" content="<%= Rails.env %>">
|
|
<%= render "layouts/styles", qualifier: "main" %>
|
|
<% unless user_signed_in? %>
|
|
<%= javascript_packs_with_chunks_tag "base", "Search", defer: true %>
|
|
<% end %>
|
|
<%= javascript_include_tag "base", defer: true %>
|
|
<% if user_signed_in? %>
|
|
<%= javascript_packs_with_chunks_tag "base", "Search", "onboardingRedirectCheck", "contentDisplayPolicy", defer: true %>
|
|
<% end %>
|
|
<%= yield(:page_meta) %>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
|
|
<%= favicon_link_tag Images::Optimizer.call(Settings::General.favicon_url, width: 32) %>
|
|
<link rel="apple-touch-icon" href="<%= optimized_image_url(Settings::General.logo_png, width: 180, fetch_format: "png") %>">
|
|
<link rel="apple-touch-icon" sizes="152x152" href="<%= optimized_image_url(Settings::General.logo_png, width: 152, fetch_format: "png") %>">
|
|
<link rel="apple-touch-icon" sizes="180x180" href="<%= optimized_image_url(Settings::General.logo_png, width: 180, fetch_format: "png") %>">
|
|
<link rel="apple-touch-icon" sizes="167x167" href="<%= optimized_image_url(Settings::General.logo_png, width: 167, fetch_format: "png") %>">
|
|
<link href="<%= optimized_image_url(Settings::General.logo_png, width: 192, fetch_format: "png") %>" rel="icon" sizes="192x192" />
|
|
<link href="<%= optimized_image_url(Settings::General.logo_png, width: 128, fetch_format: "png") %>" rel="icon" sizes="128x128" />
|
|
<meta name="apple-mobile-web-app-title" content="<%= Settings::General.app_domain %>">
|
|
<meta name="application-name" content="<%= Settings::General.app_domain %>">
|
|
<meta name="theme-color" content="#000000" />
|
|
<link rel="search" href="<%= URL.url("open-search.xml") %>" type="application/opensearchdescription+xml" title="<%= community_name %>" />
|
|
|
|
<meta property="forem:name" content="<%= community_name %>" />
|
|
<meta property="forem:logo" content="<%= optimized_image_url(Settings::General.logo_png, width: 512, fetch_format: "png") %>" />
|
|
<meta property="forem:domain" content="<%= Settings::General.app_domain %>" />
|
|
<% end %>
|
|
</head>
|
|
<% unless internal_navigation? %>
|
|
<% cache(release_adjusted_cache_key("top-html-and-config--#{user_signed_in?}")) do %>
|
|
<body
|
|
data-user-status="<%= user_logged_in_status %>"
|
|
class="<%= Settings::UserExperience.default_font.tr("_", "-") %>-article-body default-header"
|
|
data-pusher-key="<%= ApplicationConfig["PUSHER_KEY"] %>"
|
|
data-app-domain="<%= ChatChannel.urlsafe_encoded_app_domain %>"
|
|
data-honeybadger-key="<%= ApplicationConfig["HONEYBADGER_JS_API_KEY"] %>"
|
|
data-deployed-at="<%= ForemInstance.deployed_at %>"
|
|
data-latest-commit-id="<%= ForemInstance.latest_commit_id %>"
|
|
data-ga-tracking="<%= Settings::General.ga_tracking_id %>">
|
|
<%# Repeat of stylesheets in <head> to fix rendering glitch: https://github.com/forem/forem/issues/12377 %>
|
|
<%= render "layouts/styles", qualifier: "secondary" %>
|
|
<div id="body-styles">
|
|
<style>
|
|
:root {
|
|
--accent-brand: <%= Settings::UserExperience.primary_brand_color_hex %>;
|
|
--accent-brand-darker: <%= Color::CompareHex.new([Settings::UserExperience.primary_brand_color_hex]).brightness(0.85) %>;
|
|
--accent-brand-lighter: <%= Color::CompareHex.new([Settings::UserExperience.primary_brand_color_hex]).brightness(1.1) %>;
|
|
--accent-brand-a10: <%= Color::CompareHex.new([Settings::UserExperience.primary_brand_color_hex]).opacity(0.1) %>;
|
|
}
|
|
</style>
|
|
</div>
|
|
<% if user_signed_in? %>
|
|
<%= render "layouts/user_config" %>
|
|
<% end %>
|
|
<div id="audiocontent" data-podcast="">
|
|
<%= yield(:audio) %>
|
|
</div>
|
|
<%= render "layouts/top_bar" %>
|
|
<div id="active-broadcast" class="broadcast-wrapper"></div>
|
|
<div id="message-notice"></div>
|
|
<div class="app-shell-loader">
|
|
loading...
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|
|
<% if Settings::General.payment_pointer.present? %>
|
|
<div id="base-payment-pointer" data-payment-pointer="<%= Settings::General.payment_pointer %>"></div>
|
|
<% end %>
|
|
<style>.app-shell-loader {display: none;}</style>
|
|
<div id="page-content" class="wrapper <%= view_class %>" data-current-page="<%= current_page %>">
|
|
<% if flash[:global_notice] %>
|
|
<div class="crayons-banner" aria-live="polite">
|
|
<%= flash[:global_notice] %>
|
|
</div>
|
|
<% end %>
|
|
<div id="page-content-inner">
|
|
<% if @hero_html %>
|
|
<div id="hero-html-wrapper" class="overflow-x-hidden" data-name="<%= @hero_area.name %>">
|
|
<script>
|
|
// Make sure html variant element has id hero-html-wrapper and data-name as its name
|
|
if (localStorage.getItem('exited_hero') === '<%= @hero_area.name %>') {
|
|
document.getElementById('hero-html-wrapper').style.display = 'none';
|
|
}
|
|
</script>
|
|
<%= @hero_html.html_safe %>
|
|
</div>
|
|
<% end %>
|
|
<%= yield %>
|
|
<div class="Browser-iOS-only">
|
|
<div class="runtime-banner">
|
|
<a href="<%= URL.deep_link(request.path) %>" target="_blank" class="flex items-center flex-1">
|
|
<%= inline_svg_tag("logo-forem-app.svg", aria_hidden: true, class: "crayons-icon crayons-icon--default", width: 32, height: 32) %>
|
|
<div class="flex flex-col pl-3">
|
|
<span class="">Forem</span>
|
|
<span class="">Open with the Forem app</span>
|
|
</div>
|
|
</a>
|
|
<button type="button" class="runtime-banner__dismiss crayons-btn crayons-btn--ghost crayons-btn--icon crayons-btn--inverted crayons-btn--s">
|
|
<%= inline_svg_tag("x.svg", aria: true, class: "crayons-icon", title: "Dismiss banner: Open with the Forem app") %>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<% unless internal_navigation? %>
|
|
<% cache("footer-and-signup-modal-#{user_signed_in?}-#{ForemInstance.deployed_at}-#{Settings::General.admin_action_taken_at&.rfc3339}", expires_in: 24.hours) do %>
|
|
<%= render "layouts/footer" %>
|
|
<%= render "layouts/signup_modal" unless user_signed_in? %>
|
|
<% end %>
|
|
<% if @shell %>
|
|
<script defer>
|
|
if (!document.title) {
|
|
document.title = document.getElementsByTagName("TITLE")[1].textContent
|
|
}
|
|
</script>
|
|
<% end %>
|
|
</body>
|
|
</html>
|
|
<% end %>
|