diff options
author | uPagge <git@upagge.ru> | 2021-06-20 21:53:50 +0300 |
---|---|---|
committer | uPagge <git@upagge.ru> | 2021-06-20 21:53:50 +0300 |
commit | 74553b84f20a64d58ef1e6fe3dccea91a3ce62f8 (patch) | |
tree | 93a3b52c4600edda448f02c678a9fd61f5c87726 | |
parent | 0d93d9444efac87d5590d4d8add96729a95bf2be (diff) |
fix css
-rw-r--r-- | assets/css/_ublogger.scss | 9 | ||||
-rw-r--r-- | assets/css/_ublogger_media.scss | 4 | ||||
-rw-r--r-- | layouts/shortcodes/img-style.html | 5 |
3 files changed, 11 insertions, 7 deletions
diff --git a/assets/css/_ublogger.scss b/assets/css/_ublogger.scss index 8568c94..46f0de2 100644 --- a/assets/css/_ublogger.scss +++ b/assets/css/_ublogger.scss @@ -280,13 +280,17 @@ a.post-tag-summary { width: 30%; } +.img-size-40 { + width: 40%; +} + .img-size-50 { width: 50%; } .img-right { float: right; - margin-left: 10px; + margin-left: 20px !important; } .img-frame { @@ -1238,7 +1242,6 @@ code[class*="language-"], pre[class*="language-"] { } } - .see-also { border: 4px double #2c6789; padding: 15px 20px; @@ -1296,4 +1299,4 @@ code[class*="language-"], pre[class*="language-"] { } @import "_partial/share-icon"; -@import "ublogger_media";
\ No newline at end of file +@import "ublogger_media"; diff --git a/assets/css/_ublogger_media.scss b/assets/css/_ublogger_media.scss index 228ac7f..e8875be 100644 --- a/assets/css/_ublogger_media.scss +++ b/assets/css/_ublogger_media.scss @@ -163,7 +163,7 @@ margin-right: auto; } - .img-size-30, .img-size-50 { + .img-size-30, .img-size-50, .img-size-40 { width: 100%; } @@ -569,4 +569,4 @@ line-height: 72px; letter-spacing: -1.35px; } -}
\ No newline at end of file +} diff --git a/layouts/shortcodes/img-style.html b/layouts/shortcodes/img-style.html index 4f0dd7d..5be8b6f 100644 --- a/layouts/shortcodes/img-style.html +++ b/layouts/shortcodes/img-style.html @@ -1,5 +1,6 @@ {{- $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 }}"> +{{- $margin := cond $.IsNamedParams ($.Get "margin") "" | default "" -}} +<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 }}" {{ with $margin }} style="margin:{{ . }}" {{ end }} > {{ .Inner }} -</div>
\ No newline at end of file +</div> |