2
0
mirror of https://github.com/offen/website.git synced 2024-10-18 12:10:25 +02:00

clean up templates

This commit is contained in:
Frederik Ring 2020-07-09 13:29:27 +02:00
parent a499a25942
commit eb6e978289
9 changed files with 200 additions and 262 deletions

View File

@ -1,6 +1,5 @@
import os
from datetime import datetime
from calendar import month_name
# If your site is available via HTTPS, make sure SITEURL begins with https://
RELATIVE_URLS = False
@ -10,7 +9,7 @@ PATH = 'content'
TIMEZONE = 'Europe/Berlin'
DEFAULT_LANG = 'en'
BUILD_DATE = '{} {}'.format(month_name[datetime.today().month], datetime.today().year)
BUILD_DATE = datetime.now()
# Feed generation is usually not desired when developing
FEED_ALL_ATOM = None
@ -93,7 +92,7 @@ TWITTER_URL = 'https://twitter.com/hioffen'
RELEASE_DIRECT_URL = 'https://get.offen.dev'
DOCKER_DIRECT_URL = 'https://hub.docker.com/r/offen/offen'
HEROKU_DIRECT_URL = 'https://heroku.com/deploy?template=https://github.com/offen/heroku/tree/master'
OFFEN_AUDITORIUM_URL = 'https://analytics.offen.dev/auditorium'
OFFEN_AUDITORIUM_URL = 'https://analytics.offen.dev/auditorium/'
DOCS_GETSTARTED_URL = 'https://docs.offen.dev/running-offen/'
DOCS_TRYDEMO_URL = 'https://docs.offen.dev/running-offen/test-drive/'

View File

@ -1,41 +0,0 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGNBF56fWkBDACuPCxELUL1m1dfBVHt/tr0BjlUHVaxkxrkPxStGVckUwB4DAZh
LxJykjoSAAyA32g4i7Wcp4KGTZj8sk8kW3GXlT0TiyeAqlFrwZ3+d9ph3QRHx0Dl
8/XesOchIwcfErgn4M0ayvnWTUiVNAf2v8W5PQNbRybUGX8k2gZJoi4IjGU1wS3U
afX0+MyyiOTT18sx2Ac7hWKfNe3oEbsnR5QJLMhHf82XPm12RBAxwPkQIbhIISCN
2fa6SSlHP73MwcnNaKpK7R9Gv+Xbul8M68Xv820ca7+MHqeMrXm5N3VUkfm5/OG7
pPEPeGJSAMzWngF6Vw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VVZ
65w63h2320yqylRdQ8CRaAmHuEQbiguNm3a9mlYc8DyzFhBb9n7m3/i6geZy7rB1
Q8E4uLnfb50ShK96XKZAxImUR463KBo121Q7Xua2eKmjII8k/ryPKwSl9ov8XHSF
iJ7E4H16PHpMIgsZ/ta82VAr4KGprLkOHTCm58D3r2a56Yo4evIA5XU8nYeGVlXj
Py4QJ5p4ugHGCYtlPYdU/EMki4WHYMLhX28H8NtletcNcxM+zJiwcxmZ/CrVVY++
7RAIJw0J1bDqOHrVX1dtNxc8hw3f7sazz1g0k3u+8/Rxa73L03RG1x/lkIKzgQTs
70kZ139t9LAONwARAQABiQG2BBgBCgAgFiEE8g1AdAaMY21YtT9G/WD77ckLjaEF
Al56fWkCGwwACgkQ/WD77ckLjaH48Av/a09bY65khjcQPPSSmSIYf4XcChf73FrM
QoQdrf1FG+PDHJCmIITYbCG2MMUXS/5cMdAryqJjE+J2HlFYOP30YTnMDawIF5lK
4vP1db3nF5XUaPEbMFCtpYVqjkyi68COKRMHZKa683qhg3crtXkni26Lz1h6s0PB
h0YXBa2+7B+FLvWthH4Jd1l/6jszN41mCPT7zeoOxtxsKk0LMsepUtRG73mqmbPC
mHgNDTOCE6YLtEs49J1LQyY336FJOhO/SJe4pKAobuS6FgRk91rE8t8ZTJAvTc9v
RbfvEjkL3NugOWMz9/59ri2hUimPuqw1oz1BkvS1117pgVCJT23veuYy9SrjJpnI
K1RFahi2ewELpLuEd+dQjKtKZqLg6LV/JrEHS0pEVpKoeXE0c+tUEr+iaLzPPzRh
vj1tVJtsscVcdkWzV3gR9eUF15L6p+WHsg71bC0DVHkSpHRdj/2n31RacDtwID0/
QD5ZXSOHR0bcTvyK27lRkr4Hl+UgZKOX
=W9C7
-----END PGP PUBLIC KEY BLOCK-----

View File

@ -5,14 +5,14 @@
{% set href = 'blog/' %}
{% set no_stats = False %}
{% set template = 'archives' %}
{% set cta_1 = 'true' %}
{% set cta_1 = True %}
{% block content %}
{% for article in articles %}
{% if loop.index != 1 %}
<hr class="mb5 b--none">
{% endif %}
<div class="w-100 mt5-ns gray">
<article class="w-100 mt5-ns gray">
<div class="mw7 center pt5 pb5 ph3 ph5-ns bg-white">
<figure class="larger-image mb4">
<a href="{{ article.slug }}">
@ -29,6 +29,6 @@
{{ article.description }} <a href="{{ article.slug }}" class="link b dim gray">Read more</a>
</p>
</div>
</div>
</article>
{% endfor %}
{% endblock %}

View File

@ -4,11 +4,27 @@
{% set description = article.description %}
{% set href = article.save_as.replace('index.html', '') %}
{% set image_url = article.image_url %}
{% set image_caption = article.image_caption %}
{% set no_stats = article.no_stats %}
{% set template = article.template %}
{% set content = article.content %}
{% set date = article.date %}
{% set author = article.author %}
{% set modified = article.modified %}
{% set cta_1 = 'true' %}
{% set cta_1 = True %}
{% block content %}
<main class="w-100 mt5-ns gray">
<div class="mw7 center pb5 bg-white">
<figure class="ma0">
<img alt="{{ title }}" src="{{ image_url }}"/>
{% if article.image_caption %}
<figcaption class="ph3 ph5-ns f7 normal moon-gray">
{{ article.image_caption }}
</figcaption>
{% endif %}
</figure>
<div class="ph3 ph5-ns pt5">
<h6 class="f5 lh-solid normal ma0 light-silver">
{{ article.date | strftime('%d %b %Y') }}{% if article.modified %}(updated {{ article.modified | strftime('%d %b %Y') }}){% endif %}, {{ article.author }}
</h6>
{{ article.content }}
</div>
</div>
</main>
{% endblock %}

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
{% block head %}
<head>
<head>
<title>
{% block title %}{{ title }}{% endblock %}
</title>
@ -30,7 +30,7 @@
{% if OFFEN_ACCOUNT_ID and not no_stats %}
<script async src="https://analytics.offen.dev/script.js" data-account-id="{{ OFFEN_ACCOUNT_ID }}"></script>
{% endif %}
</head>
</head>
{% endblock %}
<body class="{{ template }} f5 rubik lh-copy cclr-fnt-black-mid cclr-bg-black-mid">
<div class="cclr-bg-white-dark">
@ -41,7 +41,7 @@
<a class="link dim" href="/"><img src="/theme/images/offen-icon-white.svg" alt="Offen logo" width="37" height="40" class="logo"></a>
<a class="link dim" href="/"><p class="f25 normal ma0 ml2 white">Offen</p></a>
</div>
{% if funnel != 'true' %}
{% if not funnel %}
<nav>
<div class="nav-mobile"><span id="nav-toggle"><span></span></span></div>
<ul class="nav-list">
@ -72,39 +72,38 @@
</div>
</section>
</div>
{% block content %}
<div class="w-100 mt5-ns gray">
<div class="mw7 center pb5 bg-white">
{% if image_url %}
<figure class="ma0">
<img alt="{{ title }}" src="{{ image_url }}"/>
{% if image_caption %}
<figcaption class="ph3 ph5-ns f7 normal moon-gray">
{{ image_caption }}
</figcaption>
{% endif %}
</figure>
{% endif %}
<div class="ph3 ph5-ns pt5">
{% if date and author %}
<h6 class="f5 lh-solid normal ma0 light-silver">
{{ date | strftime('%d %b %Y') }}{% if modified %}(updated {{ modified | strftime('%d %b %Y') }}){% endif %}, {{ author }}
</h6>
{% endif %}
{{ content }}
</div>
</div>
</div>
{% endblock %}
{% if funnel != 'true' %}
{% block content %}{% endblock %}
<footer>
{% if funnel %}
<footer class="w-100 cclr-bg-mint-mid ph4 pb4">
<div id="bg-pattern">
<div class="flex flex-row-l flex-column w-100-l mw6-m center-m pt4 pb6">
<div class="w-25-l mt3 mr3 cclr-fnt-black-mid">
<p class="ma0">
<a class="b link dim cclr-fnt-black-mid" href="/">Offen</a>
</p>
<p class="ma0">Fair web analytics</p>
</div>
<div class="w-25-l mt3 mr3">
</div>
<div class="w-25-l mt3 mr3">
</div>
<div class="w-25-l mt3 tr-l">
{{ BUILD_DATE | strftime('%B %Y') }}
</div>
</div>
</div>
</div>
{% else %}
{% block outro %}
<div class="w-100 cclr-bg-yellow-mid">
<div class="pt3 pb4 ph3" id="bg-pattern">
<div class="mw8 center">
<div class="flex flex-wrap justify-center tc pt3">
{% if cta_2 != 'true' %}
{% if cta_1 %}
<div class="wx24 ph4-ns pt4 pb5 cclr-bg-yellow-mid">
<h2 class="f25 normal lh-solid ma0 mb3">
Participate
@ -116,7 +115,7 @@
</div>
{% endif %}
{% if cta_1 != 'true' %}
{% if cta_2 %}
<div class="wx24 ph4-ns pt4 pb5 cclr-bg-yellow-mid">
<h2 class="f25 normal lh-solid ma0 mb3">
In the making
@ -143,8 +142,6 @@
</div>
</div>
{% endblock %}
{% endif %}
{% if funnel != 'true' %}
<div class="w-100 cclr-bg-black-mid gray ph4 pb4">
<div class="flex flex-row-l flex-column w-100-l mw6-m center-m pt4 pb6">
<div class="w-25-l mt3 mr3 cclr-fnt-yellow-mid">
@ -185,38 +182,17 @@
</p>
</div>
<div class="w-25-l mt3 tr-l">
{{ BUILD_DATE }}
{{ BUILD_DATE | strftime('%B %Y') }}
</div>
</div>
</div>
{% else %}
<div class="w-100 cclr-bg-mint-mid ph4 pb4">
<div id="bg-pattern">
<div class="flex flex-row-l flex-column w-100-l mw6-m center-m pt4 pb6">
<div class="w-25-l mt3 mr3 cclr-fnt-black-mid">
<p class="ma0">
<a class="b link dim cclr-fnt-black-mid" href="/">Offen</a>
</p>
<p class="ma0">Fair web analytics</p>
</div>
<div class="w-25-l mt3 mr3">
</div>
<div class="w-25-l mt3 mr3">
</div>
<div class="w-25-l mt3 tr-l">
{{ BUILD_DATE }}
</div>
</div>
</div>
</div>
{% endif %}
</footer>
</div>
{% block scripts %}
{% assets filters="rjsmin", output="scripts/packed.js", "scripts/jquery-3.4.1.min.js", "scripts/menu.js", "scripts/fade.js", "scripts/clipboard.min.js", "scripts/click-to-copy.js" %}
<script src="/{{ ASSET_URL }}"></script>
{% endassets %}
{% endblock %}
</body>
</body>
</html>

View File

@ -1,5 +1,5 @@
{% extends "page.html" %}
{% set funnel = 'true' %}
{% set funnel = True %}
{% block content %}
<div class="w-100 mt5-ns cclr-bg-white-dark">

View File

@ -639,34 +639,14 @@
</svg>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@ -703,5 +683,4 @@
{% endblock %}
{% block outro %}
{% endblock %}
{% block outro %}{% endblock %}

View File

@ -6,5 +6,14 @@
{% set image_url = page.image_url %}
{% set no_stats = page.no_stats %}
{% set template = page.template %}
{% set content = page.content %}
{% set cta_2 = 'true' %}
{% set cta_2 = True %}
{% block content %}
<main class="w-100 mt5-ns gray">
<div class="mw7 center pb5 bg-white">
<div class="ph3 ph5-ns pt5">
{{ page.content }}
</div>
</div>
</main>
{% endblock %}

View File

@ -1,5 +1,5 @@
{% extends "page.html" %}
{% set funnel = 'true' %}
{% set funnel = True %}
{% block content %}
<div class="w-100 mt5-ns cclr-bg-white-dark">