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

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/shortcodes/context.html')
-rw-r--r--layouts/shortcodes/context.html17
1 files changed, 6 insertions, 11 deletions
diff --git a/layouts/shortcodes/context.html b/layouts/shortcodes/context.html
index 55157e1..1cb5985 100644
--- a/layouts/shortcodes/context.html
+++ b/layouts/shortcodes/context.html
@@ -1,11 +1,6 @@
-{{- $type := "section" -}}
-{{- if (.Get `article` | default false) -}}
- {{- $type = "article" -}}
-{{- end -}}
-{{- $tag := "" }}
-{{- if (.Get `close` | default false) -}}
- {{- $tag = printf `</%s>` $type -}}
-{{- else -}}
- {{- $tag = printf `<%s>` $type -}}
-{{- end -}}
-{{- $tag | safeHTML -}} \ No newline at end of file
+{{- $tag := cond $.IsNamedParams ($.Get "tag") "" | default "section" -}}
+{{- $tagClose := printf `</%s>` $tag -}}
+{{- $tagOpen := printf `<%s>` $tag -}}
+{{- $tagOpen | safeHTML -}}
+{{ .Inner }}
+{{- $tagClose | safeHTML -}} \ No newline at end of file