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:
Diffstat (limited to 'layouts/shortcodes/split-wide.html')
-rw-r--r--layouts/shortcodes/split-wide.html24
1 files changed, 23 insertions, 1 deletions
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