* Allow admins to set brand color * Remove extra line * Fix linting * Update app/controllers/admin/configs_controller.rb Co-authored-by: Michael Kohl <citizen428@dev.to> * Move wcag compare to own class * Remove unnecessary spacing Co-authored-by: Michael Kohl <citizen428@dev.to>
82 lines
4.4 KiB
Text
82 lines
4.4 KiB
Text
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<% title = yield(:title) %>
|
|
<title><%= title || community_qualified_name.to_s %></title>
|
|
<% unless internal_navigation? %>
|
|
<meta name="last-updated" content="<%= Time.current %>">
|
|
<meta name="user-signed-in" content="<%= user_signed_in? %>">
|
|
<% if SiteConfig.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="<%= SiteConfig.payment_pointer %>">
|
|
<% end %>
|
|
<meta name="environment" content="<%= Rails.env %>">
|
|
<%= render "layouts/styles" %>
|
|
<style>
|
|
.home {
|
|
position: relative;
|
|
margin: auto;
|
|
max-width: 1250px;
|
|
}
|
|
</style>
|
|
<% unless user_signed_in? %>
|
|
<%= javascript_packs_with_chunks_tag "Search", defer: true %>
|
|
<% end %>
|
|
<%= javascript_include_tag "base", defer: true %>
|
|
<% if user_signed_in? %>
|
|
<%= javascript_packs_with_chunks_tag "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 SiteConfig.favicon_url %>
|
|
<link rel="apple-touch-icon" href="<%= optimized_image_url(SiteConfig.logo_png, width: 180, fetch_format: "png") %>">
|
|
<link rel="apple-touch-icon" sizes="152x152" href="<%= optimized_image_url(SiteConfig.logo_png, width: 152, fetch_format: "png") %>">
|
|
<link rel="apple-touch-icon" sizes="180x180" href="<%= optimized_image_url(SiteConfig.logo_png, width: 180, fetch_format: "png") %>">
|
|
<link rel="apple-touch-icon" sizes="167x167" href="<%= optimized_image_url(SiteConfig.logo_png, width: 167, fetch_format: "png") %>">
|
|
<link href="<%= optimized_image_url(SiteConfig.logo_png, width: 192, fetch_format: "png") %>" rel="icon" sizes="192x192" />
|
|
<link href="<%= optimized_image_url(SiteConfig.logo_png, width: 128, fetch_format: "png") %>" rel="icon" sizes="128x128" />
|
|
<meta name="apple-mobile-web-app-title" content="<%= ApplicationConfig["APP_DOMAIN"] %>">
|
|
<meta name="application-name" content="<%= ApplicationConfig["APP_DOMAIN"] %>">
|
|
<meta property="fb:pages" content="568966383279687" />
|
|
<meta name="theme-color" content="#000000" />
|
|
<link rel="manifest" href="/manifest.json" />
|
|
<link rel="search" href="<%= asset_path("search.xml") %>" type="application/opensearchdescription+xml" title="<%= community_qualified_name %>" />
|
|
<% 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="<%= SiteConfig.default_font.tr("_", "-") %>-article-body"
|
|
data-pusher-key="<%= ApplicationConfig["PUSHER_KEY"] %>"
|
|
data-app-name="<%= ApplicationConfig["APP_NAME"] %>">
|
|
<div id="body-styles">
|
|
<style>
|
|
:root {
|
|
--accent-brand: <%= SiteConfig.primary_brand_color_hex %>;
|
|
--accent-brand-darker: <%= HexComparer.new([SiteConfig.primary_brand_color_hex]).brightness(0.85) %>;
|
|
--accent-brand-lighter: <%= HexComparer.new([SiteConfig.primary_brand_color_hex]).brightness(1.1) %>;
|
|
--accent-brand-a10: #{rgba(<%= SiteConfig.primary_brand_color_hex %>, 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 Top Shell -->
|
|
<% end %>
|