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:
authoruPagge <git@upagge.ru>2021-05-29 21:25:44 +0300
committeruPagge <git@upagge.ru>2021-05-29 21:25:44 +0300
commite97f7d8724b87992eccbd9f150fd594662d65724 (patch)
treed2ccd4e06f53e2de0311ecdc8030cb6fe0f6952c /layouts/shortcodes
parentf67381e584177f67347e25c44fabaa9b0031ff7b (diff)
img-style
Diffstat (limited to 'layouts/shortcodes')
-rw-r--r--layouts/shortcodes/block-media-right.html3
-rw-r--r--layouts/shortcodes/img-style.html5
-rw-r--r--layouts/shortcodes/pic-frame.html3
3 files changed, 7 insertions, 4 deletions
diff --git a/layouts/shortcodes/block-media-right.html b/layouts/shortcodes/block-media-right.html
index e060bce..3146680 100644
--- a/layouts/shortcodes/block-media-right.html
+++ b/layouts/shortcodes/block-media-right.html
@@ -1,3 +1,4 @@
-<div class="block-media block-media_right">
+{{ $width := cond $.IsNamedParams ($.Get "width") "" }}
+<div class="block-media block-media_right" {{ with $width }}style="width:{{ . }}"{{ end }}>
{{ .Inner | $.Page.RenderString }}
</div> \ No newline at end of file
diff --git a/layouts/shortcodes/img-style.html b/layouts/shortcodes/img-style.html
new file mode 100644
index 0000000..4f0dd7d
--- /dev/null
+++ b/layouts/shortcodes/img-style.html
@@ -0,0 +1,5 @@
+{{- $size := cond $.IsNamedParams ($.Get "size") "" | default "" -}}
+{{- $position := cond $.IsNamedParams ($.Get "position") "" | default "center" -}}
+<div class="img-style {{ with $position }}img-{{ . }}{{ end }} {{ if ($.Get `frame`) }}img-frame{{ end }} {{ with $size }}img-size-{{ . }}{{ end }} {{ if ($.Get `right`) }}img-right{{ end }}">
+ {{ .Inner }}
+</div> \ No newline at end of file
diff --git a/layouts/shortcodes/pic-frame.html b/layouts/shortcodes/pic-frame.html
deleted file mode 100644
index 48d2047..0000000
--- a/layouts/shortcodes/pic-frame.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<div class="img-frame">
- {{ .Inner }}
-</div> \ No newline at end of file