quitsocialmedia.club/layouts/wrapper.html

49 lines
2.0 KiB
HTML

<!DOCTYPE html>
<html lang='{% case lang %}{% when 'it' %}it{% when 'fr' %}fr{% else %}en{% endcase %}' prefix='og: http://ogp.me/ns#' dir='ltr'>
{% if ref %}
{% for entry in collections.all %}
{% if entry.data.ref == ref and entry.data.lang != lang %}
{% assign alternates = alternates | concat: entry %}
{% endif %}
{% endfor %}
{% endif %}
{% render 'head.html', date: date, updated: updated, title: title, description: description, primary: primary, lang: lang, alternates: alternates, site: site, url: page.url, layout: layout, image: image %}
{% capture source %}{{ site.source }}/src/branch/main{{ page.inputPath | replace: './', '/' }}{% endcapture %}
<body>
<a id='scrollbutton' class='tool' href='#' aria-label='scroll to top' title='scroll to top'>
<svg class='button' viewBox='0 0 24 24' style='background:var(--background)' aria-hidden='true'><path d='M18 15a1 1 0 0 1-.64-.23L12 10.29l-5.37 4.32a1 1 0 0 1-1.41-.15 1 1 0 0 1 .15-1.41l6-4.83a1 1 0 0 1 1.27 0l6 5a1 1 0 0 1 .13 1.41A1 1 0 0 1 18 15z' fill='var(--text)'/></svg>
</a>
{% render 'nav.html', lang: lang, alternates: alternates, site: site %}
{% if tags contains 'draft' or tags contains 'wip' %}
{% render 'draft.html', lang: lang, title: title, source: source %}
{% endif %}
{% if tags contains 'l10n' %}
{% render 'l10n.html', lang: lang, source: source %}
{% endif %}
{{ content }}
{% render 'footer.html', lang: lang %}
<script type='text/javascript'>
scrollbutton = document.getElementById('scrollbutton');
window.onscroll = function() {scroll()};
function scroll() {
if (document.body.scrollTop > 1000 || document.documentElement.scrollTop > 1000) {
scrollbutton.href='#';
scrollbutton.title='scroll to top';
scrollbutton.setAttribute('aria-label', 'scroll to top');
} else {
scrollbutton.href='#0';
scrollbutton.title='scroll to bottom';
scrollbutton.setAttribute('aria-label', 'scroll to bottom');
};
}
</script>
</body>
</html>