mirror of
https://gitlab.com/free_zed/free_zed.gitlab.io.git
synced 2024-06-17 14:12:31 +00:00
Add a commit link in footer
Do some change in CSS and HTML indentatior The commit link is build with 3 new template files : - time - date - commit Each file is updated during CI, before _pelican_ build HTML files.
This commit is contained in:
parent
7acb9b1f5e
commit
8a9dda332a
|
@ -15,6 +15,9 @@ pages:
|
|||
- devel
|
||||
script:
|
||||
- pip install -r requirements.txt
|
||||
- date --utc +%H:%M > mytheme/templates/time
|
||||
- date --utc +%d/%m/%Y > mytheme/templates/date
|
||||
- echo $CI_COMMIT_SHORT_SHA > mytheme/templates/commit
|
||||
- pelican -s "pubconf-${CI_COMMIT_REF_NAME}.py" --fatal warnings
|
||||
artifacts:
|
||||
when: on_success
|
||||
|
|
|
@ -335,21 +335,21 @@ img.left, figure.left {float: left; margin: 0 2em 2em 0;}
|
|||
#about .primary {float: left; width: 165px;}
|
||||
#about .primary strong {color: #C64350; display: block; font-size: 1.286em;}
|
||||
#about .photo {float: left; margin: 5px 20px;}
|
||||
|
||||
#about .url:link, #about .url:visited {text-decoration: none;}
|
||||
|
||||
#about .bio {float: right; width: 500px;}
|
||||
|
||||
.foobar {
|
||||
margin: 0 20px 0 0;
|
||||
width: 185px;
|
||||
.spaced {
|
||||
margin: 0 30px 0 0;
|
||||
}
|
||||
|
||||
/*
|
||||
Footer
|
||||
*****************/
|
||||
#contentinfo {padding-bottom: 2em; text-align: right;}
|
||||
|
||||
footer .mentions {
|
||||
text-align: center;
|
||||
font-size: 80%;
|
||||
}
|
||||
/***** Sections *****/
|
||||
/* Blog */
|
||||
.hentry {
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<footer class="post-info">
|
||||
<p>Publié le {{ article.date|strftime('%d/%M/%Y') }}</p>
|
||||
{% if article.modified %}
|
||||
<p>Édité le {{ article.modified|strftime('%d/%M/%Y') }}</p>
|
||||
{% endif %}
|
||||
{% if article.authors %}
|
||||
<p>Par :
|
||||
{% for author in article.authors %}
|
||||
<a class="url fn" href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
<p>
|
||||
Dans : <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
|
||||
</p>
|
||||
{% include 'taglist.html' %}
|
||||
{% import 'translations.html' as translations with context %}
|
||||
<p>{{ translations.translations_for(article) }}</p>
|
||||
<p>Publié le {{ article.date|strftime('%d/%M/%Y') }}</p>
|
||||
{% if article.modified %}
|
||||
<p>Édité le {{ article.modified|strftime('%d/%M/%Y') }}</p>
|
||||
{% endif %}
|
||||
{% if article.authors %}
|
||||
<p>Par :
|
||||
{% for author in article.authors %}
|
||||
<a class="url fn" href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
<p>
|
||||
Dans : <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
|
||||
</p>
|
||||
{% include 'taglist.html' %}
|
||||
{% import 'translations.html' as translations with context %}
|
||||
<p>{{ translations.translations_for(article) }}</p>
|
||||
</footer><!-- /.post-info -->
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock html_lang %}">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{% block title %}{{ SITENAME }}{%endblock%}</title>
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/{{ CSS_FILE }}" />
|
||||
<link rel="shortcut icon" href="{{ SITEURL }}/{{ FAVICO }}" media='all' type="image/ico" >
|
||||
{% 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 }} 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 }} RSS Feed" />
|
||||
{% endif %}
|
||||
{% block extra_head %}{% endblock extra_head %}
|
||||
<meta charset="utf-8" />
|
||||
<title>{% block title %}{{ SITENAME }}{%endblock%}</title>
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/{{ CSS_FILE }}" />
|
||||
<link rel="shortcut icon" href="{{ SITEURL }}/{{ FAVICO }}" media='all' type="image/ico" >
|
||||
{% 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 }} 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 }} RSS Feed" />
|
||||
{% endif %}
|
||||
{% block extra_head %}{% endblock extra_head %}
|
||||
</head>
|
||||
|
||||
<body id="index" class="home">
|
||||
{% include 'github.html' %}
|
||||
<header id="banner" class="body">
|
||||
<h1><a href="{{ SITEURL }}/">{{ SITENAME }} {% if SITESUBTITLE %}<strong>{{ SITESUBTITLE }}</strong>{% endif %}</a></h1>
|
||||
<nav><ul>
|
||||
{% for title, link in MENUITEMS %}
|
||||
<li><a href="{{ link }}">{{ title }}</a></li>
|
||||
{% endfor %}
|
||||
{% if DISPLAY_CATEGORIES_ON_MENU -%}
|
||||
{% for cat, null in categories %}
|
||||
<li{% if cat == category %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if DISPLAY_PAGES_ON_MENU -%}
|
||||
{% for pg in pages %}
|
||||
<li{% if pg == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ pg.url }}">{{ pg.title }}</a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul></nav>
|
||||
<h1><a href="{{ SITEURL }}/">{{ SITENAME }} {% if SITESUBTITLE %}<strong>{{ SITESUBTITLE }}</strong>{% endif %}</a></h1>
|
||||
<nav><ul>
|
||||
{% for title, link in MENUITEMS %}
|
||||
<li><a href="{{ link }}">{{ title }}</a></li>
|
||||
{% endfor %}
|
||||
{% if DISPLAY_CATEGORIES_ON_MENU -%}
|
||||
{% for cat, null in categories %}
|
||||
<li{% if cat == category %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if DISPLAY_PAGES_ON_MENU -%}
|
||||
{% for pg in pages %}
|
||||
<li{% if pg == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ pg.url }}">{{ pg.title }}</a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul></nav>
|
||||
</header><!-- /#banner -->
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
@ -40,21 +40,33 @@
|
|||
<footer class="body">
|
||||
<div id="about">
|
||||
{% if LINKS %}
|
||||
{% for name, link in LINKS %}
|
||||
<a class="foobar" href="{{ link }}">{{ name }}</a>
|
||||
{% endfor %}
|
||||
{% for name, link in LINKS %}
|
||||
<a class="spaced" href="{{ link }}">{{ name }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<span class="foobar">|</span>
|
||||
<span class="spaced">|</span>
|
||||
{% if SOCIAL or FEED_ALL_ATOM or FEED_ALL_RSS %}
|
||||
{% for name, link in SOCIAL %}
|
||||
<a class="foobar" href="{{ link }}">{{ name }}</a>
|
||||
{% endfor %}
|
||||
{% for name, link in SOCIAL %}
|
||||
<a class="spaced" href="{{ link }}">{{ name }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<p>
|
||||
Motorisé par <a href="http://getpelican.com/">Pelican</a>, qui tire grand avantage de <a href="http://python.org">Python</a> | Copyleft 2014/2019 - Frédéric Zind
|
||||
<p class="spaced">
|
||||
Frédéric Zind - <a href="https://creativecommons.org/licenses/by-sa/2.0/deed.fr" title="Licence du contenu">Copyleft CC-BY-SA</a> - 2014/2019
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="mentions">
|
||||
Site construit le
|
||||
<em>
|
||||
{% include 'date' %} à {% include 'time' %} [UTC]
|
||||
</em>
|
||||
avec le commit
|
||||
<em>
|
||||
<a href="{{ REPO_COMMIT_URL }}/{% include 'commit' %}" title="Lien vers le commit utilisé pour construire cette version du site" class=""><code>{% include 'commit' %}</code></a>
|
||||
</em>
|
||||
|
|
||||
Motorisé par <a href="http://getpelican.com/">Pelican</a>, qui tire grand avantage de <a href="http://python.org">Python</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
|
|
1
mytheme/templates/commit
Normal file
1
mytheme/templates/commit
Normal file
|
@ -0,0 +1 @@
|
|||
<foobar>
|
1
mytheme/templates/date
Normal file
1
mytheme/templates/date
Normal file
|
@ -0,0 +1 @@
|
|||
20/01/19
|
1
mytheme/templates/time
Normal file
1
mytheme/templates/time
Normal file
|
@ -0,0 +1 @@
|
|||
22:11:50
|
|
@ -68,3 +68,6 @@ TAG_SAVE_AS = 'tags/{slug}/index.html'
|
|||
TAG_URL = 'tags/{slug}/'
|
||||
YEAR_ARCHIVE_SAVE_AS = 'articles/{date:%Y}/index.html'
|
||||
YEAR_ARCHIVE_URL = 'articles/{date:%Y}/'
|
||||
|
||||
# URL of the repo to link build commit
|
||||
REPO_COMMIT_URL = 'http://git.localhost/repo/commit'
|
||||
|
|
|
@ -19,3 +19,6 @@ CATEGORY_FEED_ATOM = 'feeds/{slug}.atom.xml'
|
|||
LINKS = (('Archives', '/mypelican/articles/'),
|
||||
('Tags', '/mypelican/tags/'),
|
||||
('Mentions légales', '/mypelican/pages/mentions-legales/'),)
|
||||
|
||||
# URL of the repo to link build commit
|
||||
REPO_COMMIT_URL = 'https://gitlab.com/free_zed/mypelican/commit'
|
||||
|
|
|
@ -15,3 +15,6 @@ SITEURL = 'https://free_zed.gitlab.io'
|
|||
|
||||
FEED_ALL_ATOM = 'feeds/all.atom.xml'
|
||||
CATEGORY_FEED_ATOM = 'feeds/{slug}.atom.xml'
|
||||
|
||||
# URL of the repo to link build commit
|
||||
REPO_COMMIT_URL = 'https://gitlab.com/free_zed/free_zed.gitlab.io/commit'
|
||||
|
|
Loading…
Reference in New Issue
Block a user