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 <git@upagge.ru>2021-03-14 01:59:40 +0300
committeruPagge <git@upagge.ru>2021-03-14 01:59:40 +0300
commita53473d27e38ae20d0b14108a32aa306d13c9d8c (patch)
tree2511a4df6f9ad855117e85714eda8563e0af5ea1 /layouts
parentb8f47b394e0bce5d0499b5169b3c601ce7a44342 (diff)
new html css
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/_markup/render-image.html4
-rw-r--r--layouts/_default/summary.html10
-rw-r--r--layouts/partials/plugin/image.html3
-rw-r--r--layouts/partials/single/footer.html2
-rw-r--r--layouts/posts/single.html315
-rw-r--r--layouts/shortcodes/split-post.html4
-rw-r--r--layouts/shortcodes/split-wide-end.html5
-rw-r--r--layouts/shortcodes/split-wide.html2
8 files changed, 181 insertions, 164 deletions
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html
index 03c7956..1e04dab 100644
--- a/layouts/_default/_markup/render-image.html
+++ b/layouts/_default/_markup/render-image.html
@@ -14,11 +14,11 @@
{{ end }}
{{- if $figcap -}}
<figure>
- {{- dict "Src" $imageOriginal "Title" $figcap "Alt" $alt "Caption" $caption "Linked" true "Resources" .Page.Resources | partial "plugin/image.html" -}}
+ {{- 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 -}}
</figcaption>
</figure>
{{- else -}}
-{{- dict "Src" $imageOriginal "Title" (path.Base .Destination) "Alt" $alt "Resources" .Page.Resources | partial "plugin/image.html" -}}
+{{- dict "Src" $imageOriginal "Title" (path.Base .Destination) "Class" "render-image" "Alt" $alt "Resources" .Page.Resources | partial "plugin/image.html" -}}
{{- end -}} \ No newline at end of file
diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html
index c2b50e9..a53d8f2 100644
--- a/layouts/_default/summary.html
+++ b/layouts/_default/summary.html
@@ -43,7 +43,7 @@
{{- if not (eq $authorName " ") -}}
{{ $author := index .Site.Data.authors $authorName }}
{{- $authorLink := $author.link | default .Site.Home.RelPermalink -}}
- <span class="post-author">
+ <span class="meta-item post-author">
{{- $options := dict "Class" "author" "Destination" $authorLink "Title" "Author" "Rel" "author" "Icon" (dict "Class" "svg-icon icon-user") "Content" $author.nickname -}}
{{- partial "plugin/link.html" $options -}}
</span>
@@ -51,7 +51,7 @@
{{- with .Site.Params.dateFormat | default "2006-01-02" | .PublishDate.Format -}}
{{- $timeAgoDate:= $.Site.Params.TimeAgo.DateFormat | default "2006-01-02" | $.PublishDate.Format -}}
- <span class="post-publish"><i class="svg-icon icon-clock"></i>
+ <span class="meta-item post-publish"><i class="svg-icon icon-clock"></i>
{{- printf `<time class="timeago" datetime="%v">%v</time>` $timeAgoDate . | safeHTML -}}
</span>
{{- end -}}
@@ -62,13 +62,13 @@
{{- $categories = $categories | append (printf `<a href="%v"><i class="svg-icon icon-folder"></i>%v</a>` $category.RelPermalink $category.Title) -}}
{{- end -}}
{{- with delimit $categories "&nbsp;" -}}
- <span class="post-category">
+ <span class="meta-item post-category">
{{ . }}
</span>
{{- end -}}
{{- with .Params.Views -}}
- <span class="post-meta-views">
+ <span class="meta-item post-meta-views">
<i class="svg-icon icon-eye"></i>{{ . }}
</span>
{{- end -}}
@@ -76,7 +76,7 @@
{{- $comment := .Site.Params.Comment -}}
{{- $remark42 := $comment.remark42 | default dict -}}
{{- if $remark42.enable -}}
- <span class="post-meta-comments">
+ <span class="meta-item post-meta-comments">
<i class="svg-icon icon-comments"></i><span class="remark42__counter" data-url="{{ .Permalink }}"></span>
</span>
{{- end -}}
diff --git a/layouts/partials/plugin/image.html b/layouts/partials/plugin/image.html
index 3a98b21..1143b61 100644
--- a/layouts/partials/plugin/image.html
+++ b/layouts/partials/plugin/image.html
@@ -8,13 +8,14 @@
{{- if .Linked -}}
<a target="_blank" href="{{ .Src | safeURL }}" title="{{ .Title | default $alt }}" {{ with .Rel }} rel="{{ . }}"{{ end }}>
<img loading="lazy" decoding="async"
- data-sizes="auto"
+ {{ with .Class }}class="{{ . }}"{{ end }}
src="{{ .Src | safeURL }}"
alt="{{ $alt }}"{{ with .Height }} height="{{ . }}"{{ end }}{{ with .Width }} width="{{ . }}"{{ end }}
/>
</a>
{{- else -}}
<img loading="lazy" decoding="async"
+ {{ with .Class }}class="{{ . }}"{{ end }}
src="{{ .Src | safeURL }}"
alt="{{ $alt }}"
title="{{ .Title | default $alt }}"{{ with .Height }} height="{{ . }}"{{ end }}{{ with .Width }} width="{{ . }}"{{ end }}
diff --git a/layouts/partials/single/footer.html b/layouts/partials/single/footer.html
index 05625f1..e54f1aa 100644
--- a/layouts/partials/single/footer.html
+++ b/layouts/partials/single/footer.html
@@ -19,7 +19,7 @@
{{ $author = index .Site.Data.authors $authorName }}
{{ end }}
{{ if eq ($params.authorHidden | default false) false }}
-{{- if and (not (eq $authorName " ")) (not (eq $pageTheme "hero")) -}}
+{{- if ne $authorName " " -}}
{{- with $author -}}
<div class="footer-post-author">
<div class="author-avatar"><a href="{{ with .link }} {{- . | safeHTML -}}{{ end }}" target="_blank"><img alt="{{ .about }}" src="{{ with .avatar }} {{- . | safeHTML -}}{{ end }}"></a></div>
diff --git a/layouts/posts/single.html b/layouts/posts/single.html
index 6470780..8a65f51 100644
--- a/layouts/posts/single.html
+++ b/layouts/posts/single.html
@@ -72,196 +72,211 @@
{{ $author = index .Site.Data.authors $authorName }}
{{ end }}
- <div class="header-post">
+ <article>
- {{ if eq $pageTheme "hero" }}
+ <div class="header-post">
- {{- $heroImage := "" -}}
- {{- with .Resources.GetMatch "featured-image" -}}
- {{- if lt 1600 .Width -}}
- {{- $heroImage = (.Resize "1600x q100").Permalink -}}
- {{- else -}}
- {{- $heroImage = .Permalink -}}
- {{- end -}}
- {{- end -}}
+ {{ if eq $pageTheme "hero" }}
- <div class="post-hero-grid">
- <div class="post-hero-info">
- <div class="hero-text-container">
+ {{- $heroImage := "" -}}
+ {{- with .Resources.GetMatch "featured-image" -}}
+ {{- if lt 1600 .Width -}}
+ {{- $heroImage = (.Resize "1600x q100").Permalink -}}
+ {{- else -}}
+ {{- $heroImage = .Permalink -}}
+ {{- end -}}
+ {{- end -}}
- <h1>{{ $.Title }}</h1>
- <p class="hero-text-description">{{ $params.subtitle }}</p>
- </div>
+ <div class="post-hero-grid">
+ <div class="post-hero-info">
+ <div class="hero-text-container">
- {{ with $author }}
- <div class="hero-author">
+ <h1>{{ $.Title }}</h1>
+ <p class="hero-text-description">{{ $params.subtitle }}</p>
+ </div>
- {{ with .link }}<a href=" {{- . | safeHTML -}}" class="hero-author-profile">{{ end }}
- <img class="hero-author-avatar" src="{{ with .avatar }} {{- . | safeHTML -}}{{ end }}" alt="{{ .full_name }}">
- <div class="profile-text-wrapper">
- <span class="hero-author-profile-name">{{ .full_name }}</span>
- <span class="hero-author-profile-title">{{ $params.customAuthor.short_about | default .short_about }}</span>
- </div>
- {{ with .link }}</a>{{ end }}
+ {{ with $author }}
+ <div class="hero-author">
+
+ {{ with .link }}<a href=" {{- . | safeHTML -}}" class="hero-author-profile">{{ end }}
+ <img class="hero-author-avatar" src="{{ with .avatar }} {{- . | safeHTML -}}{{ end }}" alt="{{ .full_name }}">
+ <div class="profile-text-wrapper">
+ <span class="hero-author-profile-name">{{ .full_name }}</span>
+ <span class="hero-author-profile-title">{{ $params.customAuthor.short_about | default .short_about }}</span>
+ </div>
+ {{ with .link }}</a>{{ end }}
+
+ </div>
+ {{ end }}
</div>
- {{ end }}
- </div>
+ <div class="post-hero-logo">
- <div class="post-hero-logo">
+ <figure class="hero-img">
+ {{- dict "Src" $heroImage "Title" .Title "Resources" .Resources | partial "plugin/image.html" -}}
+ </figure>
- <figure class="hero-img">
- {{- dict "Src" $heroImage "Title" .Title "Resources" .Resources | partial "plugin/image.html" -}}
- </figure>
+ </div>
</div>
- </div>
+ <div class="hero-tags">
+ {{ if ne $viewCounter nil}}
+ <span class="rendered tag-none-display" id="views_container"><i class="svg-icon icon-eye-big"></i><span id="views_value" style="margin-right: 0">{{ if ne $params.Views nil}} {{ $params.Views }} {{ else }} Нет просмотров {{ end }}</span></span>
+ {{- end -}}
- <div class="hero-tags">
- {{ if ne $viewCounter nil}}
- <span class="rendered tag-none-display" id="views_container"><i class="svg-icon icon-eye-big"></i><span id="views_value" style="margin-right: 0">{{ if ne $params.Views nil}} {{ $params.Views }} {{ else }} Нет просмотров {{ end }}</span></span>
- {{- end -}}
+ {{- with $.Site.Params.dateformat | default "2006-01-02" | $.PublishDate.Format -}}
+ {{- $timeAgoDate:= $.Site.Params.TimeAgo.DateFormat | default "2006-01-02" | $.PublishDate.Format -}}
+ <span id="post-date" class="rendered"><i class="svg-icon icon-clock-big"></i><time class="timeago" datetime="{{ $timeAgoDate }}">{{ . }}</time></span>
+ {{- end -}}
- {{- with $.Site.Params.dateformat | default "2006-01-02" | $.PublishDate.Format -}}
- {{- $timeAgoDate:= $.Site.Params.TimeAgo.DateFormat | default "2006-01-02" | $.PublishDate.Format -}}
- <span id="post-date" class="rendered"><i class="svg-icon icon-clock-big"></i><time class="timeago" datetime="{{ $timeAgoDate }}">{{ . }}</time></span>
- {{- end -}}
+ <span class="rendered"><i class="svg-icon icon-pencil-big"></i>{{ T "wordCount" $.WordCount }}</span>
+ <span class="rendered"><i class="svg-icon icon-stopwatch-big"></i>{{ T "readingTime" $.ReadingTime }}</span>
+ </div>
+ {{ end }}
- <span class="rendered"><i class="svg-icon icon-pencil-big"></i>{{ T "wordCount" $.WordCount }}</span>
- <span class="rendered"><i class="svg-icon icon-stopwatch-big"></i>{{ T "readingTime" $.ReadingTime }}</span>
- </div>
- {{ end }}
-
- {{ if not (eq $pageTheme "hero") }}
- {{ if or (eq $pageTheme "full") (eq $pageTheme "mega-full") }}
- {{- with $image -}}
-
- {{- $fullImage := $image -}}
- {{- if eq $pageTheme "full" -}}
- {{- with $.Resources.GetMatch "featured-image" -}}
- {{- if lt 1600 .Width -}}
- {{- $fullImage = (.Resize "1600x q100").Permalink -}}
- {{- else -}}
- {{- $fullImage = .Permalink -}}
- {{- end -}}
- {{- end -}}
- {{- end -}}
+ {{ if not (eq $pageTheme "hero") }}
+ {{ if or (eq $pageTheme "full") (eq $pageTheme "mega-full") }}
+ {{- with $image -}}
- <div class="featured-image" style="background-image: url('{{ $fullImage }}');">
+ {{- $fullImage := $image -}}
+ {{- if eq $pageTheme "full" -}}
+ {{- with $.Resources.GetMatch "featured-image" -}}
+ {{- if lt 1600 .Width -}}
+ {{- $fullImage = (.Resize "1600x q100").Permalink -}}
+ {{- else -}}
+ {{- $fullImage = .Permalink -}}
{{- end -}}
{{- end -}}
- <div class="post-title">
-
- <div class="post-all-meta">
- {{ partial "breadcrumbs.html" . | safeHTML }}
- <h1 class="single-title 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="svg-icon icon-folder"></i>%v</a>` $category.RelPermalink $category.Title) -}}
- {{- end -}}
- {{- with delimit $categories "&nbsp;" -}}
- <span class="post-category">
- {{ . }}
- </span>
- {{- end -}}
- {{ if ne $viewCounter nil}}
- <span class="post-meta-views tag-none-display" id="views_container">
- <i class="svg-icon icon-eye"></i><span id="views_value" style="margin-right: 0">Нет</span> просмотров</span>
- </span>
- {{- end -}}
- {{- with $.Site.Params.dateformat | default "2006-01-02" | $.PublishDate.Format -}}
- {{- $timeAgoDate:= $.Site.Params.TimeAgo.DateFormat | default "2006-01-02" | $.PublishDate.Format -}}
- <span class="post-meta-date">
- <i class="svg-icon icon-clock"></i><time class="timeago" datetime="{{ $timeAgoDate }}">{{ . }}</time>
- </span>
- {{- end -}}
- <span class="post-meta-words">
- <i class="svg-icon icon-pencil"></i>{{ T "wordCount" $.WordCount }}
- </span>
- <span class="post-meta-reading">
- <i class="svg-icon icon-stopwatch"></i>{{ T "readingTime" $.ReadingTime }}
- </span>
+ {{- end -}}
+
+ <div class="featured-image" style="background-image: url('{{ $fullImage }}');">
+ {{- end -}}
+ {{- end -}}
+ <div class="post-title">
+
+ <div class="post-all-meta">
+ {{ partial "breadcrumbs.html" . | safeHTML }}
+ <h1 class="single-title 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="svg-icon icon-folder"></i>%v</a>` $category.RelPermalink $category.Title) -}}
+ {{- end -}}
+ {{- with delimit $categories "&nbsp;" -}}
+ <span class="post-category">
+ {{ . }}
+ </span>
+ {{- end -}}
+ {{ if ne $viewCounter nil}}
+ <span class="post-meta-views tag-none-display" id="views_container">
+ <i class="svg-icon icon-eye"></i><span id="views_value" style="margin-right: 0">Нет</span> просмотров</span>
+ </span>
+ {{- end -}}
+ {{- with $.Site.Params.dateformat | default "2006-01-02" | $.PublishDate.Format -}}
+ {{- $timeAgoDate:= $.Site.Params.TimeAgo.DateFormat | default "2006-01-02" | $.PublishDate.Format -}}
+ <span class="post-meta-date">
+ <i class="svg-icon icon-clock"></i><time class="timeago" datetime="{{ $timeAgoDate }}">{{ . }}</time>
+ </span>
+ {{- end -}}
+ <span class="post-meta-words">
+ <i class="svg-icon icon-pencil"></i>{{ T "wordCount" $.WordCount }}
+ </span>
+ <span class="post-meta-reading">
+ <i class="svg-icon icon-stopwatch"></i>{{ T "readingTime" $.ReadingTime }}
+ </span>
+ </div>
</div>
</div>
+
</div>
+ {{ if or (eq $pageTheme "full") (eq $pageTheme "mega-full") }}
+ {{- with $image -}}
</div>
+ {{- end -}}
+ {{- end -}}
+ {{- end -}}
- {{ if or (eq $pageTheme "full") (eq $pageTheme "mega-full") }}
- {{- with $image -}}
</div>
- {{- end -}}
- {{- end -}}
- {{- end -}}
- </div>
+ <div class="article-post toc-start">
- <article class="single toc-start">
+ <div class="content-block content-block-first content-block-position">
- <div class="content-block content-block-first content-block-position">
+ <div class="post single">
- <div class="post">
+ {{- if and (or (eq $pageTheme "classic") (eq $pageTheme "wide")) (not $pageImageHidden) -}}
+ {{- with $image -}}
+ <div class="image-theme-{{ $pageTheme }}">
+ <img src="{{ $image }}" style="width: 100%">
+ </div>
+ {{- end -}}
+ {{- end -}}
- {{- if and (or (eq $pageTheme "classic") (eq $pageTheme "wide")) (not $pageImageHidden) -}}
- {{- with $image -}}
- <div class="image-theme-{{ $pageTheme }}">
- <img src="{{ $image }}" style="width: 100%">
- </div>
- {{- end -}}
- {{- end -}}
+ {{- /* Static TOC */ -}}
+ {{- if ne $toc.enable false -}}
+ <div class="details toc" id="toc-static" data-kept="{{ if $toc.keepStatic }}true{{ end }}">
+ <div class="details-summary toc-title">
+ <span>{{ T "contents" }}</span>
+ </div>
+ <div class="details-content toc-content" id="toc-content-static">
+ {{- dict "Content" .TableOfContents "Ruby" $params.ruby "Fraction" $params.fraction | partial "function/content.html" | safeHTML -}}
+ </div>
+ </div>
+ {{- end -}}
- {{- /* Static TOC */ -}}
- {{- if ne $toc.enable false -}}
- <div class="details toc" id="toc-static" data-kept="{{ if $toc.keepStatic }}true{{ end }}">
- <div class="details-summary toc-title">
- <span>{{ T "contents" }}</span>
- </div>
- <div class="details-content toc-content" id="toc-content-static">
- {{- dict "Content" .TableOfContents "Ruby" $params.ruby "Fraction" $params.fraction | partial "function/content.html" | safeHTML -}}
- </div>
- </div>
- {{- end -}}
+ {{- /* Content */ -}}
+
+ {{- with .Site.Params.dateformat | default "2006-01-02" | .Lastmod.Format -}}
+ {{- $updateDate := . -}}
+ {{- if not (eq . ($.Site.Params.dateformat | default "2006-01-02" | $.PublishDate.Format)) -}}
+ {{- with $params.upd -}}
+ <p class="is-style-explanation">
+ <b>{{- dict "Date" $updateDate | T "updatedOnDate" -}}:</b> {{ $params.upd }}
+ </p>
+ {{- else -}}
+ <div style="margin: 20px 0 20px 0;">
+ <span class="post-update">
+ <b>{{- dict "Date" . | T "updatedOnDate" -}}</b>
+ </span>
+ </div>
+ {{- end -}}
+ {{- end -}}
+ {{- end -}}
- {{- /* Content */ -}}
-
- {{- with .Site.Params.dateformat | default "2006-01-02" | .Lastmod.Format -}}
- {{- $updateDate := . -}}
- {{- if not (eq . ($.Site.Params.dateformat | default "2006-01-02" | $.PublishDate.Format)) -}}
- {{- with $params.upd -}}
- <p class="is-style-explanation">
- <b>{{- dict "Date" $updateDate | T "updatedOnDate" -}}:</b> {{ $params.upd }}
- </p>
- {{- else -}}
- <div style="margin: 20px 0 20px 0;">
- <span class="post-update">
- <b>{{- dict "Date" . | T "updatedOnDate" -}}</b>
- </span>
- </div>
- {{- end -}}
- {{- end -}}
- {{- end -}}
+ {{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction | partial "function/content.html" | safeHTML -}}
- {{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction | partial "function/content.html" | safeHTML -}}
+ </div>
+ <footer>
+ <div class="post">
+ {{- /* Footer Post */ -}}
+ {{- partial "single/footer.html" . -}}
+ </div>
+ </footer>
+ </div>
+ <div id="toc-final"></div>
</div>
- <div class="post" style="padding-top: 0">
- {{- /* Footer Post */ -}}
- {{- partial "single/footer.html" . -}}
+ </article>
+
+ <div class="article-post">
+ <div class="content-block content-block-position">
+ <div class="post">
+ тест
</div>
</div>
- <div id="toc-final"></div>
- </article>
+ </div>
+
{{- $comment := .Site.Params.Comment -}}
{{- if ($params.comment.enable | default $comment.enable) -}}
diff --git a/layouts/shortcodes/split-post.html b/layouts/shortcodes/split-post.html
index 4b0c4e5..0c569e8 100644
--- a/layouts/shortcodes/split-post.html
+++ b/layouts/shortcodes/split-post.html
@@ -1,4 +1,4 @@
</div>
-<div class="split-post">
+<div class="split-post single">
{{ .Inner | $.Page.RenderString }}
-</div><div class="post"> \ No newline at end of file
+</div><div class="post single"> \ No newline at end of file
diff --git a/layouts/shortcodes/split-wide-end.html b/layouts/shortcodes/split-wide-end.html
index eb86fb4..ff90a61 100644
--- a/layouts/shortcodes/split-wide-end.html
+++ b/layouts/shortcodes/split-wide-end.html
@@ -1,2 +1,3 @@
-</div>
-<div class="content-block content-block-position"><div class="post"> \ No newline at end of file
+{{ $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 9402e13..f12bd01 100644
--- a/layouts/shortcodes/split-wide.html
+++ b/layouts/shortcodes/split-wide.html
@@ -1 +1 @@
-</div></div><div class="content-break content-block-position"> \ No newline at end of file
+</div></div></div></article><article><div class="article-post"><div class="content-break content-block-position"> \ No newline at end of file