From 78a5782a4cf9ad14e1257c35c4081257b42ef695 Mon Sep 17 00:00:00 2001 From: MultiMote Date: Sat, 7 Jan 2023 11:53:48 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D1=80=D0=B0=D0=B7=D0=BC=D0=B5=D1=82=D0=BA?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.toml | 9 ++++++--- themes/mmotium/assets/css/_vars.scss | 4 ++-- themes/mmotium/assets/css/style.scss | 4 ++-- .../layouts/_default/_markup/render-image.html | 18 ++++++++++++------ themes/mmotium/layouts/_default/baseof.html | 6 +++--- themes/mmotium/layouts/_default/single.html | 16 ++++++++-------- 6 files changed, 33 insertions(+), 24 deletions(-) diff --git a/config.toml b/config.toml index b0dfa65..a3e53c4 100644 --- a/config.toml +++ b/config.toml @@ -12,6 +12,9 @@ enableRobotsTXT = true posts = "/:slugorfilename" other = "/:slugorfilename" -[markup] - [markup.highlight] - style = 'monokailight' \ No newline at end of file + +[markup.highlight] + style = 'monokailight' + +[markup.goldmark.parser] + wrapStandAloneImageWithinParagraph = false diff --git a/themes/mmotium/assets/css/_vars.scss b/themes/mmotium/assets/css/_vars.scss index 0702953..1b9cfbb 100644 --- a/themes/mmotium/assets/css/_vars.scss +++ b/themes/mmotium/assets/css/_vars.scss @@ -14,7 +14,7 @@ $page-bg-color: #dfdfdf; $page-bg-image: "/images/bg.jpg"; $post-bg-color: white; -$image-wrappper-bg-color: #fcfcfc; -$image-wrappper-border-color: #d6d6d6; +$image-wrapper-bg-color: #fcfcfc; +$image-wrapper-border-color: #d6d6d6; $table-border-color: #d6d6d6; \ No newline at end of file diff --git a/themes/mmotium/assets/css/style.scss b/themes/mmotium/assets/css/style.scss index d91b525..ca549b0 100644 --- a/themes/mmotium/assets/css/style.scss +++ b/themes/mmotium/assets/css/style.scss @@ -53,8 +53,8 @@ nav.navbar { text-align: center; margin: 0; padding: 16px; - background-color: $image-wrappper-bg-color; - border: 1px solid $image-wrappper-border-color; + background-color: $image-wrapper-bg-color; + border: 1px solid $image-wrapper-border-color; } img { diff --git a/themes/mmotium/layouts/_default/_markup/render-image.html b/themes/mmotium/layouts/_default/_markup/render-image.html index 7c0aeeb..1f25ba6 100644 --- a/themes/mmotium/layouts/_default/_markup/render-image.html +++ b/themes/mmotium/layouts/_default/_markup/render-image.html @@ -1,25 +1,31 @@ +{{ if .IsBlock }}
+{{ end }} + {{/* Remote image */ -}} {{ if or (hasPrefix .Destination "https://") (hasPrefix .Destination "http://") }} - {{.Text}} + {{.Text}} {{/* Local image */ -}} {{ else }} {{- $img := .Page.Resources.GetMatch .Destination -}} {{- $resizeMimes := slice "image/png" "image/jpeg" -}} {{ if $img -}} - + {{ if in $resizeMimes $img.MediaType.Type -}} - {{.Text}} + {{.Text}} {{- else -}} - {{.Text}} + {{.Text}} {{- end -}} {{- else -}} - {{.Text}} + {{.Text}} {{- end -}} {{- end -}} - {{ if .Title }}
{{ .Title }}
{{ end }} + {{ if and (.IsBlock) (.Title) }}
{{ .Title }}
{{ end }} + +{{ if .IsBlock }}
+{{ end }} diff --git a/themes/mmotium/layouts/_default/baseof.html b/themes/mmotium/layouts/_default/baseof.html index 348b554..93cbde1 100644 --- a/themes/mmotium/layouts/_default/baseof.html +++ b/themes/mmotium/layouts/_default/baseof.html @@ -2,9 +2,9 @@ - - - + + + {{ block "head_meta" . }}{{ end }} diff --git a/themes/mmotium/layouts/_default/single.html b/themes/mmotium/layouts/_default/single.html index 4304f20..f848cbc 100644 --- a/themes/mmotium/layouts/_default/single.html +++ b/themes/mmotium/layouts/_default/single.html @@ -1,13 +1,13 @@ {{ define "head_meta" }} - - - - - - {{ with .PublishDate }}{{ end }} - {{ with .Lastmod }}{{ end }} + + + + + + {{ with .PublishDate }}{{ end }} + {{ with .Lastmod }}{{ end }} {{ $thumb := $.Resources.Get $.Params.featured_image -}} - {{ with $thumb }}{{end}} + {{ with $thumb }}{{end}} {{end}} {{ define "main" }}