Skip to content
Snippets Groups Projects
Commit 581af863 authored by Hugo Trentesaux's avatar Hugo Trentesaux
Browse files

[shortcode] améliore note info

parent 59c0a796
No related branches found
No related tags found
No related merge requests found
+++ +++
title = "Titre" title = "Article démo"
date = 2000-01-01 date = 2000-01-01
draft = true draft = true
[taxonomies] [taxonomies]
authors = ["Moi",] authors = ["HugoTrentesaux",]
tags = ["demo",] tags = ["demo",]
[extra] [extra]
thumbnail = "/img/yunohost.png" 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(type="ok", display="block", markdown=true) %}
Note "ok" *échantillon*. De type "block" Note "ok" *échantillon*. De display "block"
Avec du contenu en **markdown**. Avec du contenu en **markdown**.
{% end %} {% end %}
{% note(type="ok") %} {% note(type="ok", display="both") %}
Note both "ok" sur une seule ligne. Note "ok" de display "both"
{% end %} {% end %}
{% note(type="ok", display="icon", markdown=true, size="large") %} {% note(type="ok", display="icon") %}
Note "ok" *échantillon*. De type "icon" Note "ok" display "icon"
Avec du contenu en **markdown**.
{% end %} {% end %}
{% note(type="ok", display="icon") %} ### Type de notes possible
Note icone "ok" sur une seule ligne.
{% note(type="default") %}
Note "default"
{% end %} {% end %}
{% note(type="warning", display="block", markdown=true) %} {% note(type="neutral") %}
Note "warning" *échantillon*. De type "block" Note "neutral"
Avec du contenu en **markdown**. {% end %}
{% note(type="ok") %}
Note "ok"
{% end %} {% end %}
{% note(type="warning") %} {% note(type="warning") %}
Note both "warning" sur une seule ligne. Note "warning"
{% end %} {% end %}
{% note(type="warning", display="icon", markdown=true, size="large") %} {% note(type="error") %}
Note "warning" *échantillon*. De type "icon" Note "error"
Avec du contenu en **markdown**. {% end %}
{% note(type="info") %}
Note "info"
{% end %}
### Taille de note possible
{% note(type="info", markdown="true" size="small") %}
Note "small"
Avec deux lignes
{% end %} {% end %}
{% note(type="warning", display="icon") %} {% note(type="info", markdown="true" size="medium") %}
Note icone "warning" sur une seule ligne. Note "medium"
Avec
Trois lignes
{% end %} {% end %}
{% note(type="info", markdown="true" size="large") %}
Note "large"
Avec
Cinq
Lignes
?
{% end %}
\ No newline at end of file
...@@ -5,7 +5,7 @@ title = "Ğ1 : Et si on finançait son développement ?" ...@@ -5,7 +5,7 @@ title = "Ğ1 : Et si on finançait son développement ?"
draft = true draft = true
[taxonomies] [taxonomies]
authors = ["Boris",] authors = ["boris",]
category = ["Financement",] category = ["Financement",]
[extra] [extra]
......
...@@ -2,4 +2,7 @@ ...@@ -2,4 +2,7 @@
title = "nanocryk" title = "nanocryk"
draft = true draft = true
[taxonomies]
authors = ["nanocryk",]
+++ +++
\ No newline at end of file
...@@ -30,16 +30,22 @@ ...@@ -30,16 +30,22 @@
.note-icon::before .note-icon::before
content: "" content: ""
float: left float: left
margin-right: 5px
position: relative position: relative
.note-icon-large::before
height: 72px
width: 72px
background-size: 72px
.note-icon-small::before .note-icon-small::before
margin: 6px 6px 6px 0
height: 24px height: 24px
width: 24px width: 24px
background-size: 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 .note-icon::after
content: "" content: ""
display: block display: block
...@@ -63,7 +69,11 @@ ...@@ -63,7 +69,11 @@
.note-info .note-info
background-color: #dff5ff background-color: #dff5ff
border-left-color: #454ec5 border-left-color: #454ec5
.note::before
background-repeat: no-repeat;
.note-icon-ok::before .note-icon-ok::before
background-image: url("/theme/ok.png") background-image: url("/theme/ok.png")
.note-icon-warning::before .note-icon-warning::before
background-image: url("/theme/warning.png") background-image: url("/theme/warning.png")
\ No newline at end of file .note-icon-info::before
background-image: url("/theme/info.png")
\ No newline at end of file
static/theme/info.png

2.04 KiB

<?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>
{#
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 display %}{% set display="both" %}{% endif %}
{% if not type %}{% set type="neutral" %}{% endif %} {% if not type %}{% set type="neutral" %}{% endif %}
{% if not size %}{% set size="small" %}{% endif %} {% if not size %}{% set size="small" %}{% endif %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment