{# SPDX-License-Identifier: CC0-1.0 koszko.org website campaign pages template. Copyright (C) 2021,2022 Wojtek Kosior #} {% extends "__base.html.jinja" %} {% block external_css %} {{ super() }} {% endblock %} {% block style %} {{ super() }} input { display: none; } * { color: #777; } body { min-height: 100vh; display: flex; flex-direction: column; } #main { background-color: white; flex-grow: 1; } /* * Wanted to slightly adjust PureCSS menu styling to my needs and ended up * with a mess :( */ body, .pure-menu { background-color: #eee; } .pure-menu { white-space: normal; position: sticky; top: 0; } .pure-menu-horizontal .pure-menu-item, .pure-menu-horizontal .pure-menu-heading, .pure-menu-horizontal .pure-menu-separator { white-space: nowrap; } .pure-menu-link { cursor: pointer; } .pure-menu-item .pure-menu-link:hover, .pure-menu-item .pure-menu-link:focus, .pure-menu-heading .pure-menu-link:hover, .pure-menu-heading .pure-menu-link:focus { background-color: #ddd; } .pure-menu-disabled .pure-menu-link, .pure-menu-disabled .pure-menu-link:hover, .pure-menu-disabled .pure-menu-link:focus { background-color: transparent; cursor: pointer; } h1, h2 { color: #555; } .content { max-width: 850px; padding: 0px 20px 20px 20px; margin: 0 auto; } .section-anchor { top: -50px; } .hamburger { display: none; position: absolute; right: 0; border-radius: 3px; opacity: 0.7; background-color: #ccc; cursor: pointer; } .hamburger>div { height: 3px; width: 16px; margin: 6px 5px; padding: 0 5px; border-radius: 2px; background-color: #555; } .hide-menu { display: none; text-align: center; padding: 0 0 0 0; height: 30px; border-top: solid 2px #777; background-color: #ccc; color: #777; font-size: 2em; user-select: none; cursor: pointer; } @media (max-width: 600px) { #show-menu:not(:checked)+.hamburger { display: block; position: fixed; } .hide-menu { display: block; } .pure-menu { position: fixed; transition: top 0.2s; } #show-menu:not(:checked)+.hamburger+.pure-menu { top: -160px; } #show-menu:checked+.hamburger+.pure-menu { top: 0; } .pure-menu .pure-menu-list, .pure-menu .pure-menu-item, .pure-menu .pure-menu-heading, .pure-menu .pure-menu-separator { display: block; } .pure-menu { text-align: center; } .section-anchor { top: 0; } } footer { border-top: 1px solid #888; } footer > p { max-width: 850px; padding-left: 10px; padding-right: 10px; margin-left: auto; margin-right: auto; } h1 { text-align: center; } section { border-top: 1px solid #ccc; } section.first-section { border-top: none; } {# The style below is not used right now but is left in case it ever becomes useful again. #} aside { display: inline-block; padding: 10px; border-radius: 4px; background-color: #acf; text-color: #555; } {% endblock %} {% macro menu_item(link_url, text, active, heading=false) %} {% set tag_name = 'span' if heading else 'li' %} {% if heading %} {% set classes = ['pure-menu-heading'] %} {% else %} {% set classes = ['pure-menu-item'] %} {% endif %} {% if active %} {% do classes.append('pure-menu-disabled') %} {% endif %} <{{ tag_name }} class="{{ classes|join(' ') }}"> {% set href = '#' if active else link_url %} {{ text }} {% endmacro %} {% block body %}
{% block main %}
{% block content %} {% endblock %}
{% endblock %}
{% endblock %}