premier commit
This commit is contained in:
50
templates/article.html
Normal file
50
templates/article.html
Normal file
@ -0,0 +1,50 @@
|
||||
{# article sert aux pages ET aux articles #}
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{{ SITENAME|striptags }} - {{ article.title|striptags }}{% endblock %}
|
||||
{% block head %}
|
||||
{{ super() }}
|
||||
{% if article.description %}
|
||||
<meta name="description" content="{{article.subtitle}} {{article.description}}" />
|
||||
{% endif %}
|
||||
{% for tag in article.tags %}
|
||||
<meta name="tags" content="{{tag}}" />
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<article>
|
||||
<hgroup>
|
||||
<h1>
|
||||
{{ article.title }}
|
||||
</h1>
|
||||
<p>
|
||||
{% if article.modified %}
|
||||
Modifié le <time datetime="{{ article.modified.isoformat() }}">{{ article.modified|strftime('%A %d %B %Y') }}</time>
|
||||
{% else %}
|
||||
Publié le <time datetime="{{ article.date.isoformat() }}">{{ article.date|strftime('%A %d %B %Y') }}</time>
|
||||
{% endif %}
|
||||
|
||||
{% if DISPLAY_AUTHORS %}
|
||||
{% if article.authors %}
|
||||
par
|
||||
{% for author in article.authors %}
|
||||
<a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>{% if loop.last %} {% else %},{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if article.category %}
|
||||
dans la catégorie <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }} </a>
|
||||
{% endif %}
|
||||
|
||||
{% if article.tags %}
|
||||
avec le(s) mot(s) clé(s)
|
||||
{% for tag in article.tags %}
|
||||
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% if loop.last %}.{% else %},{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</p>
|
||||
</hgroup>
|
||||
{{ article.content }}
|
||||
</article>
|
||||
{% endblock %}
|
2
templates/author.html
Normal file
2
templates/author.html
Normal file
@ -0,0 +1,2 @@
|
||||
{% extends "listing.html" %}
|
||||
{% block title %}{{ SITENAME|striptags }} - Articles de {{ author }} {% endblock %}
|
98
templates/base.html
Normal file
98
templates/base.html
Normal file
@ -0,0 +1,98 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock html_lang %}">
|
||||
<head>
|
||||
{% block head %}
|
||||
|
||||
<title>{% block title %}{{ SITENAME|striptags }}{% endblock title %}</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="Pelican" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
{% if FEED_ALL_ATOM %}
|
||||
<link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_ATOM_URL %}{{ FEED_ALL_ATOM_URL }}{% else %}{{ FEED_ALL_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} Full Atom Feed" />
|
||||
{% endif %}
|
||||
{% if FEED_ALL_RSS %}
|
||||
<link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_RSS_URL %}{{ FEED_ALL_RSS_URL }}{% else %}{{ FEED_ALL_RSS }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|striptags }} Full RSS Feed" />
|
||||
{% endif %}
|
||||
{% if FEED_ATOM %}
|
||||
<link href="{{ FEED_DOMAIN }}/{%if FEED_ATOM_URL %}{{ FEED_ATOM_URL }}{% else %}{{ FEED_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} Atom Feed" />
|
||||
{% endif %}
|
||||
{% if FEED_RSS %}
|
||||
<link href="{{ FEED_DOMAIN }}/{% if FEED_RSS_URL %}{{ FEED_RSS_URL }}{% else %}{{ FEED_RSS }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|striptags }} RSS Feed" />
|
||||
{% endif %}
|
||||
{% if CATEGORY_FEED_ATOM and category %}
|
||||
<link href="{{ FEED_DOMAIN }}/{% 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|striptags }} Categories Atom Feed" />
|
||||
{% endif %}
|
||||
{% if CATEGORY_FEED_RSS and category %}
|
||||
<link href="{{ FEED_DOMAIN }}/{% 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|striptags }} Categories RSS Feed" />
|
||||
{% endif %}
|
||||
{% if TAG_FEED_ATOM and tag %}
|
||||
<link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_ATOM_URL %}{{ TAG_FEED_ATOM_URL.format(slug=tag.slug) }}{% else %}{{ TAG_FEED_ATOM.format(slug=tag.slug) }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} Tags Atom Feed" />
|
||||
{% endif %}
|
||||
{% if TAG_FEED_RSS and tag %}
|
||||
<link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_RSS_URL %}{{ TAG_FEED_RSS_URL.format(slug=tag.slug) }}{% else %}{{ TAG_FEED_RSS.format(slug=tag.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|striptags }} Tags RSS Feed" />
|
||||
{% endif %}
|
||||
<link rel="stylesheet" href="{% if SITEURL %}{{ SITEURL }}{% endif %}/theme/css/fork-awesome.css">
|
||||
<link rel="stylesheet" href="{% if SITEURL %}{{ SITEURL }}{% endif %}/theme/css/highlight.css">
|
||||
<link rel="stylesheet" href="{% if SITEURL %}{{ SITEURL }}{% endif %}/theme/css/latest.css">
|
||||
<link rel="icon" type="image/png" href="{% if SITEURL %}{{ SITEURL }}{% endif %}/theme/img/favicon.png" />
|
||||
{%- endblock head %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<header>
|
||||
{% block nav %}
|
||||
<nav>
|
||||
{% if DISPLAY_PAGES_ON_MENU %}
|
||||
{% for p in pages %}
|
||||
{% if loop.first %}
|
||||
<a href="{{ SITEURL }}/"{% if p==page %} aria-current="page" class="current"{% endif %}>{{ p.title }}</a>
|
||||
{% else %}
|
||||
<a href="{{ SITEURL }}/{{ p.url }}"{% if p==page %} aria-current="page" class="current"{% endif %}>{{ p.title }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if DISPLAY_CATEGORIES_ON_MENU %} |
|
||||
{% for cat, null in categories %}
|
||||
{% if cat!="author" %}
|
||||
<a href="{{ SITEURL }}/{{ cat.url }}"{% if cat==category %} aria-current="page" class="current"{% endif %}>{{ cat}}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if DISPLAY_LINKS_ON_MENU %} |
|
||||
{% for title, link in LINKS %}
|
||||
<a href="{{ link }}">{{ title }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</nav>
|
||||
{% if SOCIAL %}
|
||||
<nav class="social">
|
||||
{% for text, link, icon in SOCIAL %}
|
||||
<a href="{{ link }}" title="{{ text }}"><i class="fa {{ icon }}"></i></a>
|
||||
{% endfor %}
|
||||
{% if CATEGORY_FEED_ATOM and category %}
|
||||
<a href="{{ FEED_DOMAIN }}/{% if CATEGORY_FEED_ATOM_URL %}{{ CATEGORY_FEED_ATOM_URL.format(slug=category.slug) }}{% else %}{{ CATEGORY_FEED_ATOM.format(slug=category.slug) }}{% endif %}" title="Flux pour {{ category }}" target="_blank"><i class="fa fa-rss"></i></a>
|
||||
{% endif %}
|
||||
{% if TAG_FEED_ATOM and tag %}
|
||||
<a href="{{ FEED_DOMAIN }}/{% if TAG_FEED_ATOM_URL %}{{ TAG_FEED_ATOM_URL.format(slug=tag.slug) }}{% else %}{{ TAG_FEED_ATOM.format(slug=tag.slug) }}{% endif %}" type="application/atom+xml" title="Flux pour {{ tag }}" target="_blank"><i class="fa fa-rss"></i></a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</header>
|
||||
|
||||
{% block pagination %}
|
||||
{% endblock %}
|
||||
|
||||
<main>
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
{% include "footer.html" %}
|
||||
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
11
templates/categories.html
Normal file
11
templates/categories.html
Normal file
@ -0,0 +1,11 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{{ SITENAME|striptags }} - Categories{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Toutes les catégories sur {{ SITENAME }}</h2>
|
||||
<ul>
|
||||
{% for category, articles in categories|sort %}
|
||||
<li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a> ({{ articles|count }})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
2
templates/category.html
Normal file
2
templates/category.html
Normal file
@ -0,0 +1,2 @@
|
||||
{% extends "listing.html" %}
|
||||
{% block title %}{{ SITENAME|striptags }} - {{ category }} (Catégorie){% endblock %}
|
26
templates/footer.html
Normal file
26
templates/footer.html
Normal file
@ -0,0 +1,26 @@
|
||||
<a href="{{ SITEURL }}/">{{ SITENAME }}</a>{% if SITESUBTITLE %} ({{ SITESUBTITLE }}){%- endif %}.
|
||||
|
||||
{%- if DISPLAY_LEGAL %}
|
||||
{%- if LEGAL_LICENCE %}
|
||||
<a target="_blank" rel="license" href="{{ LEGAL_LICENCE_URL }}">{{ LEGAL_LICENCE }}</a>
|
||||
{%- endif %}
|
||||
{%- if LEGAL_NAME %}
|
||||
{{ LEGAL_NAME}}
|
||||
{%- endif %}
|
||||
{% if LEGAL_ID %}
|
||||
, <a href="{{ LEGAL_URL }}" target="_blank">{{ LEGAL_ID }}</a>.
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
|
||||
{%- if DISPLAY_INFO %}
|
||||
{%- if INFO_ENGINE_NAME %}
|
||||
Générateur: <a target="_blank" href="{{ INFO_ENGINE_URL }}">{{ INFO_ENGINE_NAME }}</a>
|
||||
{%- endif %}
|
||||
{%- if INFO_THEME_NAME %}
|
||||
, thème: <a href="{{ INFO_THEME_URL }}" target="_blank">{{ INFO_THEME_NAME }}</a>
|
||||
{%- endif %}
|
||||
{%- if INFO_HOSTING_NAME %}
|
||||
et auto-hébergé avec <a href="{{ INFO_HOSTING_URL }}">{{ INFO_HOSTING_NAME }}</a>
|
||||
{%- endif %}
|
||||
.
|
||||
{%- endif %}
|
45
templates/listing.html
Normal file
45
templates/listing.html
Normal file
@ -0,0 +1,45 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
{% for article in articles_page.object_list %}
|
||||
<article>
|
||||
<h1>
|
||||
{{ article.title }}
|
||||
</h1>
|
||||
<p>
|
||||
{{ article.subtitle }}<br/>
|
||||
{{ article.description }} <br/>
|
||||
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">Lire la suite…</a>
|
||||
</p>
|
||||
</article>
|
||||
{% endfor %}
|
||||
{% endblock content %}
|
||||
|
||||
{% if articles_page.has_other_pages() %}
|
||||
{% if DEFAULT_PAGINATION %}
|
||||
{% block pagination %}
|
||||
{% set first_page = articles_paginator.page(1) %}
|
||||
{% set last_page = articles_paginator.page(articles_paginator.num_pages) %}
|
||||
{% if articles_paginator.num_pages >1 %}
|
||||
<nav class="pagination">
|
||||
<a href="{{ SITEURL }}/{{ first_page.url }}"
|
||||
{%- if articles_page.has_previous() %}
|
||||
{%- else %}class="hidden"{% endif %}>
|
||||
<i class="fa fa-angle-double-left"></i></a>
|
||||
<a href="{{ SITEURL }}/{{ articles_previous_page.url }}"
|
||||
{%- if articles_page.has_previous() %}
|
||||
{%- else %}class="hidden"{% endif %}>
|
||||
<i class="fa fa-angle-left"></i></a>
|
||||
<p><strong>{{ category }}{{ tag }}</strong> | {{ articles_page.number }} de {{ articles_paginator.num_pages }}</p>
|
||||
<a href="{{ SITEURL }}/{{ articles_next_page.url }}"
|
||||
{%- if articles_page.has_next() %}
|
||||
{%- else %}class="hidden"{% endif %}>
|
||||
<i class="fa fa-angle-right"></i></a>
|
||||
<a href="{{ SITEURL }}/{{ last_page.url }}"
|
||||
{%- if articles_page.has_next() %}
|
||||
{%- else %}class="hidden"{% endif %}>
|
||||
<i class="fa fa-angle-double-right"></i></a>
|
||||
</nav>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
{% endif %}
|
13
templates/page.html
Normal file
13
templates/page.html
Normal file
@ -0,0 +1,13 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{{ SITENAME|striptags }} - {{ page.title|striptags }}{%endblock%}
|
||||
|
||||
{% block head %}
|
||||
{{ super() }}
|
||||
<meta name="description" content="{{ page.subtitle }} {{ page.description }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<article>
|
||||
{{ page.content }}
|
||||
</article>
|
||||
{% endblock %}
|
2
templates/tag.html
Normal file
2
templates/tag.html
Normal file
@ -0,0 +1,2 @@
|
||||
{% extends "listing.html" %}
|
||||
{% block title %}{{ SITENAME|striptags }} - {{ tag }} (Mot clé){% endblock %}
|
11
templates/tags.html
Normal file
11
templates/tags.html
Normal file
@ -0,0 +1,11 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{{ SITENAME|striptags }} - Mots clés{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Tous les mots clés <em>(tags)</em> sur {{ SITENAME }}</h2>
|
||||
<ul>
|
||||
{% for tag, articles in tags|sort %}
|
||||
<li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> ({{ articles|count }})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user