diff --git a/layouts/partials/bootstrap/card-body.html b/layouts/partials/bootstrap/card-body.html new file mode 100644 index 0000000..1143419 --- /dev/null +++ b/layouts/partials/bootstrap/card-body.html @@ -0,0 +1,10 @@ +{{- $class := "" }} +{{- if .IsNamedParams }} + {{- with .Get "class" }}{{ $class = . }}{{ end }} +{{- else }} +{{- end }} +{{- $classes := slice "card-body" }} +{{- with $class }}{{ $classes = $classes | append . }}{{ end }} +
+ {{ .Inner }} +
diff --git a/layouts/partials/bootstrap/card-footer.html b/layouts/partials/bootstrap/card-footer.html new file mode 100644 index 0000000..ec2d6c4 --- /dev/null +++ b/layouts/partials/bootstrap/card-footer.html @@ -0,0 +1,10 @@ +{{- $class := "" }} +{{- if .IsNamedParams }} + {{- with .Get "class" }}{{ $class = . }}{{ end }} +{{- else }} +{{- end }} +{{- $classes := slice "card-footer" }} +{{- with $class }}{{ $classes = $classes | append . }}{{ end }} +
+ {{ .Inner }} +
diff --git a/layouts/partials/bootstrap/card-header.html b/layouts/partials/bootstrap/card-header.html new file mode 100644 index 0000000..74a9a22 --- /dev/null +++ b/layouts/partials/bootstrap/card-header.html @@ -0,0 +1,10 @@ +{{- $class := "" }} +{{- if .IsNamedParams }} + {{- with .Get "class" }}{{ $class = . }}{{ end }} +{{- else }} +{{- end }} +{{- $classes := slice "card-header" }} +{{- with $class }}{{ $classes = $classes | append . }}{{ end }} +
+ {{ .Inner }} +
diff --git a/layouts/partials/bootstrap/card-img.html b/layouts/partials/bootstrap/card-img.html new file mode 100644 index 0000000..3a9ad21 --- /dev/null +++ b/layouts/partials/bootstrap/card-img.html @@ -0,0 +1,11 @@ +{{- $filename := "" }} +{{- if .IsNamedParams }} + {{- $filename = .Get "url" }} +{{- else }} + {{- $filename = .Get 0 }} +{{- end }} +{{ partial "images/image" (dict + "Page" .Page + "Filename" $filename + "ClassName" "card-img-top") +}} diff --git a/layouts/partials/bootstrap/card-title.html b/layouts/partials/bootstrap/card-title.html new file mode 100644 index 0000000..3e64e8d --- /dev/null +++ b/layouts/partials/bootstrap/card-title.html @@ -0,0 +1,11 @@ +{{- $level := 5 }} +{{- $class := "" }} +{{- if .IsNamedParams }} + {{- with .Get "level" }}{{ $level = . }}{{ end }} + {{- with .Get "class" }}{{ $class = . }}{{ end }} +{{- else }} + {{- with .Get 0 }}{{ $level = . }}{{ end }} +{{- end }} +{{- $classes := slice "card-title" }} +{{- with $class }}{{ $classes = $classes | append . }}{{ end }} +{{ printf `%s` $level (delimit $classes " ") .Inner $level | safeHTML }} diff --git a/layouts/partials/bootstrap/card.html b/layouts/partials/bootstrap/card.html new file mode 100644 index 0000000..ca96e82 --- /dev/null +++ b/layouts/partials/bootstrap/card.html @@ -0,0 +1,10 @@ +{{- $class := "" }} +{{- if .IsNamedParams }} + {{- with .Get "class" }}{{ $class = . }}{{ end }} +{{- else }} +{{- end }} +{{- $classes := slice "card" }} +{{- with $class }}{{ $classes = $classes | append . }}{{ end }} +
+ {{ .Inner }} +
diff --git a/layouts/shortcodes/bootstrap/card-body.html b/layouts/shortcodes/bootstrap/card-body.html new file mode 100644 index 0000000..86c4b8a --- /dev/null +++ b/layouts/shortcodes/bootstrap/card-body.html @@ -0,0 +1,2 @@ +{{- if .Inner }}{{ end }} +{{ partial "bootstrap/card-body" . }} diff --git a/layouts/shortcodes/bootstrap/card-footer.html b/layouts/shortcodes/bootstrap/card-footer.html new file mode 100644 index 0000000..778953e --- /dev/null +++ b/layouts/shortcodes/bootstrap/card-footer.html @@ -0,0 +1,2 @@ +{{- if .Inner }}{{ end }} +{{ partial "bootstrap/card-footer" . }} diff --git a/layouts/shortcodes/bootstrap/card-header.html b/layouts/shortcodes/bootstrap/card-header.html new file mode 100644 index 0000000..1f2f054 --- /dev/null +++ b/layouts/shortcodes/bootstrap/card-header.html @@ -0,0 +1,2 @@ +{{- if .Inner }}{{ end }} +{{ partial "bootstrap/card-header" . }} diff --git a/layouts/shortcodes/bootstrap/card-img.html b/layouts/shortcodes/bootstrap/card-img.html new file mode 100644 index 0000000..3f5c490 --- /dev/null +++ b/layouts/shortcodes/bootstrap/card-img.html @@ -0,0 +1 @@ +{{ partial "bootstrap/card-img" . }} diff --git a/layouts/shortcodes/bootstrap/card-title.html b/layouts/shortcodes/bootstrap/card-title.html new file mode 100644 index 0000000..94d4d3f --- /dev/null +++ b/layouts/shortcodes/bootstrap/card-title.html @@ -0,0 +1,2 @@ +{{- if .Inner }}{{ end }} +{{ partial "bootstrap/card-title" . }} diff --git a/layouts/shortcodes/bootstrap/card.html b/layouts/shortcodes/bootstrap/card.html new file mode 100644 index 0000000..aa6ed24 --- /dev/null +++ b/layouts/shortcodes/bootstrap/card.html @@ -0,0 +1,2 @@ +{{- if .Inner }}{{ end }} +{{ partial "bootstrap/card" . }} diff --git a/layouts/shortcodes/bs/card-body.html b/layouts/shortcodes/bs/card-body.html new file mode 100644 index 0000000..86c4b8a --- /dev/null +++ b/layouts/shortcodes/bs/card-body.html @@ -0,0 +1,2 @@ +{{- if .Inner }}{{ end }} +{{ partial "bootstrap/card-body" . }} diff --git a/layouts/shortcodes/bs/card-footer.html b/layouts/shortcodes/bs/card-footer.html new file mode 100644 index 0000000..778953e --- /dev/null +++ b/layouts/shortcodes/bs/card-footer.html @@ -0,0 +1,2 @@ +{{- if .Inner }}{{ end }} +{{ partial "bootstrap/card-footer" . }} diff --git a/layouts/shortcodes/bs/card-header.html b/layouts/shortcodes/bs/card-header.html new file mode 100644 index 0000000..1f2f054 --- /dev/null +++ b/layouts/shortcodes/bs/card-header.html @@ -0,0 +1,2 @@ +{{- if .Inner }}{{ end }} +{{ partial "bootstrap/card-header" . }} diff --git a/layouts/shortcodes/bs/card-img.html b/layouts/shortcodes/bs/card-img.html new file mode 100644 index 0000000..3f5c490 --- /dev/null +++ b/layouts/shortcodes/bs/card-img.html @@ -0,0 +1 @@ +{{ partial "bootstrap/card-img" . }} diff --git a/layouts/shortcodes/bs/card-title.html b/layouts/shortcodes/bs/card-title.html new file mode 100644 index 0000000..94d4d3f --- /dev/null +++ b/layouts/shortcodes/bs/card-title.html @@ -0,0 +1,2 @@ +{{- if .Inner }}{{ end }} +{{ partial "bootstrap/card-title" . }} diff --git a/layouts/shortcodes/bs/card.html b/layouts/shortcodes/bs/card.html new file mode 100644 index 0000000..aa6ed24 --- /dev/null +++ b/layouts/shortcodes/bs/card.html @@ -0,0 +1,2 @@ +{{- if .Inner }}{{ end }} +{{ partial "bootstrap/card" . }}