diff options
| author | Sivaldo <git@sivaldodavi.com> | 2026-06-29 18:36:52 -0300 |
|---|---|---|
| committer | Sivaldo <git@sivaldodavi.com> | 2026-06-29 18:36:52 -0300 |
| commit | dd7670cf72b27c1b330d3732a483ca22e3a3db18 (patch) | |
| tree | 16d4e458d93cd7181d4ebc950ed406b45038f53b /layouts/shortcodes | |
Commit inicial
Diffstat (limited to 'layouts/shortcodes')
| -rw-r--r-- | layouts/shortcodes/img.html | 34 | ||||
| -rw-r--r-- | layouts/shortcodes/rawhtml.html | 1 | ||||
| -rw-r--r-- | layouts/shortcodes/video.html | 3 |
3 files changed, 38 insertions, 0 deletions
diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html new file mode 100644 index 0000000..40002cf --- /dev/null +++ b/layouts/shortcodes/img.html @@ -0,0 +1,34 @@ +<!-- + class: class of figure + link: url of image + id: id of image + alt: alt text + caption: caption + mouse: text when moused over + width: fixed width (ex: 600px, 80%) + maxwidth: max width (ex: 800px) +--> + +<figure {{ with .Get "class" }}class="{{.}}"{{ end -}}> + {{- with .Get "link"}}<a href="{{.}}">{{ end -}} + <img + src="{{ .Get "src" }}" + {{- with .Get "mouse" }} title="{{.}}"{{ end -}} + {{- with .Get "id" }} id="{{.}}"{{ end -}} + {{- with .Get "alt" }} alt="{{.}}"{{ end -}} + {{- if or (.Get "width") (.Get "maxwidth") }} + style=" + {{- with .Get "width" }}width: {{.}};{{ end -}} + {{- with .Get "maxwidth" }}max-width: {{.}};{{ end -}} + height: auto; + " + {{- end -}} + > + {{- if .Get "link"}}</a>{{ end -}} + + {{- with .Get "caption" -}} + <figcaption> + {{- . -}} + </figcaption> + {{- end -}} +</figure> diff --git a/layouts/shortcodes/rawhtml.html b/layouts/shortcodes/rawhtml.html new file mode 100644 index 0000000..59448a1 --- /dev/null +++ b/layouts/shortcodes/rawhtml.html @@ -0,0 +1 @@ +{{ .Inner }} diff --git a/layouts/shortcodes/video.html b/layouts/shortcodes/video.html new file mode 100644 index 0000000..51be6ec --- /dev/null +++ b/layouts/shortcodes/video.html @@ -0,0 +1,3 @@ +<video width="640" height="480" preload="none" controls> + <source src="{{ .Get "src" }}" type="video/webm"> +</video> |
