Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implémente les statuts de maturité des contenus #32

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions content/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,6 @@ p
a(href=note.url) !{ (note.data.short) ? note.data.short : note.data.title }
unless i1 == Object.entries(notices).length - 1 && i2 == n[1].length - 1
span(style="color: #aaa;") •

p
a(href="/notices/") 🗄️ toutes les notices
25 changes: 25 additions & 0 deletions content/notices/index.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
layout: layouts/base
title: ~/journal
eleventyExcludeFromCollections: true
---

-
let notices = collections
.notices
.reduce((acc, n)=>{
let title = (n.data.short) ? n.data.short : n.data.title
let letter = title.charAt(0).toLowerCase()
if (!(letter in acc)) acc[letter] = []
acc[letter].push(n)
return acc
}, {})

h1 notices

each n, i1 in Object.entries(notices)
h2 !{ n[0] }
ul
each note, i2 in n[1]
li
a(href=note.url) !{ (note.data.short) ? note.data.short : note.data.title }
1 change: 0 additions & 1 deletion includes/layouts/base.pug
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
doctype html
html(lang="fr")
head
title #{ title }
Expand Down
1 change: 0 additions & 1 deletion includes/layouts/journal.pug
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ block content
p.subtitle #{ prettyDate }
if source
p
a(href=`${source}`) source

section !{ filters.toc(content) }

Expand Down
4 changes: 4 additions & 0 deletions includes/layouts/notice.pug
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ block content

article
h1 !{ title }

include ../parts/status.pug

.tags
each tag in tags
span #!{ tag }

section !{ content }
2 changes: 2 additions & 0 deletions includes/parts/footer.pug
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

footer
hr

h3 flux rss
ul
li
Expand All @@ -15,6 +16,7 @@ footer
a(href="/journal.xml") journal
li
a(href="/tempusfugit.xml") notes hebdomadaires

h3 me trouver ailleurs
ul
each link in links
Expand Down
11 changes: 11 additions & 0 deletions includes/parts/status.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
section#status
case status
when 'draft'
p 🚧 cette fiche est en cours d'élaboration.
when 'seed'
p 🌱 la maturité de ce contenu est embryonnaire.
when 'obsolete'
p 🍂 ce contenu n'a pas été relu depuis longtemps
| et est sans doute obsolète.

// 🍐 🪴 🌿 🌳