Added a multilingual blog

This commit is contained in:
southerntofu 2020-03-29 20:44:15 +02:00
parent d7e45dc856
commit 11bd75254e
11 changed files with 74 additions and 5 deletions

View File

@ -5,7 +5,7 @@
---
[Blog](DUMMIE)
[Blog](@/blog/_index.fr.md)
---

View File

@ -5,7 +5,7 @@
---
[Blog](DUMMIE)
[Blog](@/blog/_index.md)
---

View File

@ -0,0 +1,3 @@
+++
transparent = true
+++

View File

@ -0,0 +1,3 @@
+++
transparent = true
+++

View File

@ -0,0 +1,11 @@
+++
title = "Un nouveau site pour dnsmanager"
slug = "nouveau-site"
date = 2020-03-29
+++
Aujourd'hui, nous ouvrons un nouveau site web pour dnsmanager!
Il devrait fonctionner correctement sur tous vos appareils y compris les téléphones portables. Si ça n'est pas le cas, merci de nous le signaler ou de soumettre un patch.
Dans le futur, toutes les nouvelles excitantes à propos de dnsmanager apparaîtront sur ce blog, alors reste connectéE.

View File

@ -0,0 +1,12 @@
+++
title = "A new homepage for dnsmanager"
date = 2020-03-29
+++
Today, we are opening a website for dnsmanager!
<!-- more -->
It should display properly on all devices including mobile phones. If that's not the case, please let us know about it or submit a patch yourself.
In the future, exciting news about dnsmanager will appear on this blog, so be sure to stay tuned.

View File

@ -0,0 +1,3 @@
+++
title = "Derniers articles"
+++

3
content/blog/_index.md Normal file
View File

@ -0,0 +1,3 @@
+++
title = "Latest articles"
+++

View File

@ -10,11 +10,15 @@
header { text-align: center; font-weight: bold; }
article > h1:first-child {
article > div:first-child > h1, section > h1:first-child {
text-align: center;
font-size: 2.6em;
}
article > div:first-child {
text-align: center;
}
main {
margin-top: 1rem;
}

View File

@ -4,8 +4,11 @@
{% block main %}
<article class="h-entry">
<h1 class="p-name">{{ page.title }}</h1>
{%- if page.date -%}<time class="dt-published" datetime="{{ page.date }}">📅&nbsp;{{ page.date | date(format="%d/%m/%Y") }}</time>{%- endif -%}
<div>
<h1 class="p-name">{{ page.title }}</h1>
<a class="u-url" hidden aria-hidden="true" href="{{ page.permalink }}">Permalink</a>
{%- if page.date -%}<time class="dt-published" datetime="{{ page.date }}">📅&nbsp;{{ page.date | date(format="%d/%m/%Y") }}</time>{%- endif -%}
</div>
<div class="e-content">{{ page.content | safe }}</div>
</article>
{% endblock %}

27
templates/section.html Normal file
View File

@ -0,0 +1,27 @@
{% extends "index.html" %}
{% block title %}{{ section.title }} - {{ config.title }}{% endblock %}
{% block main %}
<section class="h-feed">
<h1 class="p-name">{{ section.title }}</h1>
<a class="u-url" hidden aria-hidden=true href="{{ section.permalink }}">Permalink</a>
{% for page in section.pages %}
<article>
<div>
<a class="u-url" href="{{ page.permalink }}"><h2>{{ page.title }}</h2></a>
{%- if page.date -%}<time class="dt-published" datetime="{{ page.date }}">📅&nbsp;{{ page.date | date(format="%d/%m/%Y") }}</time>{%- endif -%}
</div>
{% if page.summary %}
<div class="p-summary e-content">
{{ page.summary | markdown | safe }}
</div>
{% else %}
<div class="e-content">
{{ page.content | markdown | safe }}
</div>
{% endif %}
</article>
{% endfor %}
</article>
{% endblock %}