From eb6e97828988a3236735a7eec9ea291328c83b65 Mon Sep 17 00:00:00 2001 From: Frederik Ring Date: Thu, 9 Jul 2020 13:29:27 +0200 Subject: [PATCH] clean up templates --- homepage/pelicanconf.py | 5 +- ...0D4074068C636D58B53F46FD60FBEDC90B8DA1.asc | 41 --- homepage/theme/templates/archives.html | 8 +- homepage/theme/templates/article.html | 28 +- homepage/theme/templates/base.html | 340 ++++++++---------- homepage/theme/templates/getstarted.html | 2 +- homepage/theme/templates/index.html | 23 +- homepage/theme/templates/page.html | 13 +- homepage/theme/templates/trydemo.html | 2 +- 9 files changed, 200 insertions(+), 262 deletions(-) delete mode 100644 homepage/theme/static/F20D4074068C636D58B53F46FD60FBEDC90B8DA1.asc diff --git a/homepage/pelicanconf.py b/homepage/pelicanconf.py index 2bf1a2b..af3e343 100644 --- a/homepage/pelicanconf.py +++ b/homepage/pelicanconf.py @@ -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/' diff --git a/homepage/theme/static/F20D4074068C636D58B53F46FD60FBEDC90B8DA1.asc b/homepage/theme/static/F20D4074068C636D58B53F46FD60FBEDC90B8DA1.asc deleted file mode 100644 index 4505d3d..0000000 --- a/homepage/theme/static/F20D4074068C636D58B53F46FD60FBEDC90B8DA1.asc +++ /dev/null @@ -1,41 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -mQGNBF56fWkBDACuPCxELUL1m1dfBVHt/tr0BjlUHVaxkxrkPxStGVckUwB4DAZh -LxJykjoSAAyA32g4i7Wcp4KGTZj8sk8kW3GXlT0TiyeAqlFrwZ3+d9ph3QRHx0Dl -8/XesOchIwcfErgn4M0ayvnWTUiVNAf2v8W5PQNbRybUGX8k2gZJoi4IjGU1wS3U -afX0+MyyiOTT18sx2Ac7hWKfNe3oEbsnR5QJLMhHf82XPm12RBAxwPkQIbhIISCN -2fa6SSlHP73MwcnNaKpK7R9Gv+Xbul8M68Xv820ca7+MHqeMrXm5N3VUkfm5/OG7 -pPEPeGJSAMzWngF6VwIZPh89iucbUjX68NtG1ePxhtARGeaNXC0YhFAsFJbjUMus -IFb6wJoV9focDrqaXQygDvp/xGybHLZlOPv9kjbzEgWikXnMixmBpPbrPyVG829a -2LAiKHkND4dr8cKQixJmvFLUSw7V2DkJTaVE8ioPDBcCyr+u5txSmYfPyfrLHS2w -ILkRzaalspF55+kAEQEAAbQsT2ZmZW4gKFNpZ25pbmcgQmluYXJpZXMpIDxoaW9m -ZmVuQHBvc3Rlby5kZT6JAc4EEwEKADgWIQTyDUB0BoxjbVi1P0b9YPvtyQuNoQUC -Xnp9aQIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRD9YPvtyQuNobnIDACS -zUOZot/2wtaaGDmclKzF4dXVcNQvJiM4k1bXpjHEDEJqvaWnB8Pw97YEreAg9g51 -SXppwm/x1mi6EmDV5L9QyiVrWeqrNp+L+/4yJuAGUPhGp9VTbJ10TLaR3MOhwqSj -ovdEjHFTCymSRGVQrM4+52BVBt90mrHsXGGGPfllTcgaAkM0oDS3HtssRXk4XKzt -IgZ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z1h6s0PB -h0YXBa2+7B+FLvWthH4Jd1l/6jszN41mCPT7zeoOxtxsKk0LMsepUtRG73mqmbPC -mHgNDTOCE6YLtEs49J1LQyY336FJOhO/SJe4pKAobuS6FgRk91rE8t8ZTJAvTc9v -RbfvEjkL3NugOWMz9/59ri2hUimPuqw1oz1BkvS1117pgVCJT23veuYy9SrjJpnI -K1RFahi2ewELpLuEd+dQjKtKZqLg6LV/JrEHS0pEVpKoeXE0c+tUEr+iaLzPPzRh -vj1tVJtsscVcdkWzV3gR9eUF15L6p+WHsg71bC0DVHkSpHRdj/2n31RacDtwID0/ -QD5ZXSOHR0bcTvyK27lRkr4Hl+UgZKOX -=W9C7 ------END PGP PUBLIC KEY BLOCK----- diff --git a/homepage/theme/templates/archives.html b/homepage/theme/templates/archives.html index d4ba851..9f2ba19 100644 --- a/homepage/theme/templates/archives.html +++ b/homepage/theme/templates/archives.html @@ -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 %} + {% for article in articles %} {% if loop.index != 1 %}
{% endif %} -
+
+ {% endfor %} {% endblock %} diff --git a/homepage/theme/templates/article.html b/homepage/theme/templates/article.html index 14a3715..366516e 100644 --- a/homepage/theme/templates/article.html +++ b/homepage/theme/templates/article.html @@ -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 %} +
+
+
+ {{ title }} + {% if article.image_caption %} +
+ {{ article.image_caption }} +
+ {% endif %} +
+
+
+ {{ article.date | strftime('%d %b %Y') }}{% if article.modified %}(updated {{ article.modified | strftime('%d %b %Y') }}){% endif %}, {{ article.author }} +
+ {{ article.content }} +
+
+
+{% endblock %} diff --git a/homepage/theme/templates/base.html b/homepage/theme/templates/base.html index 484eba4..b2bc2de 100644 --- a/homepage/theme/templates/base.html +++ b/homepage/theme/templates/base.html @@ -1,36 +1,36 @@ {% block head %} - - - {% block title %}{{ title }}{% endblock %} - - - - - - - - - - - - - - - {% if template != 'archives' %} - - {% endif %} - - {% assets filters="postcss", output="css/style.min.css", "css/tachyons.min.css", "css/fix.css", "css/fonts.css" %} - - {% endassets %} - - - {% if OFFEN_ACCOUNT_ID and not no_stats %} - - {% endif %} - + + + {% block title %}{{ title }}{% endblock %} + + + + + + + + + + + + + + + {% if template != 'archives' %} + + {% endif %} + + {% assets filters="postcss", output="css/style.min.css", "css/tachyons.min.css", "css/fix.css", "css/fonts.css" %} + + {% endassets %} + + + {% if OFFEN_ACCOUNT_ID and not no_stats %} + + {% endif %} + {% endblock %}
@@ -41,182 +41,158 @@

Offen

- {% if funnel != 'true' %} - + {% if not funnel %} + {% endif %} - {% block content %} -
-
- {% if image_url %} -
- {{ title }} - {% if image_caption %} -
- {{ image_caption }} -
- {% endif %} -
- {% endif %} -
- {% if date and author %} -
- {{ date | strftime('%d %b %Y') }}{% if modified %}(updated {{ modified | strftime('%d %b %Y') }}){% endif %}, {{ author }} -
- {% endif %} - {{ content }} -
-
-
- {% endblock %} - {% if funnel != 'true' %} - {% block outro %} -
-
-
-
- - {% if cta_2 != 'true' %} -
-

- Participate -

-

- Audit our open source code and feel free to make a contribution. -

- Get involved -
- {% endif %} - - {% if cta_1 != 'true' %} -
-

- In the making -

-

- Discover what is already up and running and where we want to go. -

- Open blog -
- {% endif %} - -
-

- Ethical internet -

-

- Help to ensure that Offen is independent and can be sustained. -

- Support us -
+ {% block content %}{% endblock %} +
+ {% if funnel %} +
+
+
+
+

+ Offen +

+

Fair web analytics

+
+
+
+
+
+
+ {{ BUILD_DATE | strftime('%B %Y') }}
- {% endblock %} - {% endif %} - {% if funnel != 'true' %} -
-
-
-

- Offen -

-

Fair web analytics

-
-
-

- {{CONTACT_EMAIL}} -

-

- PGP Key -

-

- Blog -

-

- Docs -

-

- GitHub -

-
-
-

- Patreon -

-

- LinkedIn -

-

- Twitter -

-

- Legal Notice -

-
-
- {{ BUILD_DATE }} -
-
-
{% else %} -
-
+ {% block outro %} +
+
+
+
+ {% if cta_1 %} +
+

+ Participate +

+

+ Audit our open source code and feel free to make a contribution. +

+ Get involved +
+ {% endif %} + + {% if cta_2 %} +
+

+ In the making +

+

+ Discover what is already up and running and where we want to go. +

+ Open blog +
+ {% endif %} + +
+

+ Ethical internet +

+

+ Help to ensure that Offen is independent and can be sustained. +

+ Support us +
+ +
+
+
+
+ {% endblock %} +
-
+

- Offen + Offen

Fair web analytics

+

+ {{CONTACT_EMAIL}} +

+

+ PGP Key +

+

+ Blog +

+

+ Docs +

+

+ GitHub +

+

+ Patreon +

+

+ LinkedIn +

+

+ Twitter +

+

+ Legal Notice +

- {{ BUILD_DATE }} + {{ BUILD_DATE | strftime('%B %Y') }}
-
-
{% endif %} -
- {% 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" %} - - {% endassets %} - {% endblock %} - + +
+ {% 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" %} + + {% endassets %} + {% endblock %} + diff --git a/homepage/theme/templates/getstarted.html b/homepage/theme/templates/getstarted.html index 760c854..1030e56 100644 --- a/homepage/theme/templates/getstarted.html +++ b/homepage/theme/templates/getstarted.html @@ -1,5 +1,5 @@ {% extends "page.html" %} -{% set funnel = 'true' %} +{% set funnel = True %} {% block content %}
diff --git a/homepage/theme/templates/index.html b/homepage/theme/templates/index.html index 8fa66af..7370a45 100644 --- a/homepage/theme/templates/index.html +++ b/homepage/theme/templates/index.html @@ -639,34 +639,14 @@ - -
-
-
- - - - - - - - - - - - - - - - @@ -703,5 +683,4 @@ {% endblock %} -{% block outro %} -{% endblock %} +{% block outro %}{% endblock %} diff --git a/homepage/theme/templates/page.html b/homepage/theme/templates/page.html index 3a730cb..f366112 100644 --- a/homepage/theme/templates/page.html +++ b/homepage/theme/templates/page.html @@ -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 %} +
+
+
+ {{ page.content }} +
+
+
+{% endblock %} diff --git a/homepage/theme/templates/trydemo.html b/homepage/theme/templates/trydemo.html index d047fff..6d3b6a5 100644 --- a/homepage/theme/templates/trydemo.html +++ b/homepage/theme/templates/trydemo.html @@ -1,5 +1,5 @@ {% extends "page.html" %} -{% set funnel = 'true' %} +{% set funnel = True %} {% block content %}