162 lines
7.1 KiB
Handlebars
162 lines
7.1 KiB
Handlebars
<!DOCTYPE html>
|
|
<html lang="{{@site.locale}}"{{#match @custom.color_scheme "Dark"}} class="dark-mode"{{else match @custom.color_scheme "Auto"}} class="auto-color"{{/match}}>
|
|
<head>
|
|
|
|
{{!-- Basic meta - advanced meta is output with {ghost_head} below --}}
|
|
<title>{{meta_title}}</title>
|
|
<meta charset="utf-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="HandheldFriendly" content="True" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
{{!-- Theme assets - use the {asset} helper to reference styles & scripts,
|
|
this will take care of caching and cache-busting automatically --}}
|
|
<link rel="stylesheet" type="text/css" href="{{asset "built/screen.css"}}" />
|
|
<link rel="stylesheet" type="text/css" href="{{asset "built/prism.css"}}" />
|
|
<link
|
|
rel="stylesheet"
|
|
href="https://cdnjs.cloudflare.com/ajax/libs/viewerjs/1.11.3/viewer.min.css"
|
|
integrity="sha512-zdX1vpRJc7+VHCUJcExqoI7yuYbSFAbSWxscAoLF0KoUPvMSAK09BaOZ47UFdP4ABSXpevKfcD0MTVxvh0jLHQ=="
|
|
crossorigin="anonymous"
|
|
referrerpolicy="no-referrer" />
|
|
|
|
|
|
{{!-- This tag outputs all your advanced SEO meta, structured data, and other important settings,
|
|
it should always be the last tag before the closing head tag --}}
|
|
{{ghost_head}}
|
|
|
|
</head>
|
|
<body class="{{body_class}} is-head-{{#match @custom.navigation_layout "Logo on cover"}}left-logo{{else match @custom.navigation_layout "Logo in the middle"}}middle-logo{{else}}stacked{{/match}}{{#match @custom.title_font "=" "Elegant serif"}} has-serif-title{{/match}}{{#match @custom.body_font "=" "Modern sans-serif"}} has-sans-body{{/match}}{{#if @custom.show_publication_cover}} has-cover{{/if}}">
|
|
<div class="viewport">
|
|
|
|
<header id="gh-head" class="gh-head outer{{#match @custom.header_style "Hidden"}} is-header-hidden{{/match}}">
|
|
<div class="gh-head-inner inner">
|
|
<div class="gh-head-brand">
|
|
<a class="gh-head-logo{{#unless @site.logo}} no-image{{/unless}}" href="{{@site.url}}">
|
|
{{#if @site.logo}}
|
|
<img src="{{@site.logo}}" alt="{{@site.title}}">
|
|
{{else}}
|
|
{{@site.title}}
|
|
{{/if}}
|
|
</a>
|
|
<button class="gh-search gh-icon-btn" aria-label="Search this site" data-ghost-search>{{> "icons/search"}}</button>
|
|
<button class="gh-burger" aria-label="Main Menu"></button>
|
|
</div>
|
|
|
|
<nav class="gh-head-menu">
|
|
{{navigation}}
|
|
{{#unless @site.members_enabled}}
|
|
{{#match @custom.navigation_layout "Stacked"}}
|
|
<button class="gh-search gh-icon-btn" aria-label="Search this site" data-ghost-search>{{> "icons/search"}}</button>
|
|
{{/match}}
|
|
{{/unless}}
|
|
</nav>
|
|
|
|
<div class="gh-head-actions">
|
|
{{#unless @site.members_enabled}}
|
|
{{^match @custom.navigation_layout "Stacked"}}
|
|
<button class="gh-search gh-icon-btn" aria-label="Search this site" data-ghost-search>{{> "icons/search"}}</button>
|
|
{{/match}}
|
|
{{else}}
|
|
<button class="gh-search gh-icon-btn" aria-label="Search this site" data-ghost-search>{{> "icons/search"}}</button>
|
|
<div class="gh-head-members">
|
|
{{#unless @member}}
|
|
{{#unless @site.members_invite_only}}
|
|
<a class="gh-head-link" href="#/portal/signin" data-portal="signin">Sign in</a>
|
|
<a class="gh-head-button" href="#/portal/signup" data-portal="signup">Subscribe</a>
|
|
{{else}}
|
|
<a class="gh-head-button" href="#/portal/signin" data-portal="signin">Sign in</a>
|
|
{{/unless}}
|
|
{{else}}
|
|
<a class="gh-head-button" href="#/portal/account" data-portal="account">Account</a>
|
|
{{/unless}}
|
|
</div>
|
|
{{/unless}}
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="site-content">
|
|
{{!-- All other templates get inserted here, index.hbs, post.hbs, etc --}}
|
|
{{{body}}}
|
|
</div>
|
|
|
|
{{!-- The global footer at the very bottom of the screen --}}
|
|
<footer class="site-footer outer">
|
|
<div class="inner">
|
|
<section class="copyright"><a href="{{@site.url}}">{{@site.title}}</a> © {{date format="YYYY"}}</section>
|
|
<section class="icon"><a href="/rss/" target="_blank" rel="noopener">{{> "icons/rss" }} RSS Feed</a></section>
|
|
<section class="icon"><a href="https://github.com/mentos1386" target="_blank" rel="noopener">{{> "icons/github" }} Github</a></section>
|
|
<section class="icon"><a href="mailto: me@mnts.dev" target="_blank" rel="noopener">{{> "icons/email" }} Email</a></section>
|
|
<nav class="site-footer-nav">
|
|
{{navigation type="secondary"}}
|
|
</nav>
|
|
<div class="gh-powered-by"><a href="https://ghost.org/" target="_blank" rel="noopener">Powered by Ghost</a></div>
|
|
</div>
|
|
</footer>
|
|
|
|
</div>
|
|
{{!-- /.viewport --}}
|
|
|
|
|
|
{{!-- Scripts - handle member signups, responsive videos, infinite scroll, floating headers, and galleries --}}
|
|
<script
|
|
src="https://code.jquery.com/jquery-3.5.1.min.js"
|
|
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
|
|
crossorigin="anonymous"
|
|
referrerpolicy="no-referrer">
|
|
</script>
|
|
<script
|
|
src="https://cdnjs.cloudflare.com/ajax/libs/viewerjs/1.11.3/viewer.min.js"
|
|
integrity="sha512-f8kZwYACKF8unHuRV7j/5ILZfflRncxHp1f6y/PKuuRpCVgpORNZMne1jrghNzTVlXabUXIg1iJ5PvhuAaau6Q=="
|
|
crossorigin="anonymous"
|
|
referrerpolicy="no-referrer">
|
|
</script>
|
|
<script src="{{asset "built/casper.js"}}"></script>
|
|
<script src="{{asset "built/prism.js"}}"></script>
|
|
<script>
|
|
$(document).ready(function () {
|
|
// Mobile Menu Trigger
|
|
$('.gh-burger').click(function () {
|
|
$('body').toggleClass('gh-head-open');
|
|
});
|
|
// FitVids - Makes video embeds responsive
|
|
$(".gh-content").fitVids();
|
|
});
|
|
|
|
const maxImageWidth = 2000;
|
|
|
|
function getHighestResImg(element) {
|
|
if (element.getAttribute("srcset")) {
|
|
return element
|
|
.getAttribute("srcset")
|
|
.split(",")
|
|
.reduce(
|
|
(acc, item) => {
|
|
let [url, width] = item.trim().split(" ");
|
|
width = parseInt(width);
|
|
if (width > acc.width && width < maxImageWidth) return { width, url };
|
|
return acc;
|
|
},
|
|
{ width: 0, url: "" }
|
|
).url;
|
|
}
|
|
|
|
return element.getAttribute("src");
|
|
}
|
|
|
|
$(document).ready(function () {
|
|
const articles = document.getElementById('site-main').getElementsByClassName('article');
|
|
const viewers = Array.from(articles).map(article => new Viewer(article, {
|
|
toolbar: 0,
|
|
inheritedAttributes: [],
|
|
url: (image) => getHighestResImg(image),
|
|
}));
|
|
});
|
|
</script>
|
|
|
|
{{!-- Ghost outputs required functional scripts with this tag - it should always be the last thing before the closing body tag --}}
|
|
{{ghost_foot}}
|
|
|
|
</body>
|
|
</html>
|