mirror of
https://gitlab.com/free_zed/free_zed.gitlab.io.git
synced 2024-06-26 04:18:54 +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 {
|
||||
|
|
|
@ -41,20 +41,32 @@
|
|||
<div id="about">
|
||||
{% if LINKS %}
|
||||
{% for name, link in LINKS %}
|
||||
<a class="foobar" href="{{ link }}">{{ name }}</a>
|
||||
<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>
|
||||
<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