commit 5103344f210a23917d37e18c625e449e59befc97
parent 5c75f959eb1568343458621819359baa794c2dc8
Author: mcol <mcol@posteo.net>
Date: Thu, 1 Oct 2020 01:01:06 +0100
add initial theme
Diffstat:
9 files changed, 341 insertions(+), 0 deletions(-)
diff --git a/templates/about.html b/templates/about.html
@@ -0,0 +1,33 @@
+{% extends "base.html" %}
+
+
+{% block title %}{{ SITENAME }} / {{ page.title }}{% endblock %}
+
+
+{% block header %}
+<a href=/>mcol.xyz</a> /
+<a href=/{{ output_file }}>{{ page.title }}</a>
+{% endblock %}
+
+
+{% block content %}
+{{ ABOUT }}
+<hr>
+<p><h2>me on the WWW</h2></p>
+<table>
+{% for name, url, msg in LINKS %}
+<tr><td><a href="{{ url }}">{{ name }}</a></td><td>{{ msg }}</td></tr>
+{% endfor %}
+</table>
+<p></p>
+<hr>
+<p>{{ page.content }}</p>
+
+<table>
+ {% for blog in BLOGROLL %}
+ <tr><td>{{ blog[0] }} at <a href="{{ blog[1] }}">{{ blog[2] }}</a></td></tr>
+ {% endfor %}
+</table>
+
+<footer><hr>- mcol.xyz -</footer>
+{% endblock %}
diff --git a/templates/archives.html b/templates/archives.html
@@ -0,0 +1,30 @@
+{% extends "base.html" %}
+
+
+{% block title %}{{ SITENAME }} / {{ ARCHIVES_TITLE }}{% endblock %}
+
+
+{% block header %}
+<a href=/>mcol.xyz</a> /
+<a href=/{{ output_file }}>{{ ARCHIVES_TITLE }}</a>
+{% endblock %}
+
+
+{% block content %}
+{{ ABOUT }}
+<hr>
+
+<table>
+ {% for year, date_year in dates|groupby( 'date.year' )|sort(reverse=True) %}
+ <tr><td></td><td><h2>{{ year }}</h2></td></tr>
+ {% for month, articles in date_year|groupby('date.month')|sort(reverse=True) %}
+ {% for article in articles %}
+ <tr><td>{{ article.date.strftime('%b %d') }}</td>
+ <td><a href="/{{ article.url }}">{{ article.title }}</a><td></tr>
+ {% endfor %}
+ {% endfor %}
+ {% endfor %}
+</table>
+
+<footer><hr>- mcol.xyz -</footer>
+{% endblock %}
diff --git a/templates/article.html b/templates/article.html
@@ -0,0 +1,34 @@
+{% extends "base.html" %}
+
+
+{% block title %}{{ SITENAME }} / {{ article.title }}{% endblock %}
+
+
+{% block extra_meta %}
+ {% if article.description %}
+ <meta name="description" content="{{article.description}}" />
+ {% endif %}
+{% endblock %}
+
+
+{% block header %}
+<a href=/>mcol.xyz</a> / <a href=/{{ ARCHIVES_SAVE_AS }}>{{ ARCHIVES_TITLE }}</a> / <a href=/{{ output_file }}>{{ article.title }}</a>
+{% endblock %}
+
+
+{% block content %}
+
+<div class="art">
+ {{ article.content }}
+</div>
+
+<footer><hr>
+Published @ <time class="pub" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>
+{% if article.category %}in <a href="/{{ article.category.url }}">{{ article.category }}</a>{% endif %}
+
+{% if article.modified %}
+/ <span class=mod>Modified <time datetime="{{ article.modified.isoformat() }}">{{ article.locale_modified }}</time><span>
+{% endif %}
+</footer>
+
+{% endblock %}
diff --git a/templates/base.html b/templates/base.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html lang=en-US>
+ <head>
+ <title>{% block title %}{{ SITENAME }}{% endblock title %}</title>
+ <meta charset=utf-8 />
+ <meta name=author content={{ AUTHOR }}>
+ <meta name=viewport content=width=device-width, initial-scale=1>
+ {% for name, content in DEFAULT_METADATA.items() %}
+ <meta name={{ name }} content={{ content }}>
+ {% endfor %}
+ {% block extra_meta %}{% endblock %}
+ <link rel="shortcut icon" type=image/png href=/favicon.png />
+ <link rel=stylesheet href=/theme/css/{{ CSS_FILE }} type=text/css />
+ {% include "feeds.html" %}
+ {{ EXTRAHEAD }}
+ </head>
+
+ <body>
+ {% if output_file != "index.html" %}
+ <table width="100%">
+ <tr>
+ <td width="32px" rowspan="2"><a href="/"><img id=avatar src="{{ AVATAR }}"/></a></td>
+ <td rowspan="2">{% block header %}{% endblock header %}</td>
+ <td class="link"><a href="/code">code</a></td>
+ </tr>
+ <tr>
+ {% if output_file == "about.html" %}
+ <td class="link"><a href="/posts.html">posts</a></td>
+ {% else %}
+ <td class="link"><a href="/about.html">about</a></td>
+ {% endif %}
+ </tr>
+ </table>
+ <hr>
+ {% endif %}
+ {% block content %}
+ {% endblock %}
+ {{ EXTRATAIL }}
+ </body>
+</html>
diff --git a/templates/categories.html b/templates/categories.html
@@ -0,0 +1,21 @@
+{% extends "base.html" %}
+
+
+{% block title %}{{ SITENAME }} / categories{% endblock %}
+
+
+{% block header %}
+<a href=/>mcol.xyz</a> /
+<a href=/{{ ARCHIVES_SAVE_AS }}>{{ ARCHIVES_TITLE }}</a> /
+<a href=/{{ output_file }}>categories</a>
+{% endblock %}
+
+
+{% block content %}
+<table>
+ {% for category, articles in categories|sort %}
+ <tr><td><a href="/{{ category.url }}">{{ category }} ({{ articles|count }})</a></td></tr>
+ {% endfor %}
+</table>
+<footer><hr>- mcol.xyz -</footer>
+{% endblock %}
diff --git a/templates/category.html b/templates/category.html
@@ -0,0 +1,31 @@
+{% extends "base.html" %}
+
+
+{% block title %}{{ SITENAME }} / {{ category }}{% endblock %}
+
+
+{% block header %}
+<a href=/>mcol.xyz</a> /
+<a href=/{{ ARCHIVES_SAVE_AS }}>{{ ARCHIVES_TITLE }}</a> /
+<a href=/{{ CATEGORIES_SAVE_AS }}>categories</a> /
+<a href=/{{ output_file }}>{{ category }}</a>
+{% endblock %}
+
+
+{% block content %}
+
+<table>
+ {% for year, date_year in dates|groupby( 'date.year' )|sort(reverse=True) %}
+ <tr><td></td><td><h2>{{ year }}</h2></td></tr>
+
+ {% for month, articles in date_year|groupby('date.month')|sort(reverse=True) %}
+ {% for article in articles %}
+ <tr><td>{{ article.date.strftime('%b %d') }}</td>
+ <td><a href="/{{ article.url }}">{{ article.title }}</a></td></tr>
+ {% endfor %}
+ {% endfor %}
+ {% endfor %}
+</table>
+
+<footer><hr>- mcol.xyz -</footer>
+{% endblock %}
diff --git a/templates/feeds.html b/templates/feeds.html
@@ -0,0 +1,20 @@
+{% if FEED_ATOM %}
+<link href="{% if FEED_DOMAIN %}{{ FEED_DOMAIN }}{% endif %}/{%if FEED_ATOM_URL %}{{ FEED_ATOM_URL }}{% else %}{{ FEED_ATOM }}{% endif %}"
+ type="application/atom+xml" rel="alternate" title="{{ SITENAME }}"
+/>
+{% endif %}
+{% if FEED_RSS %}
+<link href="{% if FEED_DOMAIN %}{{ FEED_DOMAIN }}{% endif %}/{% if FEED_RSS_URL %}{{ FEED_RSS_URL }}{% else %}{{ FEED_RSS }}{% endif %}"
+ type="application/rss+xml" rel="alternate" title="{{ SITENAME }}"
+/>
+{% endif %}
+{% if CATEGORY_FEED_ATOM and category %}
+<link href="{% if FEED_DOMAIN %}{{ FEED_DOMAIN }}{% endif %}/{% if CATEGORY_FEED_ATOM_URL %}{{ CATEGORY_FEED_ATOM_URL.format(slug=category.slug) }}{% else %}{{ CATEGORY_FEED_ATOM.format(slug=category.slug) }}{% endif %}"
+ type="application/atom+xml" rel="alternate" title="{{ SITENAME }} / {{ category }}"
+/>
+{% endif %}
+{% if CATEGORY_FEED_RSS and category %}
+<link href="{% if FEED_DOMAIN %}{{ FEED_DOMAIN }}{% endif %}/{% if CATEGORY_FEED_RSS_URL %}{{ CATEGORY_FEED_RSS_URL.format(slug=category.slug) }}{% else %}{{ CATEGORY_FEED_RSS.format(slug=category.slug) }}{% endif %}"
+ type="application/rss+xml" rel="alternate" title="{{ SITENAME }} / {{ category }}"
+/>
+{% endif %}
diff --git a/templates/index.html b/templates/index.html
@@ -0,0 +1,117 @@
+{% extends "base.html" %}
+
+
+{% block extra_meta %}
+<style>
+ #home { /* this flex is only used on small screens */
+ display: flex;
+ height: 100%;
+ width: 100%;
+ justify-content: space-evenly;
+ align-items: center;
+ }
+
+ .win {
+ position: absolute;
+ border-color: #000;
+ margin: 10px 0;
+ width: 428px;
+ height: 238px;
+ box-shadow: 12px 12px 0px rgba(0, 0, 0, 0.3);
+ border: 6px solid;
+ background-clip: padding-box;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+ flex: 0 0 auto;
+ }
+
+ .win:hover
+ {
+ border-color: var(--trim);
+ }
+
+ @keyframes blink{50%{opacity:0;}}
+ #c{
+ color: var(--trim);
+ animation: blink 2s step-start infinite;
+ }
+
+ #home2 {
+ top: calc(50% + 22px);
+ left: calc(50% - 352px);
+ }
+
+ #home1 {
+ top: calc(50% - 260px);
+ left: calc(50% - 88px);
+ }
+
+ .bar {
+ border-top-style: solid;
+ border-width: 18px;
+ border-color: inherit;
+ }
+
+ .wc {
+ font-size: 1.1em;
+ display: flex;
+ flex: 1 1 auto;
+ align-items: center;
+ justify-content: center;
+ align-self: center;
+ width: 75%;
+ line-height: 1.4em;
+ padding-bottom: 0.5em;
+ }
+
+ @media (max-height: 580px) {
+ .win {
+ position: initial;
+ }
+ }
+
+ @media (min-width: 491px) and (max-width: 780px) {
+ #home1 {
+ right: 5%;
+ margin-left: auto;
+ }
+ #home2 {
+ left: 5%;
+ margin-right: auto;
+ }
+ }
+
+ @media (max-width: 490px) {
+ .win {
+ width: 88%;
+ position: initial;
+ }
+ }
+
+ @media (max-width: 960px) {
+ #home {
+ flex-direction: column;
+ }
+ }
+</style>
+{% endblock %}
+
+
+{% block content %}
+<div id=home>
+ <div id=home1 class=win>
+ <div class=bar></div>
+ <div class=wc>
+ <div>{{ HOME1 }}<span id=c>_</span></li></div>
+ </div>
+ </div>
+
+ <div id=home2 class=win>
+ <div class=bar></div>
+ <div class=wc>
+ <div><a href=/posts.html>{{ HOME2 }}</a></div>
+ </div>
+ </div>
+</div>
+{% endblock %}
diff --git a/templates/page.html b/templates/page.html
@@ -0,0 +1,15 @@
+{% extends "base.html" %}
+
+
+{% block title %}{{ SITENAME }} / {{ page.title }}{%endblock%}
+
+
+{% block header %}
+<a href=/{{ output_file }}>{{ page.title }}</a>
+{% endblock %}
+
+
+{% block content %}
+{{ page.content }}
+<footer><hr>- mcol.xyz -</footer>
+{% endblock %}