This commit is contained in:
randogoth 2023-05-16 23:34:27 +03:00
commit 78c3dc9737
36 changed files with 1126 additions and 0 deletions

0
theme/README.md Normal file
View file

1
theme/templates/404.mu Normal file
View file

@ -0,0 +1 @@
PAGE NOT FOUND

View file

@ -0,0 +1 @@
{% extends "index.mu" %}

View file

@ -0,0 +1,17 @@
{% extends "base.mu" %}
{% block content %}
>{{ article.title }}
{% import 'translations.mu' as translations with context %}
{{ translations.translations_for(article) }}
{{ article.locale_date }}
{% if article.authors %}
by {% for author in article.authors %}{{ author }}{% endfor %}
{% endif %}
{{ article.content }}
{% endblock %}

View file

@ -0,0 +1,6 @@
{% extends "index.mu" %}
{% block content_title %}
>>Articles by {{ author }}
{% endblock %}

View file

@ -0,0 +1,9 @@
{% extends "base.mu" %}
{% block content %}
>Authors on {{ SITENAME }}
{%- for author, articles in authors|sort %}
+ `[{{ author }}`/{{ author.url }}] ({{ articles|count }})
{% endfor %}
{% endblock %}

26
theme/templates/base.mu Normal file
View file

@ -0,0 +1,26 @@
`# lang: {{ DEFAULT_LANG }}
{% block head %}
>{% block title %}{{ SITENAME }}{% endblock title %}
{% endblock head %}
{% for title, link in MENUITEMS %}
`[{{ title }}`{{ link }}]
{% endfor %}
{% if DISPLAY_PAGES_ON_MENU %}
{% for p in PAGES %}
`[{{ p.title }}`/{{ p.url }}]
{% endfor %}
{% else %}
{% if DISPLAY_CATEGORIES_ON_MENU %}
{% for cat, null in categories %}
`[{% if cat == category %}`_{% endif %}{{ cat }}{% if cat == category %}`_{% endif %}`/{{ cat.url }}]
{% endfor %}
{% endif %}
{% endif %}
{% block content %}
{% endblock %}
{% if DESCRIPTION %}
{{ DESCRIPTION }}
{% endif %}

View file

@ -0,0 +1,6 @@
{% extends "base.mu" %}
{% block content %}
{% for category, articles in categories %}
+ `[{{ category }}`/{{ category.url }}]
{% endfor %}
{% endblock %}

View file

@ -0,0 +1,5 @@
{% extends "index.mu" %}
{% block content_title %}
>>{{ category }}
{% endblock %}

17
theme/templates/index.mu Normal file
View file

@ -0,0 +1,17 @@
{% extends "base.mu" %}
{% block content %}
{% block content_title %}
{% endblock %}
{% for article in articles %}
+[{{ article.locale_date }}]
>>>>`[`!{{ article.title }}`!`/{{ article.url }}]
>>>>{{ article.summary }}
-
{% endfor %}
{% include 'pagination.mu' %}
{% endblock content %}

8
theme/templates/page.mu Normal file
View file

@ -0,0 +1,8 @@
{% extends "base.mu" %}
{% block title %}{{ page.title }}{%endblock%}
{% block content %}
>{{ page.title }}
{% import 'translations.html' as translations with context %}
{{ translations.translations_for(page) }}
{{ page.content }}
{% endblock %}

View file

@ -0,0 +1,5 @@
{% if DEFAULT_PAGINATION %}
-
{% if articles_page.has_previous() %}`[<<`/{{ articles_previous_page.url }}] {% endif %}Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}{% if articles_page.has_next() %} `[>>`/{{ articles_next_page.url }}]{% endif %}
{% endif %}

View file

@ -0,0 +1,10 @@
{% extends "base.mu" %}
{% block content %}
>Archives for {{ period | reverse | join(' ') }}
{% for article in dates %}
+[{{ article.locale_date }}]
>>>>`[`!{{ article.title }}`!`/{{ article.url }}]
>>>>{{ article.summary }}
{% endfor %}
{% endblock %}

0
theme/templates/tag.mu Normal file
View file

6
theme/templates/tags.mu Normal file
View file

@ -0,0 +1,6 @@
{% extends "base.mu" %}
{% block content %}
{% for tag, articles in tags %}
+ `[{{ tag }}`/{{ tag.url }}]
{% endfor %}
{% endblock %}

View file

@ -0,0 +1,8 @@
{% macro translations_for(article) %}
{% if article.translations %}
{% for translation in article.translations %}
`[{{ translation.lang }}`/{{ translation.url }}]
{% endfor %}
{% endif %}
{% endmacro %}