feat: basic website with basic content
This commit is contained in:
parent
3379242f31
commit
ba403c815f
76 changed files with 2167 additions and 4 deletions
6
layouts/shortcodes/featured_image.html
Normal file
6
layouts/shortcodes/featured_image.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<figure>
|
||||
{{ $img_src := .Get "src" }}
|
||||
{{ $description := .Get "description" }}
|
||||
<img alt="{{ $description }}" src="{{ $img_src }}" />
|
||||
<figcaption>{{ $description }}</figcaption>
|
||||
</figure>
|
||||
30
layouts/shortcodes/fig-img.html
Normal file
30
layouts/shortcodes/fig-img.html
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<figure class="fig-img {{ with .Get "class" }}{{ . }}{{ end }}">
|
||||
{{- if .Get "link" -}}
|
||||
<a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}>
|
||||
{{- end -}}
|
||||
|
||||
{{ $options := .Get "options" }}
|
||||
{{ $img := (.Page.Resources.GetMatch (.Get "src")).Fit $options }}
|
||||
<img src="{{ $img.RelPermalink }}"
|
||||
{{- if or (.Get "alt") (.Get "caption") }}
|
||||
alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}"
|
||||
{{- end -}}
|
||||
/><!-- Closing img tag -->
|
||||
{{- if .Get "link" }}</a>{{ end -}}
|
||||
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
|
||||
<figcaption>
|
||||
{{ with (.Get "title") -}}
|
||||
<h4>{{ . }}</h4>
|
||||
{{- end -}}
|
||||
{{- if or (.Get "caption") (.Get "attr") -}}<p>
|
||||
{{- .Get "caption" | markdownify -}}
|
||||
{{- with .Get "attrlink" }}
|
||||
<a href="{{ . }}">
|
||||
{{- end -}}
|
||||
{{- .Get "attr" | markdownify -}}
|
||||
{{- if .Get "attrlink" }}</a>{{ end }}</p>
|
||||
{{- end }}
|
||||
</figcaption>
|
||||
{{- end }}
|
||||
</figure>
|
||||
|
||||
2
layouts/shortcodes/fullmod.html
Normal file
2
layouts/shortcodes/fullmod.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
{{ $c := mod (.Get 0) (.Get 1) }}
|
||||
{{ if lt $c 0 }}{{ add (.Get 1) $c }}{{ else }}{{ $c }}{{ end }}
|
||||
8
layouts/shortcodes/wikipedia_link.html
Normal file
8
layouts/shortcodes/wikipedia_link.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{{ $link := printf "https://%s.wikipedia.org/wiki/%s" (.Get "lang") (.Get "name") }}
|
||||
|
||||
<a href="{{ $link }}" class="btn wikipedia-btn" title="Voir l'article "{{.Get "name"}}" sur Wikipedia">
|
||||
{{ partial "helpers/svg" (dict "path" "icons/wikipedia_globe" "class" "btn__icon") }}
|
||||
<div>Voir l'article sur Wikipedia
|
||||
{{ partial "helpers/svg" (dict "path" "icons/external" "class" "icon_inline") }}
|
||||
</div>
|
||||
</a>
|
||||
Loading…
Add table
Add a link
Reference in a new issue