diff options
author | uPagge <git@upagge.ru> | 2021-03-28 23:02:21 +0300 |
---|---|---|
committer | uPagge <git@upagge.ru> | 2021-03-28 23:02:21 +0300 |
commit | ac7d24045de07c7152e945e64d45601c644e6a2b (patch) | |
tree | 4931cbac038d3e010d6684d7cc75ea078d3697f9 | |
parent | 1c7142279d8713023f1c9b07819b0ba9806ce64b (diff) |
html5
-rw-r--r-- | assets/css/_page/_single.scss | 61 | ||||
-rw-r--r-- | assets/css/_ublogger.scss | 54 | ||||
-rw-r--r-- | assets/css/_ublogger_media.scss | 21 | ||||
-rw-r--r-- | layouts/_default/_markup/render-image.html | 2 | ||||
-rw-r--r-- | layouts/index.html | 41 | ||||
-rw-r--r-- | layouts/partials/head/seo.html | 44 | ||||
-rw-r--r-- | layouts/post/posts-by-lastmod.html | 83 | ||||
-rw-r--r-- | layouts/post/posts-by-views.html | 83 | ||||
-rw-r--r-- | layouts/shortcodes/admonition.html | 4 | ||||
-rw-r--r-- | layouts/shortcodes/block-media-column.html | 9 | ||||
-rw-r--r-- | layouts/shortcodes/context.html | 17 | ||||
-rw-r--r-- | layouts/shortcodes/list-smile.html | 3 | ||||
-rw-r--r-- | layouts/shortcodes/pic-frame.html | 3 | ||||
-rw-r--r-- | layouts/shortcodes/split-post.html | 5 | ||||
-rw-r--r-- | layouts/shortcodes/split-wide-end.html | 3 | ||||
-rw-r--r-- | layouts/shortcodes/split-wide.html | 24 | ||||
-rw-r--r-- | layouts/shortcodes/split.html | 9 |
17 files changed, 372 insertions, 94 deletions
diff --git a/assets/css/_page/_single.scss b/assets/css/_page/_single.scss index d0e34aa..3c14db9 100644 --- a/assets/css/_page/_single.scss +++ b/assets/css/_page/_single.scss @@ -1,6 +1,13 @@ @import "../_partial/_single/toc"; +.content-block { + .single > :first-child { + margin-top: 0; + } +} + .single { + .single-title { margin: 1rem 0 .5rem; font-size: 1.6rem; @@ -58,20 +65,39 @@ font-size: 1rem; } - h2, - h3, - h4, - h5, - h6 { + h2, h3, h4, h5, h6 { font-weight: bold; - margin-bottom: 1.2rem; - margin-top: 3.2rem; [theme=dark] & { font-weight: bolder; } } + h3, h4, h5, h6 { + font-weight: bold; + margin-bottom: 1rem; + margin-top: 3.2rem; + + & + * { + margin-top: 0 !important; + } + } + + h2 { + margin-bottom: 1.2rem; + font-size: 2rem; + margin-top: 7rem; + + code { + font-size: 90%; + } + } + + h3 { + font-size: 1.6rem; + } + + h2, h3, h4, @@ -159,6 +185,11 @@ .table-wrapper { overflow-x: auto; + border-radius: 6px 6px 0 0; + + & + .table-wrapper { + margin-top: 1rem; + } &::-webkit-scrollbar { background-color: $table-background-color; @@ -171,10 +202,8 @@ > table { width: 100%; max-width: 100%; - margin: .625rem 0; border-spacing: 0; background: $table-background-color; - border-collapse: collapse; [theme=dark] & { background: $table-background-color-dark; @@ -189,13 +218,21 @@ } th, td { - padding: .3rem 1rem; + padding: .18rem 1rem; border: 1px solid darken($table-thead-color, 2%); [theme=dark] & { border-color: darken($table-thead-color-dark, 2%); } } + + tr:last-child td:first-child { + border-bottom-left-radius: 6px; + } + + tr:last-child td:last-child { + border-bottom-right-radius: 6px; + } } } @@ -317,6 +354,10 @@ } } + figure { + margin: 3rem 0 3rem 0; + } + } .lg-toolbar .lg-icon::after { diff --git a/assets/css/_ublogger.scss b/assets/css/_ublogger.scss index 4a0435a..5ecf8ce 100644 --- a/assets/css/_ublogger.scss +++ b/assets/css/_ublogger.scss @@ -39,10 +39,6 @@ body { background: $global-background-secondary-color-dark; } - h2:first-child, h3:first-child { - margin-top: 20px; - } - #toc-static + p { margin-top: 0; } @@ -74,10 +70,6 @@ body { margin-top: 0; } - figure { - margin: 0; - } - img { margin-top: 40px; border-radius: $article-border-radius; @@ -278,11 +270,20 @@ a.post-tag-summary { line-height: 3.2rem; } -.single { +.img-frame { + img { + box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); + } +} - figure { - margin: 0; +.list-smile { + ul, ol { + list-style-type: none; + text-indent: -1.5rem; } +} + +.single { p + ul { margin-top: -1.2rem; @@ -293,15 +294,6 @@ a.post-tag-summary { margin-top: 1.2rem; } - h2 { - font-size: 2rem; - margin-top: 7rem; - - code { - font-size: 90%; - } - } - h2[id^=u-], h3[id^=u-], h4[id^=u-], @@ -312,11 +304,6 @@ a.post-tag-summary { } } - h3 { - font-size: 1.5rem; - } - - } .single { @@ -393,7 +380,7 @@ a.post-tag-summary { } } -.author-avatar-comment{ +.author-avatar-comment { width: 105px; padding: 0 25px 0 0; } @@ -562,6 +549,7 @@ a.post-tag-summary { ol { margin: 0; padding: 0; + li { display: inline-block; list-style: none; @@ -792,6 +780,7 @@ a.post-tag-summary { .block-media_column { display: inline-block; + width: 100%; .content-column { display: block; @@ -804,6 +793,10 @@ a.post-tag-summary { width: 100%; } + :first-child { + margin-top: 0; + } + } } @@ -811,7 +804,6 @@ a.post-tag-summary { .block-media_right { width: 50%; float: right; - text-align: right; padding-right: 0; margin-left: 40px; margin-bottom: 10px; @@ -909,6 +901,10 @@ figure { } .split-post { + + margin-right: -60px; + margin-left: -60px; + .code-header, .table-wrapper, .admonition { border-radius: 0 !important; } @@ -1157,8 +1153,8 @@ figure { } } -.display-hidden{ - clip: rect(1px,1px,1px,1px); +.display-hidden { + clip: rect(1px, 1px, 1px, 1px); height: 1px; margin: 0; overflow: hidden; diff --git a/assets/css/_ublogger_media.scss b/assets/css/_ublogger_media.scss index 7939295..ce6b4d9 100644 --- a/assets/css/_ublogger_media.scss +++ b/assets/css/_ublogger_media.scss @@ -46,7 +46,7 @@ } .article-post { - font-size: 18px; + font-size: 19px; .post { padding: 45px 60px; @@ -114,7 +114,7 @@ } .article-post { - font-size: 18px; + font-size: 19px; .post { padding: 45px 60px; @@ -139,7 +139,7 @@ } .article-post { - font-size: 18px; + font-size: 19px; .post { padding: 45px 60px; @@ -187,6 +187,10 @@ .content-block-position:first-child { margin-top: 0; } + + .content-break h2 { + margin-top: 0; + } } .header-post { @@ -236,6 +240,17 @@ padding: 40px 10px 0 10px; } + figure.render-image { + display: block; + margin-left: -10px; + margin-right: -10px; + } + + .split-post { + margin-right: -10px; + margin-left: -10px; + } + .post-all-meta { padding: 20px 10px 20px } diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 1e04dab..58f76e9 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -13,7 +13,7 @@ {{ $imageOriginal = .Destination }} {{ end }} {{- if $figcap -}} -<figure> +<figure class="render-image"> {{- dict "Src" $imageOriginal "Class" "render-image" "Title" $figcap "Alt" $alt "Caption" $caption "Linked" true "Resources" .Page.Resources | partial "plugin/image.html" -}} <figcaption class="image-caption"> {{- $figcap | safeHTML -}} diff --git a/layouts/index.html b/layouts/index.html index c725a34..e27bf33 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -3,10 +3,32 @@ {{- $profile := .Site.Params.home.profile -}} {{- $posts := .Site.Params.home.posts -}} + {{- /* Paginate */ -}} + {{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections -}} + {{- if .Site.Params.page.hiddenFromHomePage -}} + {{- $pages = where $pages "Params.hiddenfromhomepage" false -}} + {{- else -}} + {{- $pages = where $pages "Params.hiddenfromhomepage" "!=" true -}} + {{- end -}} + + {{ $pinnedPostRelPermalinks := split .Site.Params.pinnedPost "," }} + {{ $pinnedPosts := where $pages "RelPermalink" "in" $pinnedPostRelPermalinks }} + {{ $pages := where $pages "RelPermalink" "not in" $pinnedPostRelPermalinks }} + + {{- with $posts.paginate | default .Site.Params.paginate -}} + {{- $pages = $.Paginate $pages . -}} + {{- else -}} + {{- $pages = .Paginate $pages -}} + {{- end -}} + <article class="page home"{{ if ne $posts.enable false }} data-home="posts"{{ end }}> {{- /* Profile */ -}} {{- if ne $profile.enable false -}} - {{- partial "home/profile.html" . -}} + {{ if (and $profile.onlyToFirstPage (ne $pages.PageNumber 1)) }} + {{/* Do nothing if the pinOnlyToFirstPage flag is set and we're not on page 1. */}} + {{else}} + {{- partial "home/profile.html" . -}} + {{- end -}} {{- end -}} {{- /* Content */ -}} @@ -20,23 +42,6 @@ {{- /* Posts */ -}} {{- if ne $posts.enable false | and .Site.RegularPages -}} - {{- /* Paginate */ -}} - {{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections -}} - {{- if .Site.Params.page.hiddenFromHomePage -}} - {{- $pages = where $pages "Params.hiddenfromhomepage" false -}} - {{- else -}} - {{- $pages = where $pages "Params.hiddenfromhomepage" "!=" true -}} - {{- end -}} - - {{ $pinnedPostRelPermalinks := split .Site.Params.pinnedPost "," }} - {{ $pinnedPosts := where $pages "RelPermalink" "in" $pinnedPostRelPermalinks }} - {{ $pages := where $pages "RelPermalink" "not in" $pinnedPostRelPermalinks }} - - {{- with $posts.paginate | default .Site.Params.paginate -}} - {{- $pages = $.Paginate $pages . -}} - {{- else -}} - {{- $pages = .Paginate $pages -}} - {{- end -}} {{ if .Site.Params.pinnedPost }} {{ if (and .Site.Params.pinOnlyToFirstPage (ne $pages.PageNumber 1)) }} diff --git a/layouts/partials/head/seo.html b/layouts/partials/head/seo.html index 1b13b9c..9f007d0 100644 --- a/layouts/partials/head/seo.html +++ b/layouts/partials/head/seo.html @@ -16,9 +16,11 @@ <meta name="baidu-site-verification" content="{{ . }}" /> {{- end -}} +{{- /* Home SEO */ -}} +{{- if .IsHome -}} +{{- end -}} -{{- /* Home SEO */ -}} {{- if .IsHome -}} <script type="application/ld+json"> { @@ -62,6 +64,46 @@ {{- with .Site.Copyright -}} "license": "{{ . | safeHTML }}", {{- end -}} + {{- if .Site.Params.home.profile.social -}} + "sameAs": [ + {{- $socialMap := resources.Get "data/social.yml" | transform.Unmarshal -}} + {{- $socialArr := slice -}} + {{- range $key, $value := .Site.Params.social -}} + {{- $social := $key | lower | index $socialMap | default dict -}} + {{- if and $value (ne $key "email") (ne $key "rss") -}} + {{- if reflect.IsMap $value -}} + {{- with $value.weight -}} + {{- $social = dict "Weight" . | merge $social -}} + {{- end -}} + {{- with $value.prefix -}} + {{- $social = dict "Prefix" . | merge $social -}} + {{- end -}} + {{- with $value.template -}} + {{- $social = dict "Template" . | merge $social -}} + {{- end -}} + {{- with $value.id -}} + {{- $social = dict "Id" . | merge $social -}} + {{- end -}} + {{- with $value.url -}} + {{- $social = dict "Url" . | merge $social -}} + {{- end -}} + {{- else if ne $value true -}} + {{- $social = dict "Id" $value | merge $social -}} + {{- end -}} + {{- $socialArr = $socialArr | append $social -}} + {{- end -}} + {{- end -}} + {{- $len := (len $socialArr) -}} + {{- range $index, $value := $socialArr -}} + {{- $template := .Template | default "%v" -}} + {{- with .Prefix -}} + {{- $template = . | strings.TrimSuffix "/" | printf "%v/%%v" -}} + {{- end -}} + {{- printf (string $template) .Id | safeHTML -}} + {{- if ne (add $index 1) $len -}}, {{- end -}} + {{- end -}} + ], + {{- end -}} "name": {{ .Site.Title | safeHTML }} } </script> diff --git a/layouts/post/posts-by-lastmod.html b/layouts/post/posts-by-lastmod.html new file mode 100644 index 0000000..0237f6c --- /dev/null +++ b/layouts/post/posts-by-lastmod.html @@ -0,0 +1,83 @@ +{{- define "content" -}} +{{- $params := .Scratch.Get "params" -}} +{{- $profile := .Site.Params.home.profile -}} +{{- $posts := .Site.Params.home.posts -}} + +<article class="page home"{{ if ne $posts.enable false }} data-home="posts"{{ end }}> + {{- /* Profile */ -}} + {{- if ne $profile.enable false -}} + {{- partial "home/profile.html" . -}} + {{- end -}} + + {{- /* Content */ -}} + {{- if .Content -}} + <div class="single"> + <div class="content" id="content"> + {{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction | partial "function/content.html" | safeHTML -}} + </div> + </div> + {{- end -}} + + {{- /* Posts */ -}} + {{- if ne $posts.enable false | and .Site.RegularPages -}} + {{- /* Paginate */ -}} + {{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections -}} + {{- if .Site.Params.page.hiddenFromHomePage -}} + {{- $pages = where $pages "Params.hiddenfromhomepage" false -}} + {{- else -}} + {{- $pages = where $pages "Params.hiddenfromhomepage" "!=" true -}} + {{- end -}} + + {{ $pinnedPostRelPermalinks := split .Site.Params.pinnedPost "," }} + {{ $pinnedPosts := where $pages "RelPermalink" "in" $pinnedPostRelPermalinks }} + {{ $pages := where $pages "RelPermalink" "not in" $pinnedPostRelPermalinks }} + + {{- with $posts.paginate | default .Site.Params.paginate -}} + {{- $pages = $.Paginate $pages . -}} + {{- else -}} + {{- $pages = .Paginate $pages -}} + {{- end -}} + + {{ if .Site.Params.pinnedPost }} + {{ if (and .Site.Params.pinOnlyToFirstPage (ne $pages.PageNumber 1)) }} + {{/* Do nothing if the pinOnlyToFirstPage flag is set and we're not on page 1. */}} + {{else}} + + {{ range $pinnedPosts }} + <div class="post-pinned"> + {{- .Render "summary" -}} + </div> + + {{end}} + {{end}} + {{end}} + + + {{- range $pages.Pages.ByLastmod -}} + {{- .Render "summary" -}} + {{- end -}} + {{- partial "paginator.html" . -}} + {{- end -}} +</article> + +{{- $comment := .Site.Params.Comment -}} +{{- $remark42 := $comment.remark42 | default dict -}} +{{- if $remark42.enable -}} +<script> + var remark_config = { + host: '{{ $remark42.host }}', + site_id: '{{ $remark42.site }}', + components: ['counter'] + }; + + (function(c) { + for(var i = 0; i < c.length; i++){ + var d = document, s = d.createElement('script'); + s.src = remark_config.host + '/web/' +c[i] +'.js'; + s.defer = true; + (d.head || d.body).appendChild(s); + } + })(remark_config.components || ['embed']); +</script> +{{- end -}} +{{- end -}} diff --git a/layouts/post/posts-by-views.html b/layouts/post/posts-by-views.html new file mode 100644 index 0000000..68858f5 --- /dev/null +++ b/layouts/post/posts-by-views.html @@ -0,0 +1,83 @@ +{{- define "content" -}} +{{- $params := .Scratch.Get "params" -}} +{{- $profile := .Site.Params.home.profile -}} +{{- $posts := .Site.Params.home.posts -}} + +<article class="page home"{{ if ne $posts.enable false }} data-home="posts"{{ end }}> + {{- /* Profile */ -}} + {{- if ne $profile.enable false -}} + {{- partial "home/profile.html" . -}} + {{- end -}} + + {{- /* Content */ -}} + {{- if .Content -}} + <div class="single"> + <div class="content" id="content"> + {{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction | partial "function/content.html" | safeHTML -}} + </div> + </div> + {{- end -}} + + {{- /* Posts */ -}} + {{- if ne $posts.enable false | and .Site.RegularPages -}} + {{- /* Paginate */ -}} + {{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections -}} + {{- if .Site.Params.page.hiddenFromHomePage -}} + {{- $pages = where $pages "Params.hiddenfromhomepage" false -}} + {{- else -}} + {{- $pages = where $pages "Params.hiddenfromhomepage" "!=" true -}} + {{- end -}} + + {{ $pinnedPostRelPermalinks := split .Site.Params.pinnedPost "," }} + {{ $pinnedPosts := where $pages "RelPermalink" "in" $pinnedPostRelPermalinks }} + {{ $pages := where $pages "RelPermalink" "not in" $pinnedPostRelPermalinks }} + + {{- with $posts.paginate | default .Site.Params.paginate -}} + {{- $pages = $.Paginate $pages . -}} + {{- else -}} + {{- $pages = .Paginate $pages -}} + {{- end -}} + + {{ if .Site.Params.pinnedPost }} + {{ if (and .Site.Params.pinOnlyToFirstPage (ne $pages.PageNumber 1)) }} + {{/* Do nothing if the pinOnlyToFirstPage flag is set and we're not on page 1. */}} + {{else}} + + {{ range $pinnedPosts }} + <div class="post-pinned"> + {{- .Render "summary" -}} + </div> + + {{end}} + {{end}} + {{end}} + + + {{- range ($pages.Pages.ByParam "views").Reverse -}} + {{- .Render "summary" -}} + {{- end -}} + {{- partial "paginator.html" . -}} + {{- end -}} +</article> + +{{- $comment := .Site.Params.Comment -}} +{{- $remark42 := $comment.remark42 | default dict -}} +{{- if $remark42.enable -}} +<script> + var remark_config = { + host: '{{ $remark42.host }}', + site_id: '{{ $remark42.site }}', + components: ['counter'] + }; + + (function(c) { + for(var i = 0; i < c.length; i++){ + var d = document, s = d.createElement('script'); + s.src = remark_config.host + '/web/' +c[i] +'.js'; + s.defer = true; + (d.head || d.body).appendChild(s); + } + })(remark_config.components || ['embed']); +</script> +{{- end -}} +{{- end -}} diff --git a/layouts/shortcodes/admonition.html b/layouts/shortcodes/admonition.html index 8269e20..e7cbf99 100644 --- a/layouts/shortcodes/admonition.html +++ b/layouts/shortcodes/admonition.html @@ -13,7 +13,10 @@ {{- $iconMap = dict "example" "admonition-icon icon-example" | merge $iconMap -}} {{- $iconMap = dict "quote" "admonition-icon icon-quote" | merge $iconMap -}} {{- $iconDetails := "admonition-icon admonition-icon-arrow-right" -}} +{{- $aside := (.Get `aside`) | default false }} + +{{- if $aside -}}<aside>{{- end -}} {{- if .IsNamedParams -}} {{- $type := .Get "type" | default "note" -}} <div class="details admonition {{ $type }}{{ if .Get `open` | ne false }} open{{ end }}"> @@ -41,3 +44,4 @@ </div> </div> {{- end -}} +{{- if $aside -}}</aside>{{- end -}}
\ No newline at end of file diff --git a/layouts/shortcodes/block-media-column.html b/layouts/shortcodes/block-media-column.html index 8567011..2c367a5 100644 --- a/layouts/shortcodes/block-media-column.html +++ b/layouts/shortcodes/block-media-column.html @@ -1,10 +1,9 @@ +{{- $cols := split .Inner "<!--split-->" -}} <div class="block-media block-media_column"> - {{ $cols := split .Inner "<!--split-->" }} - - {{ range $cols }} + {{- range $cols -}} <div class="content-column"> - {{ . | $.Page.RenderString }} + {{- . | $.Page.RenderString -}} </div> - {{ end }} + {{- end -}} </div> diff --git a/layouts/shortcodes/context.html b/layouts/shortcodes/context.html index 55157e1..1cb5985 100644 --- a/layouts/shortcodes/context.html +++ b/layouts/shortcodes/context.html @@ -1,11 +1,6 @@ -{{- $type := "section" -}} -{{- if (.Get `article` | default false) -}} - {{- $type = "article" -}} -{{- end -}} -{{- $tag := "" }} -{{- if (.Get `close` | default false) -}} - {{- $tag = printf `</%s>` $type -}} -{{- else -}} - {{- $tag = printf `<%s>` $type -}} -{{- end -}} -{{- $tag | safeHTML -}}
\ No newline at end of file +{{- $tag := cond $.IsNamedParams ($.Get "tag") "" | default "section" -}} +{{- $tagClose := printf `</%s>` $tag -}} +{{- $tagOpen := printf `<%s>` $tag -}} +{{- $tagOpen | safeHTML -}} +{{ .Inner }} +{{- $tagClose | safeHTML -}}
\ No newline at end of file diff --git a/layouts/shortcodes/list-smile.html b/layouts/shortcodes/list-smile.html new file mode 100644 index 0000000..3a09391 --- /dev/null +++ b/layouts/shortcodes/list-smile.html @@ -0,0 +1,3 @@ +<div class="list-smile"> + {{ .Inner }} +</div>
\ No newline at end of file diff --git a/layouts/shortcodes/pic-frame.html b/layouts/shortcodes/pic-frame.html new file mode 100644 index 0000000..48d2047 --- /dev/null +++ b/layouts/shortcodes/pic-frame.html @@ -0,0 +1,3 @@ +<div class="img-frame"> + {{ .Inner }} +</div>
\ No newline at end of file diff --git a/layouts/shortcodes/split-post.html b/layouts/shortcodes/split-post.html index 0c569e8..7bc3182 100644 --- a/layouts/shortcodes/split-post.html +++ b/layouts/shortcodes/split-post.html @@ -1,4 +1,3 @@ -</div> <div class="split-post single"> - {{ .Inner | $.Page.RenderString }} -</div><div class="post single">
\ No newline at end of file + {{ .Inner }} +</div>
\ No newline at end of file diff --git a/layouts/shortcodes/split-wide-end.html b/layouts/shortcodes/split-wide-end.html deleted file mode 100644 index 03fa5a4..0000000 --- a/layouts/shortcodes/split-wide-end.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ $class := cond $.IsNamedParams ($.Get "class") "" }} - -</div><div class="content-block content-block-position {{ with $class }}{{ . }}{{ end }}"><div class="post single">
\ No newline at end of file diff --git a/layouts/shortcodes/split-wide.html b/layouts/shortcodes/split-wide.html index 06d8ede..a6790fc 100644 --- a/layouts/shortcodes/split-wide.html +++ b/layouts/shortcodes/split-wide.html @@ -1,6 +1,28 @@ +{{- with .Page.Scratch.Get "counter" -}} +{{- $.Page.Scratch.Set "counter" (add . 1) -}} +{{- else -}} +{{- $.Page.Scratch.Set "counter" 1 -}} +{{- end -}} +{{- $counter := .Page.Scratch.Get "counter" -}} + {{- $typeOpen := cond $.IsNamedParams ($.Get "open") "" | default "section" -}} {{- $typeClose := cond $.IsNamedParams ($.Get "close") "" | default "section" -}} {{- $typeOpen := (printf `<%s>` $typeOpen) | safeHTML -}} {{- $typeClose := (printf `</%s>` $typeClose) | safeHTML -}} +{{ $class := cond $.IsNamedParams ($.Get "class") "" }} -</div></div></div>{{- if ne (.Get `noSection`) true -}}{{- if ne (.Get `first`) true -}}{{ $typeClose }}{{- end -}}{{ $typeOpen }}{{- end -}}<div class="article-post"><div class="content-break content-block-position">
\ No newline at end of file +</div></div> +{{- if ne (.Get `noSection`) true -}} +{{- if ge $counter 2 -}} +{{- if ne (.Get `noSectionClose`) true -}} +{{ $typeClose }} +{{- end -}} +{{- end -}} +{{- if ne (.Get `noSectionOpen`) true -}} +{{ $typeOpen }} +{{- end -}} +{{- end -}} +<div class="article-post"><div class="content-break content-block-position"> + {{ .Inner }} +</div></div> +<div class="content-block content-block-position {{ with $class }}{{ . }}{{ end }}"><div class="post single">
\ No newline at end of file diff --git a/layouts/shortcodes/split.html b/layouts/shortcodes/split.html deleted file mode 100644 index b367ad0..0000000 --- a/layouts/shortcodes/split.html +++ /dev/null @@ -1,9 +0,0 @@ -{{- $type := "section" -}} -{{- if .Get `article` -}} - {{- $type = "article" -}} -{{- end -}} -{{- $typeOpen := (printf `<%s>` $type) | safeHTML -}} -{{- $typeClose := (printf `</%s>` $type) | safeHTML -}} - -</div></div></div>{{- if ne (.Get `first`) true -}}{{ $typeClose }}{{- end -}}{{ $typeOpen }}<div class="article-post"><div class="content-break content-block-position"> -</div><div class="content-block content-block-position"><div class="post single">
\ No newline at end of file |