Site kitoy.me
This commit is contained in:
10
templates/articles.html
Normal file
10
templates/articles.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{% extends "index.html" %}
|
||||
{% import "post_macros.html" as post_macros %}
|
||||
|
||||
{% block content %}
|
||||
<h1> {{ page.title }} </h1>
|
||||
<h2 class="description"> {{ post_macros::polish(content=page.description) }} </h2>
|
||||
<hr />
|
||||
{{ post_macros::polish(content=page.content) }}
|
||||
|
||||
{%- endblock content %}
|
||||
60
templates/index.html
Normal file
60
templates/index.html
Normal file
@@ -0,0 +1,60 @@
|
||||
{% import "post_macros.html" as post_macros %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ config.default_language }}">
|
||||
<head>
|
||||
{% include "partials/head.html" %}
|
||||
|
||||
{% block title -%}
|
||||
<title> {{ config.title }} </title>
|
||||
{%- endblock title %}
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="title">
|
||||
<h1 style="text-align:center;"> {{ config.title }} </h1>
|
||||
</div>
|
||||
|
||||
{% include "partials/menu.html" %}
|
||||
<div class="articles">
|
||||
{% block content -%}
|
||||
{% for page in paginator.pages %}
|
||||
{{ post_macros::title(page=page) }}
|
||||
<div class="slug">
|
||||
<p>{{ post_macros::polish(content=page.description) }} </p>
|
||||
<p class="readmore"> <a style="margin-right:2rem;" href="{{ page.permalink }}"> Lire la suite... </a></p>
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
<nav class="pagination center">
|
||||
<div class="pagination center">
|
||||
<div class="c-pagination">
|
||||
{% if paginator.previous -%}
|
||||
<a href="{{ paginator.previous }}">Plus récent</a>
|
||||
{%- endif %}
|
||||
</div>
|
||||
<div class="pagination_older">
|
||||
{% if paginator.next -%}
|
||||
<a href="{{ paginator.next }}">Plus vieux</a>
|
||||
{%- endif %}
|
||||
</div>
|
||||
|
||||
<span>Page {{ paginator.current_index }} sur {{ paginator.number_pagers }}</span>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
{%- endblock content %}
|
||||
|
||||
</div>
|
||||
|
||||
<footer><span class="copyleft">©</span> kitoy.me <br/> Site généré avec <a href="https://getzola.org/"> Zola </a> </footer>
|
||||
|
||||
{% block js -%}
|
||||
<script src="{{ get_url(path="js/menu.js") }}" ></script>
|
||||
{%- endblock js %}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
3
templates/partials/head.html
Normal file
3
templates/partials/head.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="/base.css" type="text/css">
|
||||
<title> {{ config.title }} </title>
|
||||
39
templates/partials/menu.html
Normal file
39
templates/partials/menu.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<div class="menugauche">
|
||||
|
||||
<div class="toggle" id="toggle" onclick="menu-expand()">
|
||||
<h2 id="plus"> Menu </h2>
|
||||
</div>
|
||||
|
||||
<div class="menu" id="menu">
|
||||
<a href="{{ config.base_url}}">
|
||||
<img src="/img/Blog-icon.svg" alt="Le blog" />
|
||||
<p> Le blog </p>
|
||||
</a>
|
||||
|
||||
<a href="{{ config.extra.music }}">
|
||||
<img src="/img/music.svg" alt="Le blog" />
|
||||
<p> Azul </p>
|
||||
</a>
|
||||
|
||||
<a href="{{ config.base_url }}/rss.xml">
|
||||
<img src="/img/resese.svg" alt="Suivez le blog par RSS" />
|
||||
<p> RSS </p>
|
||||
</a>
|
||||
|
||||
<a href="mailto:{{ config.extra.mail }}">
|
||||
<img src="/img/mail.svg" alt="Mail" />
|
||||
<p> Mail/XMPP </p>
|
||||
</a>
|
||||
|
||||
<a href="{{ config.extra.mastodon }}">
|
||||
<img src="/img/masto.svg" alt="Réseaux sociaux" />
|
||||
<p> Mastodon </p>
|
||||
</a>
|
||||
|
||||
<a href="{{ config.extra.gitlab }}">
|
||||
<img src="/img/gitlab.svg" alt="gitlab" />
|
||||
<p> Coding </p>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
25
templates/post_macros.html
Normal file
25
templates/post_macros.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{% macro title(page) %}
|
||||
<header>
|
||||
<h2 class="date"><a href="{{ page.permalink }}">{{ page.title }}</a></h2>
|
||||
<small>
|
||||
<time datetime="{{ page.date | date(format="%F") | safe }}">
|
||||
{{ page.date | date(format="%F") }}
|
||||
</time>
|
||||
{{ " - " }}({{ page.reading_time }} min de souffrance)
|
||||
</small>
|
||||
</header>
|
||||
{% endmacro title %}
|
||||
|
||||
{% macro polish(content) %}
|
||||
{{ content |
|
||||
replace(from=":sourire:", to="😄") |
|
||||
replace(from=":+1:", to="👍") |
|
||||
replace(from=":tire_la_langue:", to="😛") |
|
||||
replace(from=":rire:", to="😀") |
|
||||
replace(from=":colere:", to="😦") |
|
||||
replace(from=":coeur:", to="❤") |
|
||||
replace(from=":déçu:", to="😞") |
|
||||
replace(from=":tada:", to="🎉") |
|
||||
safe
|
||||
}}
|
||||
{% endmacro content %}
|
||||
28
templates/rss.xml
Normal file
28
templates/rss.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
{% import "post_macros.html" as post_macros %}
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
|
||||
<channel>
|
||||
<title>{{ config.title }}</title>
|
||||
<link>{{ config.base_url | escape_xml | safe }}</link>
|
||||
<description>{{ config.description }}</description>
|
||||
<generator>Zola</generator>
|
||||
<language>{{ config.default_language }}</language>
|
||||
<atom:link href="{{ feed_url | safe }}" rel="self" type="application/rss+xml"/>
|
||||
<lastBuildDate>{{ last_build_date | date(format="%a, %d %b %Y %H:%M:%S %z") }}</lastBuildDate>
|
||||
{% for page in pages %}
|
||||
<item>
|
||||
<title>{{ page.title }} | {{ config.title }}</title>
|
||||
<pubDate>{{ page.date | date(format="%a, %d %b %Y %H:%M:%S %z") }}</pubDate>
|
||||
<link>{{ page.permalink | escape_xml | safe }}</link>
|
||||
<guid>{{ page.permalink | escape_xml | safe }}</guid>
|
||||
<description>
|
||||
{% if page.descrition %}
|
||||
{{post_macros::polish(content=page.description)}}
|
||||
{% else %}
|
||||
{{ post_macros::polish(content=page.description)}}
|
||||
{% endif %}</description>
|
||||
<content:encoded>{{ page.content }}</content:encoded>
|
||||
</item>
|
||||
{% endfor %}
|
||||
</channel>
|
||||
</rss>
|
||||
Reference in New Issue
Block a user