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

github.com/gevhaz/hugo-theme-notrack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon <gevhaz@tutanota.com>2020-06-04 15:59:02 +0300
committerSimon <gevhaz@tutanota.com>2020-06-04 15:59:02 +0300
commit6274514bbc3ffd4d43bdf4f082aee0fca566a607 (patch)
treeac3d302c9de5f39b0feaa7e419cad07a76941569
parentbe6d852d334b51987501ab6e7c54f73293ae9aa8 (diff)
Fix margin for image shortcode and fix parameter interpretation for the same
-rw-r--r--layouts/shortcodes/image.html4
-rw-r--r--static/css/styles.css3
-rw-r--r--static/css/styles.scss4
3 files changed, 9 insertions, 2 deletions
diff --git a/layouts/shortcodes/image.html b/layouts/shortcodes/image.html
index fdeef6c..d637e62 100644
--- a/layouts/shortcodes/image.html
+++ b/layouts/shortcodes/image.html
@@ -1,6 +1,6 @@
<figure class="image-shortcode{{ with .Get "class" }} {{ . }}{{ end }}
- {{- if .Get "wide" }} wide{{ end -}}
- {{- if .Get "frame" }} frame{{ end -}}
+ {{- with .Get "wide" }}{{- if eq . "true" }} wide{{ end -}}{{ end -}}
+ {{- with .Get "frame" }}{{- if eq . "true" }} frame{{ end -}}{{ end -}}
{{- with .Get "float" }} {{ . }}{{ end -}}"
style="
{{- with .Get "width" }}width: {{ . }};{{ end -}}
diff --git a/static/css/styles.css b/static/css/styles.css
index 68f6e2c..ac59c22 100644
--- a/static/css/styles.css
+++ b/static/css/styles.css
@@ -101,6 +101,9 @@ figure.right {
float: right;
margin: 0 0 0 1em; }
+figure.right:first-child {
+ margin-top: 1em; }
+
figure.left {
float: left;
margin: 0 1em 0 0; }
diff --git a/static/css/styles.scss b/static/css/styles.scss
index a645e98..73e0aed 100644
--- a/static/css/styles.scss
+++ b/static/css/styles.scss
@@ -172,6 +172,10 @@ figure.right {
margin: 0 0 0 1em;
}
+figure.right:first-child {
+ margin-top: 1em;
+}
+
figure.left {
float: left;
margin: 0 1em 0 0;