Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zzossig/hugo-theme-zdoc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzzossig <zzossig@gmail.com>2020-03-16 08:29:48 +0300
committerzzossig <zzossig@gmail.com>2020-03-16 08:29:48 +0300
commitcf1c87100cec3f1f163cbb75487fb1601edd4563 (patch)
tree45d3187ebb73b92a936a1b746e63bbe3a93f3759 /layouts
parent8cdd6df08e300fa1116ae18f57512fb11d90ae49 (diff)
alert, notice shortcode added
#20
Diffstat (limited to 'layouts')
-rw-r--r--layouts/shortcodes/alert.html4
-rw-r--r--layouts/shortcodes/notice.html4
2 files changed, 5 insertions, 3 deletions
diff --git a/layouts/shortcodes/alert.html b/layouts/shortcodes/alert.html
index 284fad7..ed4f5bb 100644
--- a/layouts/shortcodes/alert.html
+++ b/layouts/shortcodes/alert.html
@@ -2,5 +2,5 @@
{{- with .Get "theme" -}}alert-{{.}}{{- else -}}alert-info{{- end -}}
{{- else -}}
{{- with .Get 0 -}}alert-{{.}}{{- else -}}alert-info{{- end -}}
-{{- end -}}
-" role="alert">{{ .Inner | markdownify }}</div>
+{{- end -}}
+" role="alert" data-dir="{{ with .Get "dir" }}{{.}}{{ else }}ltr{{ end }}">{{ .Inner | markdownify }}</div> \ No newline at end of file
diff --git a/layouts/shortcodes/notice.html b/layouts/shortcodes/notice.html
index e63ec50..b52e77f 100644
--- a/layouts/shortcodes/notice.html
+++ b/layouts/shortcodes/notice.html
@@ -1 +1,3 @@
-<div class="notices {{ .Get 0 }}" {{ if len .Params | eq 2 }} id="{{ .Get 1 }}" {{ end }}>{{ .Inner }}</div> \ No newline at end of file
+<div class="notices {{ .Get 0 }}" data-title="{{ .Get 1 | default (.Get 0) | humanize }}">
+ {{ .Inner | markdownify }}
+</div> \ No newline at end of file