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:
authoruPagge <upagge@mail.ru>2021-01-10 04:29:29 +0300
committeruPagge <upagge@mail.ru>2021-01-10 04:29:29 +0300
commit5389974f61c7fd234df34c77ce23510772a50b3e (patch)
treef55e49760515f6daaf337f78e632cdd0e029f4d4 /layouts
parent8f1fe24343454b95125825b10dad57b8045fafa3 (diff)
NEW FEATURES
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/summary.html2
-rw-r--r--layouts/posts/single.html136
-rw-r--r--layouts/shortcodes/split-h-end.html2
-rw-r--r--layouts/shortcodes/split-h.html2
-rw-r--r--layouts/shortcodes/split-wide.html6
-rw-r--r--layouts/shortcodes/split.html4
6 files changed, 80 insertions, 72 deletions
diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html
index 3609d9a..8627793 100644
--- a/layouts/_default/summary.html
+++ b/layouts/_default/summary.html
@@ -2,7 +2,7 @@
{{- $tagsStyle := $params.summaryStyle.tags -}}
{{- $tagsTheme := $params.summaryStyle.tags.theme | default "image" -}}
-<article onclick="location.href='{{ $.RelPermalink }}'" class="single summary summary-animation" itemscope itemtype="http://schema.org/Article" style="margin-bottom:0">
+<article onclick="location.href='{{ $.RelPermalink }}'" class="summary summary-animation" itemscope itemtype="http://schema.org/Article" style="margin-bottom:0">
{{- /* Featured image */ -}}
{{- if not $params.summaryStyle.hiddenImage -}}
{{- $image := $params.featuredimagepreview | default $params.featuredimage -}}
diff --git a/layouts/posts/single.html b/layouts/posts/single.html
index d014b89..7459891 100644
--- a/layouts/posts/single.html
+++ b/layouts/posts/single.html
@@ -1,15 +1,19 @@
{{- define "title" }}{{ .Title }} | {{ .Site.Params.Title }}{{ end -}}
{{- define "no-content" -}}
-<div class="container content-article">
- {{- $params := .Scratch.Get "params" -}}
-
- {{- $toc := $params.toc -}}
- {{- if eq $toc true -}}
- {{- $toc = .Site.Params.page.toc | default dict -}}
- {{- else if eq $toc false -}}
- {{- $toc = dict "enable" false -}}
- {{- end -}}
+
+{{- $params := .Scratch.Get "params" -}}
+
+{{- $toc := $params.toc -}}
+{{- if eq $toc true -}}
+{{- $toc = .Site.Params.page.toc | default dict -}}
+{{- else if eq $toc false -}}
+{{- $toc = dict "enable" false -}}
+{{- end -}}
+
+{{- $pageTheme := $params.Theme | default .Site.Params.Page.theme | default "classic" -}}
+
+<div class="container content-article {{ if eq $toc.keepStatic false }}page-toc{{ end }} theme-{{ $pageTheme }}">
{{- /* Auto TOC */ -}}
{{- if ne $toc.enable false -}}
@@ -19,71 +23,77 @@
</div>
{{- end -}}
- {{- $pageTheme := $params.Theme | default .Site.Params.Page.theme | default "classic" -}}
- <article class="{{ if $toc.keepStatic }}page single {{ else }}page single page-toc{{ end }} theme-{{ $pageTheme }}">
-
- <div class="content-block">
- {{- /* Featured image */ -}}
- {{- $image := $params.featuredimage -}}
- {{- $pageImageHidden := $params.hiddenFeaturedImage -}}
- {{- with .Resources.GetMatch "featured-image" -}}
- {{- $image = .RelPermalink -}}
- {{- end -}}
-
- {{- if eq $pageTheme "full" -}}
- {{- with $image -}}
- <div class="featured-image" style="background-image: url('{{ $image }}');">
+ {{- /* Featured image */ -}}
+ {{- $image := $params.featuredimage -}}
+ {{- $pageImageHidden := $params.hiddenFeaturedImage -}}
+ {{- with .Resources.GetMatch "featured-image" -}}
+ {{- $image = .RelPermalink -}}
+ {{- end -}}
- <div class="post-title">
+ <div class="header-post">
+ {{ if or (eq $pageTheme "full") (eq $pageTheme "mega-full") }}
+ {{- with $image -}}
+ <div class="featured-image" style="background-image: url('{{ $image }}');">
{{- end -}}
{{- end -}}
-
- <div class="post-all-meta {{ if and $image (eq $pageTheme "full") }} {{ else }} padding-article {{ end }}">
- {{ partial "breadcrumbs.html" . | safeHTML }}
- <h1 class="single-title animated flipInX">{{ $.Title }}</h1>
- {{- /* Subtitle */ -}}
- {{- with $params.subtitle -}}
- <h2 class="single-subtitle">{{ . }}</h2>
+ <div class="post-title">
+
+ <div class="post-all-meta">
+ {{ partial "breadcrumbs.html" . | safeHTML }}
+ <h1 class="single-title animated flipInX">{{ $.Title }}</h1>
+ {{- /* Subtitle */ -}}
+ {{- with $params.subtitle -}}
+ <h2 class="single-subtitle">{{ . }}</h2>
+ {{- end -}}
+ {{- /* Meta */ -}}
+ <div class="post-meta">
+ <div class="post-meta-line">
+ {{- $categories := slice -}}
+ {{- range $.Params.categories -}}
+ {{- $category := partialCached "function/path.html" . . | printf "/categories/%v" | $.Site.GetPage -}}
+ {{- $categories = $categories | append (printf `<a href="%v"><i class="far fa-folder fa-fw"></i>&nbsp;%v</a>` $category.RelPermalink $category.Title) -}}
{{- end -}}
- {{- /* Meta */ -}}
- <div class="post-meta">
- <div class="post-meta-line">
- {{- $categories := slice -}}
- {{- range $.Params.categories -}}
- {{- $category := partialCached "function/path.html" . . | printf "/categories/%v" | $.Site.GetPage -}}
- {{- $categories = $categories | append (printf `<a href="%v"><i class="far fa-folder fa-fw"></i>&nbsp;%v</a>` $category.RelPermalink $category.Title) -}}
- {{- end -}}
- {{- with delimit $categories "&nbsp;" -}}
- <span class="post-category">
+ {{- with delimit $categories "&nbsp;" -}}
+ <span class="post-category">
{{ . }}
</span>
- {{- end -}}
-
- {{- with $.Site.Params.dateformat | default "2006-01-02" | $.PublishDate.Format -}}
- {{- $timeAgoDate:= $.Site.Params.TimeAgo.DateFormat | default "2006-01-02" | $.PublishDate.Format -}}
- &nbsp;&nbsp;&nbsp;&nbsp;<i class="far fa-calendar-alt fa-fw"></i>&nbsp;<time class="timeago" datetime="{{ $timeAgoDate }}">{{ . }}</time>
- {{- end -}}
- &nbsp;&nbsp;&nbsp;&nbsp;<i class="fas fa-pencil-alt fa-fw"></i>&nbsp;{{ T "wordCount" $.WordCount }}
- &nbsp;&nbsp;&nbsp;&nbsp;<i class="far fa-clock fa-fw"></i>&nbsp;{{ T "readingTime" $.ReadingTime }}
- {{- $comment := $.Scratch.Get "comment" | default dict -}}
- {{- if $comment.enable | and $comment.valine.enable | and $comment.valine.visitor -}}
- <span id="{{ .RelPermalink }}" class="leancloud_visitors" data-flag-title="{{ .Title }}">
+ {{- end -}}
+
+ {{- with $.Site.Params.dateformat | default "2006-01-02" | $.PublishDate.Format -}}
+ {{- $timeAgoDate:= $.Site.Params.TimeAgo.DateFormat | default "2006-01-02" | $.PublishDate.Format -}}
+ &nbsp;&nbsp;&nbsp;&nbsp;<i class="far fa-calendar-alt fa-fw"></i>&nbsp;<time class="timeago" datetime="{{ $timeAgoDate }}">{{ . }}</time>
+ {{- end -}}
+ &nbsp;&nbsp;&nbsp;&nbsp;<i class="fas fa-pencil-alt fa-fw"></i>&nbsp;{{ T "wordCount" $.WordCount }}
+ &nbsp;&nbsp;&nbsp;&nbsp;<i class="far fa-clock fa-fw"></i>&nbsp;{{ T "readingTime" $.ReadingTime }}
+ {{- $comment := $.Scratch.Get "comment" | default dict -}}
+ {{- if $comment.enable | and $comment.valine.enable | and $comment.valine.visitor -}}
+ <span id="{{ .RelPermalink }}" class="leancloud_visitors" data-flag-title="{{ .Title }}">
<i class="far fa-eye fa-fw"></i>&nbsp;<span class=leancloud-visitors-count></span>&nbsp;{{ T "views" }}
</span>&nbsp;
- {{- end -}}
- </div>
- </div>
+ {{- end -}}
</div>
- {{- if eq $pageTheme "full" -}}
- {{- with $image -}}
</div>
</div>
- {{- end -}}
- {{- end -}}
+ </div>
+
+ </div>
+
+ {{ if or (eq $pageTheme "full") (eq $pageTheme "mega-full") }}
+ {{- with $image -}}
+ </div>
+ {{- end -}}
+ {{- end -}}
+
+
+
+ <article class="single toc-start">
+
+ <div class="content-block content-block-first content-block-position">
+
<div class="post">
{{- if and (or (eq $pageTheme "classic") (eq $pageTheme "wide")) (not $pageImageHidden) -}}
@@ -108,7 +118,7 @@
{{- end -}}
{{- /* Content */ -}}
- <div class="content" id="content">
+
{{- with .Site.Params.dateformat | default "2006-01-02" | .Lastmod.Format -}}
{{- $updateDate := . -}}
{{- if not (eq . ($.Site.Params.dateformat | default "2006-01-02" | $.PublishDate.Format)) -}}
@@ -125,7 +135,6 @@
{{- end -}}
{{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
- </div>
</div>
@@ -134,8 +143,7 @@
{{- partial "single/footer.html" . -}}
</div>
</div>
-
-
+ <div id="toc-final"></div>
</article>
{{- with .Params.tags -}}
@@ -149,7 +157,7 @@
{{- $comment := .Site.Params.Comment -}}
{{- if $comment.enable -}}
- <div class="{{ if $toc.keepStatic }} page single comments {{ else }} page single comments page-toc {{ end }}">
+ <div class="page single comments content-block-position">
{{- $authorComment := $params.authorComment -}}
{{- $authorName := $params.author | default .Site.Author.name | default " " -}}
{{- if not (eq $authorName " ") -}}
diff --git a/layouts/shortcodes/split-h-end.html b/layouts/shortcodes/split-h-end.html
index 4760933..eb86fb4 100644
--- a/layouts/shortcodes/split-h-end.html
+++ b/layouts/shortcodes/split-h-end.html
@@ -1,2 +1,2 @@
</div>
-<div class="content-block"><div class="post"><div class="content"> \ No newline at end of file
+<div class="content-block content-block-position"><div class="post"> \ No newline at end of file
diff --git a/layouts/shortcodes/split-h.html b/layouts/shortcodes/split-h.html
index feaf4c2..9402e13 100644
--- a/layouts/shortcodes/split-h.html
+++ b/layouts/shortcodes/split-h.html
@@ -1 +1 @@
-</div></div></div><div class="content-break"> \ No newline at end of file
+</div></div><div class="content-break content-block-position"> \ No newline at end of file
diff --git a/layouts/shortcodes/split-wide.html b/layouts/shortcodes/split-wide.html
index c04a2de..ebc11aa 100644
--- a/layouts/shortcodes/split-wide.html
+++ b/layouts/shortcodes/split-wide.html
@@ -1,3 +1,3 @@
-</div></div></div>
-<div class="content-break">{{ .Inner | $.Page.RenderString }}</div>
-<div class="content-block"><div class="post"><div class="content"> \ No newline at end of file
+</div></div>
+<div class="content-block-position content-break">{{ .Inner | $.Page.RenderString }}</div>
+<div class="content-block content-block-position"><div class="post"> \ No newline at end of file
diff --git a/layouts/shortcodes/split.html b/layouts/shortcodes/split.html
index 0a166aa..2432a6d 100644
--- a/layouts/shortcodes/split.html
+++ b/layouts/shortcodes/split.html
@@ -1,2 +1,2 @@
-</div></div></div>
-<div class="content-block"><div class="post"><div class="content"> \ No newline at end of file
+</div></div>
+<div class="content-block content-block-position"><div class="post"> \ No newline at end of file