diff --git a/layouts/partials/bootstrap/display.html b/layouts/partials/bootstrap/display.html new file mode 100644 index 0000000..a638762 --- /dev/null +++ b/layouts/partials/bootstrap/display.html @@ -0,0 +1,12 @@ +{{- $level := 1 }} +{{- $class := "" }} +{{- if .IsNamedParams }} + {{- with .Get "level" }}{{ $level = . }}{{ end }} + {{- with .Get "class" }}{{ $class = . }}{{ end }} +{{- else }} + {{- with .Get 0 }}{{ $level = . }}{{ end }} + {{- with .Get 1 }}{{ $class = . }}{{ end }} +{{- end }} +{{- $classes := printf "display-%d" $level | slice }} +{{- with $class }}{{ $classes = $classes | append . }}{{ end }} +

{{ .Inner }}

diff --git a/layouts/shortcodes/bootstrap/display.html b/layouts/shortcodes/bootstrap/display.html new file mode 100644 index 0000000..aa63bb9 --- /dev/null +++ b/layouts/shortcodes/bootstrap/display.html @@ -0,0 +1,2 @@ +{{- if .Inner }}{{ end }} +{{- partial "bootstrap/display" . }} diff --git a/layouts/shortcodes/bs/display.html b/layouts/shortcodes/bs/display.html new file mode 100644 index 0000000..aa63bb9 --- /dev/null +++ b/layouts/shortcodes/bs/display.html @@ -0,0 +1,2 @@ +{{- if .Inner }}{{ end }} +{{- partial "bootstrap/display" . }}