diff options
Diffstat (limited to 'www/layouts/shortcodes')
-rw-r--r-- | www/layouts/shortcodes/link-group.html | 25 | ||||
-rw-r--r-- | www/layouts/shortcodes/mono.html | 3 | ||||
-rw-r--r-- | www/layouts/shortcodes/todo.html | 1 |
3 files changed, 29 insertions, 0 deletions
diff --git a/www/layouts/shortcodes/link-group.html b/www/layouts/shortcodes/link-group.html new file mode 100644 index 0000000..b16c2bc --- /dev/null +++ b/www/layouts/shortcodes/link-group.html @@ -0,0 +1,25 @@ +<div class="mono link-group"> + {{ $self := . }} + {{ $lines := slice }} + {{ range split .Inner "\n" }} + {{ if strings.ContainsNonSpace . }} + {{ $lines = $lines | append (strings.TrimSpace .) }} + {{ end }} + {{ end }} + {{ $notitle := false }} + {{ if .IsNamedParams }} + {{ $notitle = .Get "notitle" }} + {{ else }} + {{ $notitle = in .Params "notitle" }} + {{ end }} + {{ if not $notitle }} + {{ $title := index $lines 0 }} + <div class="link-group-title">{{ $title | $self.Page.RenderString }}</div> + {{ $lines = $lines | after 1 }} + {{ end }} + <div class="link-group-list"> + {{ range $lines }} + <div class="link-group-item">{{ . | $self.Page.RenderString }}</div> + {{ end }} + </div> +</div> diff --git a/www/layouts/shortcodes/mono.html b/www/layouts/shortcodes/mono.html new file mode 100644 index 0000000..ab183a5 --- /dev/null +++ b/www/layouts/shortcodes/mono.html @@ -0,0 +1,3 @@ +<div class="mono-container"> + {{ .Inner | .Page.RenderString }} +</div> diff --git a/www/layouts/shortcodes/todo.html b/www/layouts/shortcodes/todo.html new file mode 100644 index 0000000..1327b31 --- /dev/null +++ b/www/layouts/shortcodes/todo.html @@ -0,0 +1 @@ +<span class="todo {{ .Get "state" }}">{{ .Get "name" }}</span>
\ No newline at end of file |