From 581af863f7906a66d46a3163f52f1e5a31f10f54 Mon Sep 17 00:00:00 2001
From: Hugo Trentesaux <hugo@trentesaux.fr>
Date: Mon, 26 Sep 2022 17:02:38 +0200
Subject: [PATCH] =?UTF-8?q?[shortcode]=20am=C3=A9liore=20note=20info?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../2000-01-01-article-demo-slug-lisible.md   |  67 ++++++++++++------
 .../2020-01-27-et-si-on-financait-duniter.md  |   2 +-
 content/contributeurs/nanocryk.md             |   3 +
 sass/_zolapage.sass                           |  22 ++++--
 static/theme/info.png                         | Bin 0 -> 2092 bytes
 static/theme/info.svg                         |  55 ++++++++++++++
 templates/shortcodes/note.html                |   8 +++
 7 files changed, 130 insertions(+), 27 deletions(-)
 create mode 100644 static/theme/info.png
 create mode 100644 static/theme/info.svg

diff --git a/content/blog/2000-01-01-article-demo-slug-lisible.md b/content/blog/2000-01-01-article-demo-slug-lisible.md
index 0c58461..dd50690 100644
--- a/content/blog/2000-01-01-article-demo-slug-lisible.md
+++ b/content/blog/2000-01-01-article-demo-slug-lisible.md
@@ -1,51 +1,78 @@
 +++
-title = "Titre"
+title = "Article démo"
 date = 2000-01-01
 draft = true
 
 [taxonomies]
-authors = ["Moi",]
+authors = ["HugoTrentesaux",]
 tags = ["demo",]
 
 [extra]
 thumbnail = "/img/yunohost.png"
 +++
 
-Contenu
+# Article de démonstration
+
+Cet article montre les fonctionnalités des shortcode. Il peut être généré avec `zola serve --drafts`.
+
+### Display de notes possible
 
 {% note(type="ok", display="block", markdown=true) %}
-Note "ok" *échantillon*. De type "block"  
+Note "ok" *échantillon*. De display "block"  
 Avec du contenu en **markdown**.
 {% end %}
 
-{% note(type="ok") %}
-Note both "ok" sur une seule ligne.
+{% note(type="ok", display="both") %}
+Note "ok" de display "both"
 {% end %}
 
-{% note(type="ok", display="icon", markdown=true, size="large") %}
-Note "ok" *échantillon*. De type "icon"  
-Avec du contenu en **markdown**.
+{% note(type="ok", display="icon") %}
+Note "ok" display "icon"
 {% end %}
 
-{% note(type="ok", display="icon") %}
-Note icone "ok" sur une seule ligne.
+### Type de notes possible
+
+{% note(type="default") %}
+Note "default"
 {% end %}
 
-{% note(type="warning", display="block", markdown=true) %}
-Note "warning" *échantillon*. De type "block"  
-Avec du contenu en **markdown**.
+{% note(type="neutral") %}
+Note "neutral"
+{% end %}
+
+{% note(type="ok") %}
+Note "ok"
 {% end %}
 
 {% note(type="warning") %}
-Note both "warning" sur une seule ligne.
+Note "warning"
 {% end %}
 
-{% note(type="warning", display="icon", markdown=true, size="large") %}
-Note "warning" *échantillon*. De type "icon"  
-Avec du contenu en **markdown**.
+{% note(type="error") %}
+Note "error"
+{% end %}
+
+{% note(type="info") %}
+Note "info"
+{% end %}
+
+### Taille de note possible
+
+{% note(type="info", markdown="true" size="small") %}
+Note "small"  
+Avec deux lignes
 {% end %}
 
-{% note(type="warning", display="icon") %}
-Note icone "warning" sur une seule ligne.
+{% note(type="info", markdown="true" size="medium") %}
+Note "medium"  
+Avec  
+Trois lignes
 {% end %}
 
+{% note(type="info", markdown="true" size="large") %}
+Note "large"  
+Avec  
+Cinq  
+Lignes  
+?
+{% end %}
\ No newline at end of file
diff --git a/content/blog/2020-01-27-et-si-on-financait-duniter.md b/content/blog/2020-01-27-et-si-on-financait-duniter.md
index baf50a8..423c09c 100644
--- a/content/blog/2020-01-27-et-si-on-financait-duniter.md
+++ b/content/blog/2020-01-27-et-si-on-financait-duniter.md
@@ -5,7 +5,7 @@ title = "Ğ1 : Et si on finançait son développement ?"
 draft = true
 
 [taxonomies]
-authors = ["Boris",]
+authors = ["boris",]
 category = ["Financement",]
 
 [extra]
diff --git a/content/contributeurs/nanocryk.md b/content/contributeurs/nanocryk.md
index 221c4a2..39b8da1 100644
--- a/content/contributeurs/nanocryk.md
+++ b/content/contributeurs/nanocryk.md
@@ -2,4 +2,7 @@
 title = "nanocryk"
 
 draft = true
+
+[taxonomies]
+authors = ["nanocryk",]
 +++
\ No newline at end of file
diff --git a/sass/_zolapage.sass b/sass/_zolapage.sass
index 7a3cc7f..f61621f 100644
--- a/sass/_zolapage.sass
+++ b/sass/_zolapage.sass
@@ -30,16 +30,22 @@
     .note-icon::before
         content: ""
         float: left
-        margin-right: 5px
         position: relative
-    .note-icon-large::before
-        height: 72px
-        width: 72px
-        background-size: 72px
     .note-icon-small::before
+        margin: 6px 6px 6px 0
         height: 24px
         width: 24px
         background-size: 24px
+    .note-icon-medium::before
+        margin: 12px 12px 12px 0
+        height: 48px
+        width: 48px
+        background-size: 48px
+    .note-icon-large::before
+        margin: 18px 18px 18px 0
+        height: 72px
+        width: 72px
+        background-size: 72px
     .note-icon::after
         content: ""
         display: block
@@ -63,7 +69,11 @@
     .note-info
         background-color: #dff5ff
         border-left-color: #454ec5
+    .note::before
+        background-repeat: no-repeat;
     .note-icon-ok::before
         background-image: url("/theme/ok.png")
     .note-icon-warning::before
-        background-image: url("/theme/warning.png")
\ No newline at end of file
+        background-image: url("/theme/warning.png")
+    .note-icon-info::before
+        background-image: url("/theme/info.png")
\ No newline at end of file
diff --git a/static/theme/info.png b/static/theme/info.png
new file mode 100644
index 0000000000000000000000000000000000000000..da26bbcdd95e23669e442c4dca3ee2152c14ed14
GIT binary patch
literal 2092
zcmV+{2-Ek8P)<h;3K|Lk000e1NJLTq002k;002k`1^@s6RqeA!00009a7bBm000k#
z000k#0U!9t6#xJL8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H12f0Z^
zK~#90?VNpVU1c4|KfiOf_O`um9lo$lVFTA~B)%ZgzE~Ya`OD2f3|+)^Hw|GJ2vJci
zZo!#Z6Jc{0od%dmX*Uu!Fo7@<jKUDH?TEpEaj<p3GCEO{(ca#+>)Sm)|7dS}Z+qX*
zIk#sUpX4UzIp?|0^F7}@&vVZ6c0^VAkjxm1Ex_w6DRqYRThFamHS5ICwOCRkLXAQY
z@B?8$fhZ6Yh^cZ?L{2DrLd<w?cgJOKl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(_)^w_E*JssiGJ~Mhf(2l3NB|4_Ct2!KRuwxE5_-TsTNUX-t
z_&(r9M-nU=d0tfRwrk96Y8TVTO+;m9_rZ{(V_B|!9_LG2hQ45#);8c4w^r{f3<~<B
zh4E;*!7e9o{R2x)t*3osQ`O%P(Txf>04r@K*{|>-BF|PB14rzByd)Q{8#JHBme^X0
zc&#O}PS6^J8k8W@A7M(Av?wryFobeak&}k%TXDneJ=PgGSxUVnH|Rp+LU|KjH2x2|
WBd{2waRX5R0000<MNUMnLSTZz8vJ<x

literal 0
HcmV?d00001

diff --git a/static/theme/info.svg b/static/theme/info.svg
new file mode 100644
index 0000000..6b0e570
--- /dev/null
+++ b/static/theme/info.svg
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   width="18.119394mm"
+   height="18.119394mm"
+   viewBox="0 0 18.119394 18.119394"
+   version="1.1"
+   id="svg5"
+   xml:space="preserve"
+   inkscape:version="1.2.1 (9c6d41e410, 2022-07-14, custom)"
+   sodipodi:docname="info.svg"
+   inkscape:export-filename="info.png"
+   inkscape:export-xdpi="100.93"
+   inkscape:export-ydpi="100.93"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
+     id="namedview7"
+     pagecolor="#ffffff"
+     bordercolor="#000000"
+     borderopacity="0.25"
+     inkscape:showpageshadow="2"
+     inkscape:pageopacity="0.0"
+     inkscape:pagecheckerboard="0"
+     inkscape:deskcolor="#d1d1d1"
+     inkscape:document-units="mm"
+     showgrid="false"
+     inkscape:zoom="7.8111094"
+     inkscape:cx="17.667145"
+     inkscape:cy="40.519212"
+     inkscape:window-width="1880"
+     inkscape:window-height="1043"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="layer1" /><defs
+     id="defs2" /><g
+     inkscape:label="Calque 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-31.021079,-111.64595)"><circle
+       style="fill:#385def;fill-opacity:1;stroke-width:1.4171;stroke-linecap:round;stroke-linejoin:bevel"
+       id="path366"
+       cx="40.080776"
+       cy="120.70565"
+       r="8.5590162" /><g
+       aria-label="i"
+       id="text976"
+       style="font-size:3.175px;fill:#385def;stroke:#ffffff;stroke-width:0.987068;stroke-linecap:round;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
+       transform="matrix(0.92169944,0,0,0.92169944,3.5346003,9.5778996)"><path
+         d="m 40.476822,118.34353 -3.455731,0.20205 v 0.79038 h 0.937459 c 0.698498,0.0173 0.790406,0.12853 0.790406,0.91907 v 4.39322 0.86391 c -0.01853,0.27558 -0.03648,0.38616 -0.110289,0.47821 -0.128641,0.16557 -0.47792,0.23911 -1.268327,0.25705 h -0.128642 v 0.66174 h 4.760821 v -0.66174 h -0.1287 c -1.231563,-0.0347 -1.396997,-0.12852 -1.396997,-0.79037 v -0.8088 z m -0.863933,-4.57698 c -0.588209,0 -1.06613,0.47763 -1.06613,1.06614 0,0.5882 0.477921,1.06612 1.047748,1.06612 0.606592,0 1.084512,-0.47763 1.084512,-1.06612 0,-0.58822 -0.47792,-1.06614 -1.06613,-1.06614 z"
+         style="font-family:C059;-inkscape-font-specification:'C059, Normal';fill:#ffffff;stroke:#ffffff;stroke-width:0.920856;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
+         id="path1151" /></g></g></svg>
diff --git a/templates/shortcodes/note.html b/templates/shortcodes/note.html
index 36a006e..037f05b 100644
--- a/templates/shortcodes/note.html
+++ b/templates/shortcodes/note.html
@@ -1,3 +1,11 @@
+{#
+    note shortcode with icon and border
+    display: icon / block / both
+    type: neutral / ok / info / warning / error
+    size: small / medium / large
+#}
+
+{# define defaults #}
 {% if not display %}{% set display="both" %}{% endif %}
 {% if not type %}{% set type="neutral" %}{% endif %}
 {% if not size %}{% set size="small" %}{% endif %}
-- 
GitLab