summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2020-11-01 20:17:56 +0100
committerache <ache@ache.one>2020-11-01 20:17:56 +0100
commitae80314f85d14dc62f47995641c71606b73d4ede (patch)
tree988fe5b7defe255c4d5aa546c3077d22f793f41c
parentAdd Discord article (diff)
CSS Pubdate
-rw-r--r--articles/bizarrerie-du-langage-c.md5
-rw-r--r--articles/duckduckgo-google-en-mieux.md3
-rw-r--r--makefile10
-rwxr-xr-xsrc/css/_contenu.scss11
4 files changed, 24 insertions, 5 deletions
diff --git a/articles/bizarrerie-du-langage-c.md b/articles/bizarrerie-du-langage-c.md
index c26aef8..f970f51 100644
--- a/articles/bizarrerie-du-langage-c.md
+++ b/articles/bizarrerie-du-langage-c.md
@@ -8,6 +8,7 @@ Pourtant, une partie des syntaxes autorisées par le C n'est pratiquement jamais
>!attention
> Pour comprendre ce billet, il est nécessaire d'avoir des bases dans un langage ayant une syntaxe et un fonctionnement proche du C.
+
Sommaire
--------
@@ -751,3 +752,7 @@ Voilà, c'est fini, j'espère que vous avez appris quelque chose de ce billet. S
Je tiens tout particulièrement à remercier [Taurre](https://zestedesavoir.com/membres/voir/Taurre/) pour avoir validé cet article, mais également pour sa pédagogie sur les forums depuis des années, ainsi que [blo yhg](https://zestedesavoir.com/membres/voir/blo%20yhg/) pour sa relecture attentive.
À noter que vous pouvez (re)découvrir de nombreux codes abusant de la syntaxe du langage C aux [IOCCC](http://ioccc.org/winners.html). 😈
+
+
+<div class="pubdate">Publié il y a très longtemps</div>
+
diff --git a/articles/duckduckgo-google-en-mieux.md b/articles/duckduckgo-google-en-mieux.md
index d076b92..14bd868 100644
--- a/articles/duckduckgo-google-en-mieux.md
+++ b/articles/duckduckgo-google-en-mieux.md
@@ -142,3 +142,6 @@ récemment de dépasser le million de requètes par jour.
Consulter la page d'accueil de DuckDuckGo pour plus d'info sur
l'utilisation du moteur de recherche.
+
+<div class="pubdate">Publié en 2010</div>
+
diff --git a/makefile b/makefile
index 69cd138..274179b 100644
--- a/makefile
+++ b/makefile
@@ -5,7 +5,7 @@ HTML_MINIFIER_CMD=htmlmin
BASE_HTML=tmp/left.htm tmp/headers.htm
ALL_ARTICLES=$(wildcard articles/*.md)
ALL_ARTICLES_OUT=$(ALL_ARTICLES:.md=.html)
-ALL_ARTICLES_INTRO_OUT=$(addprefix articles/tmp/,$(notdir $(ALL_ARTICLES:.md=_intro.html)))
+ALL_ARTICLES_INTRO_OUT=$(addprefix articles/tmp/,$(shell cat articles_intro_out))
SCRIPT_JS=s/js/main.js
SHEET_CSS=s/css/style.css
@@ -22,7 +22,7 @@ all: $(ALL_ARTICLES_OUT) $(BASE_HTML) index.html contact/index.html $(SHEET_CSS)
# On compile le fichier md vers html (tmp/%.htm)
# On rajoute les headers (tmp/%_header.htm)
# On fini d'ajouter le squelette HTML (articles/%.html
-articles/%.html: articles/%.md $(BASE_HTML)
+articles/%.html: articles/%.md $(BASE_HTML) headers.m4 articles/article.m4
@echo "> Création des articles"
mkdir -p articles/tmp
cat $< | $(MD_CMD) > $(addprefix articles/tmp/,$(notdir $(@:.html=.htm)))
@@ -33,7 +33,7 @@ articles/%.html: articles/%.md $(BASE_HTML)
# On conserve le titre principale (dans tmp/%_intro.htm)
# On y ajoute les deux premiers paragraphe (tmp/%_intro.html)
#
-articles/tmp/%_intro.html: articles/%.html
+articles/tmp/%_intro.html: articles/%.html articles/intro.m4
@echo "> Création des introductions d'articles"
mkdir -p articles/tmp
@cat $< | $(CATCH_CMD) "h1" > $(@:.html=.htm)
@@ -43,7 +43,7 @@ articles/tmp/%_intro.html: articles/%.html
# > Création de la liste des introductions d'articles pour la page principale
# On assemble juste les introductions d'articles ensemble
-tmp/articles.htm: $(ALL_ARTICLES_INTRO_OUT)
+tmp/articles.htm: $(ALL_ARTICLES_INTRO_OUT) articles_intro_out
@echo "> Création de la liste des introductions d'articles"
mkdir -p tmp
cat $(ALL_ARTICLES_INTRO_OUT) > $@
@@ -61,7 +61,7 @@ index.html: index.m4 $(BASE_HTML) tmp/articles.htm
# On compile le markdown en html (contact.htm)
# On ajoute l'entête avec m4 (contact_header.html)
# On ajoute le reste du squelette avec m4 (contact.html)
-contact/index.html: contact/index.md
+contact/index.html: contact/index.md headers.m4 articles/article.m4
@echo "> Création de la page de contact"
$(MD_CMD) $< > $(@:.html=.htm)
m4 -D TITLE_TITLE="`grep h1 $(@:.html=.htm) | cut -d'>' -f 2 | cut -d'<' -f 1`" headers.m4 > $(basename $@)_header.html
diff --git a/src/css/_contenu.scss b/src/css/_contenu.scss
index 80dc221..54d2990 100755
--- a/src/css/_contenu.scss
+++ b/src/css/_contenu.scss
@@ -9,7 +9,18 @@ article {
padding-left: 0;
padding: 1.6em 1.6em;
font-family: Merriweather, "Liberation Serif", "Segoe UI";
+ position: relative;
+ .pubdate {
+ position: absolute;
+ top: 0;
+ right: 0;
+ padding: 55px 10px;
+ transform: rotate(20deg);
+ text-shadow: 1px 1px 0.2px green;
+ color: pink;
+ text-align: right;
+ }
code {
color: #a00;
background: #eee;