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/partials')
-rw-r--r--layouts/partials/assets.html31
-rw-r--r--layouts/partials/footer.html6
-rw-r--r--layouts/partials/function/content.html4
-rw-r--r--layouts/partials/function/fontawesome.html14
-rw-r--r--layouts/partials/head/link.html15
-rw-r--r--layouts/partials/head/seo.html49
-rw-r--r--layouts/partials/header.html52
-rw-r--r--layouts/partials/home/profile.html8
-rw-r--r--layouts/partials/plugin/image.html40
-rw-r--r--layouts/partials/plugin/share.html116
-rw-r--r--layouts/partials/plugin/timeago.html19
-rw-r--r--layouts/partials/rss/item-turbo.html4
-rw-r--r--layouts/partials/rss/item.html4
-rw-r--r--layouts/partials/single/footer.html36
14 files changed, 178 insertions, 220 deletions
diff --git a/layouts/partials/assets.html b/layouts/partials/assets.html
index 10db3d6..53729a1 100644
--- a/layouts/partials/assets.html
+++ b/layouts/partials/assets.html
@@ -34,10 +34,6 @@
{{- end -}}
{{- end -}}
-{{- /* lazysizes */ -}}
-{{- $source := $cdn.lazysizesJS | default "lib/lazysizes/lazysizes.min.js" -}}
-{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
-
{{- /* twemoji */ -}}
{{- if $params.twemoji -}}
{{- $source := $cdn.twemojiJS | default "lib/twemoji/twemoji.min.js" -}}
@@ -45,19 +41,6 @@
{{- $config = dict "twemoji" true | merge $config -}}
{{- end -}}
-{{- /* lightgallery.js */ -}}
-{{- if $params.lightgallery -}}
- {{- $source := $cdn.lightgalleryCSS | default "lib/lightgallery/lightgallery.min.css" -}}
- {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
- {{- $source := $cdn.lightgalleryJS | default "lib/lightgallery/lightgallery.min.js" -}}
- {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
- {{- $source := $cdn.lightgalleryThumbnailJS | default "lib/lightgallery/lg-thumbnail.min.js" -}}
- {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
- {{- $source := $cdn.lightgalleryZoomJS | default "lib/lightgallery/lg-zoom.min.js" -}}
- {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
- {{- $config = dict "selector" ".lightgallery" "speed" 400 "hideBarsDelay" 2000 "thumbnail" true "exThumbImage" "data-thumbnail" "thumbWidth" 80 "thumbContHeight" 80 "actualSize" false | dict "lightGallery" | merge $config -}}
-{{- end -}}
-
{{- $code := $params.code | default dict -}}
{{- $config = cond (ne $code.maxShownLines nil) $code.maxShownLines 10 | dict "maxShownLines" | dict "code" | merge $config -}}
@@ -74,14 +57,6 @@
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- end -}}
-{{- /* TypeIt */ -}}
-{{- with (.Scratch.Get "this").typeitMap -}}
- {{- $typeit := $.Site.Params.typeit -}}
- {{- $source := $cdn.typeitJS | default "lib/typeit/typeit.min.js" -}}
- {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}}
- {{- $config = dict "speed" $typeit.speed "cursorSpeed" $typeit.cursorSpeed "cursorChar" $typeit.cursorChar "duration" $typeit.duration "data" . | dict "typeit" | merge $config -}}
-{{- end -}}
-
{{- /* KaTeX */ -}}
{{- $math := $params.math -}}
{{- if eq $math true -}}
@@ -192,12 +167,6 @@
{{- dict "Source" "js/theme.min.js" "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $_ := (resources.Get "js/theme.min.js.map").RelPermalink -}}
-{{- /* Jquery script */ -}}
-{{- dict "Source" "js/jquery-3.5.1.min.js" "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
-{{- $_ := (resources.Get "js/jquery-3.5.1.min.map").RelPermalink -}}
-
-{{- partial "plugin/timeago.html" . -}}
-
{{- with (.Scratch.Get "this").scriptArr -}}
{{- delimit . "\n" | dict "Content" | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}}
{{- end -}}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 299bd5b..ad257ad 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -12,7 +12,7 @@
{{- if ne .Site.Params.footer.hugo false -}}
<div class="footer-line">
{{- $hugo := printf `<a href="https://gohugo.io/" target="_blank" rel="noopener noreffer" title="Hugo %v">Hugo</a>` hugo.Version -}}
- {{- $theme := .Scratch.Get "version" | printf `<a href="https://ublogger.netlify.app/?utm_source=%v&utm_medium=footer&utm_campaign=config&utm_term=%v" target="_blank" title="uBlogger %v"><i class="fas fa-pencil-alt fa-fw"></i> uBlogger</a>` $.Site.BaseURL (.Scratch.Get "version") -}}
+ {{- $theme := .Scratch.Get "version" | printf `<a href="https://ublogger.netlify.app/?utm_source=%v&utm_medium=footer&utm_campaign=config&utm_term=%v" target="_blank" title="uBlogger %v">uBlogger</a>` $.Site.BaseURL (.Scratch.Get "version") -}}
{{- dict "Hugo" $hugo "Theme" $theme | T "poweredBySome" | safeHTML }}
</div>
{{- end -}}
@@ -20,7 +20,7 @@
<div class="footer-line">
{{- /* Copyright year */ -}}
{{- if ne .Site.Params.footer.copyright false -}}
- <i class="far fa-copyright fa-fw"></i>
+ <i class="svg-icon icon-copyright"></i>
{{- with .Site.Params.footer.since -}}
<span>
{{- if lt . now.Year }}{{ . }} - {{ end }}{{ now.Year -}}
@@ -35,7 +35,7 @@
{{- if ne $authorName " " -}}
{{ $author := index .Site.Data.authors $authorName }}
{{- $authorLink := $author.link | default .Site.Home.RelPermalink -}}
- <span class="author" itemprop="copyrightHolder">&nbsp;<a href="{{ $authorLink }}" target="_blank">{{ $author.nickname }}</a></span>
+ <span class="author">&nbsp;<a href="{{ $authorLink }}" target="_blank">{{ $author.nickname }}</a></span>
{{- end -}}
{{- /* License */ -}}
diff --git a/layouts/partials/function/content.html b/layouts/partials/function/content.html
index fbc7731..5468c7a 100644
--- a/layouts/partials/function/content.html
+++ b/layouts/partials/function/content.html
@@ -9,10 +9,6 @@
{{- $content = partial "function/fraction.html" $content -}}
{{- end -}}
-{{- if .Fontawesome -}}
- {{- $content = partial "function/fontawesome.html" $content -}}
-{{- end -}}
-
{{- $content = partial "function/checkbox.html" $content -}}
{{- $content = partial "function/escape.html" $content -}}
diff --git a/layouts/partials/function/fontawesome.html b/layouts/partials/function/fontawesome.html
deleted file mode 100644
index 9d64c3d..0000000
--- a/layouts/partials/function/fontawesome.html
+++ /dev/null
@@ -1,14 +0,0 @@
-{{- /* Font Awesome */ -}}
-{{- /* :(far fa-circle): -> <i class="far fa-circle fa-fw"></i> */ -}}
-
-{{- $REin := ` (:\([\w- ]+?\):)` -}}
-{{- $REout := `&nbsp;$1` -}}
-{{- $content := replaceRE $REin $REout . -}}
-
-{{- $REin = `(:\([\w- ]+?\):) ` -}}
-{{- $REout = `$1&nbsp;` -}}
-{{- $content = replaceRE $REin $REout . -}}
-
-{{- $REin = `:\(([\w- ]+?)\):` -}}
-{{- $REout = `<i class="$1"></i>` -}}
-{{- return replaceRE $REin $REout $content -}}
diff --git a/layouts/partials/head/link.html b/layouts/partials/head/link.html
index 79eb8b7..31c7f81 100644
--- a/layouts/partials/head/link.html
+++ b/layouts/partials/head/link.html
@@ -8,6 +8,8 @@
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
+ <link rel="icon" type="image/png" sizes="192x192" href="/android-chrome-192x192.png">
+ <link rel="icon" type="image/png" sizes="512x512" href="/android-chrome-512x512.png">
{{- end -}}
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
{{- with .Site.Params.app.iconColor -}}
@@ -17,12 +19,6 @@
{{- end -}}
<link rel="canonical" href="{{ .Permalink }}" />
-{{- if .PrevInSection -}}
- <link rel="prev" href="{{ .PrevInSection.Permalink }}" />
-{{- end -}}
-{{- if .NextInSection -}}
- <link rel="next" href="{{ .NextInSection.Permalink }}" />
-{{- end -}}
{{- with .OutputFormats.Get "RSS" -}}
<link rel="alternate" href="{{ .RelPermalink }}" type="application/rss+xml" title="{{ $.Site.Title }}">
@@ -31,7 +27,7 @@
{{- /* Advertising */ -}}
{{- if .Site.Params.Advertising.Enable -}}
-{{- with .Site.Params.Advertising.Google -}}
+{{- with .Site.Params.Advertising.Google.Client -}}
<script data-ad-client="{{ . }}" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
{{- end -}}
{{- end -}}
@@ -47,11 +43,6 @@
{{- $style = dict "Context" . "ToCSS" $options | merge $style -}}
{{- partial "plugin/style.html" $style -}}
-{{- /* Font Awesome */ -}}
-{{- $source := $cdn.fontawesomeFreeCSS | default "lib/fontawesome-free/all.min.css" -}}
-{{- $style := dict "Source" $source "Fingerprint" $fingerprint -}}
-{{- partial "plugin/style.html" $style -}}
-
{{- /* Animate.css */ -}}
{{- $source := $cdn.animateCSS | default "lib/animate/animate.min.css" -}}
{{- $style := dict "Source" $source "Fingerprint" $fingerprint -}}
diff --git a/layouts/partials/head/seo.html b/layouts/partials/head/seo.html
index 2067721..894436d 100644
--- a/layouts/partials/head/seo.html
+++ b/layouts/partials/head/seo.html
@@ -16,6 +16,8 @@
<meta name="baidu-site-verification" content="{{ . }}" />
{{- end -}}
+
+
{{- /* Home SEO */ -}}
{{- if .IsHome -}}
<script type="application/ld+json">
@@ -35,18 +37,20 @@
{{- with .Site.Params.description -}}
"description": {{ . | safeHTML }},
{{- end -}}
- {{- $image := .Site.Params.seo.image -}}
- {{- with dict "Path" $image "Resources" .Resources | partial "function/resource.html" -}}
+ {{- $image := $params.featuredimagepreview | default $params.featuredimage -}}
+ {{- with .Resources.GetMatch "featured-image" -}}
+ {{- $image = .RelPermalink -}}
+ {{- end -}}
+ {{- with .Resources.GetMatch "featured-image-preview" -}}
+ {{- $image = .RelPermalink -}}
+ {{- end -}}
+ {{- with $image -}}
"image": {
"@type": "ImageObject",
"url": "{{ .Permalink }}",
"width": {{ .Width }},
"height": {{ .Height }}
},
- {{- else -}}
- {{- with $image -}}
- "image": "{{ . | absURL }}",
- {{- end -}}
{{- end -}}
{{- with .Site.Params.seo.thumbnailUrl -}}
{{- with dict "Path" . "Resources" $.Resources | partial "function/resource.html" -}}
@@ -122,29 +126,26 @@
{{- with .Site.Copyright -}}
"license": {{ . | safeHTML }},
{{- end -}}
- {{- $publisher := .Params.author | default .Site.Author.name | default (T "author") | dict "name" -}}
- {{- $publisher = $params.seo.publisher | default dict | merge $publisher -}}
+ {{- $publisherName := default .Site.Author.name | default " " -}}
+ {{ $publisher := index .Site.Data.authors $publisherName }}
"publisher": {
- "@type": "Organization",
- "name": {{ $publisher.name | safeHTML }}
- {{- $logo := $publisher.logoUrl -}}
- {{- with dict "Path" $logo "Resources" .Resources | partial "function/resource.html" -}}
- ,"logo": {
- "@type": "ImageObject",
- "url": "{{ .Permalink }}",
- "width": {{ .Width }},
- "height": {{ .Height }}
- }
- {{- else -}}
- {{- with $logo -}}
- ,"logo": "{{ . | absURL }}"
- {{- end -}}
+ "@type": "Person",
+ "name": {{ $publisher.full_name | safeHTML }}
+ {{- with $publisher.avatar -}}
+ , "image": [
+ {
+ "@type": "ImageObject",
+ "url": "{{ . }}"
+ }
+ ]
{{- end -}}
},
- {{- with .Params.author | default .Site.Author.name | default (T "author") -}}
+ {{- $authorName := $params.author | default .Site.Author.name | default " " -}}
+ {{ $author := index .Site.Data.authors $authorName }}
+ {{- with $author -}}
"author": {
"@type": "Person",
- "name": {{ . | safeHTML }}
+ "name": {{ .full_name | safeHTML }}
},
{{- end -}}
"description": {{ .Description | safeHTML }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index f321493..4087190 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -2,21 +2,23 @@
<header class="desktop" id="header-desktop">
<div class="header-wrapper">
<div class="header-title">
- <a href="{{ .Site.Home.RelPermalink }}" title="{{ .Site.Title }}" class="header-logo">
+ <a href="{{ .Site.Home.RelPermalink }}" title="{{ .Site.Title }}" class="header-logo logo-svg">
{{- with .Site.Params.header.title -}}
{{- with .logo -}}
{{- dict "Src" . "Class" "logo" | partial "plugin/image.html" -}}
{{- end -}}
+ {{- with .logoSvg }}
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 36" width="96" height="36" style="vertical-align: middle">
+ <style>tspan{white-space:pre}</style>
+ <path class="logo-svg" d="{{ . }}"/>
+ </svg>
+ {{- end -}}
{{- with .pre -}}
<span class="header-title-pre">{{ . | safeHTML }}</span>
{{- end -}}
- {{- if .typeit -}}
- {{- $id := dict "Content" .name "Scratch" $.Scratch | partial "function/id.html" -}}
- <span id="{{ $id }}" class="typeit"></span>
- {{- dict $id (slice $id) | dict "typeitMap" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}}
- {{- else -}}
- {{- .name -}}
- {{- end -}}
+
+ {{- .name -}}
+
{{- with .post -}}
<span class="header-title-post">{{ . | safeHTML }}</span>
{{- end -}}
@@ -42,7 +44,6 @@
{{- if .Site.IsMultiLingual -}}
<a href="javascript:void(0);" class="menu-item language" title="{{ T "selectLanguage" }}">
{{- .Language.LanguageName -}}
- <i class="fas fa-chevron-right fa-fw"></i>
<select class="language-select" id="language-select-desktop" onchange="location = this.value;">
{{- if eq .Kind "404" -}}
{{- range .Sites -}}
@@ -65,18 +66,18 @@
<span class="menu-item search" id="search-desktop">
<input type="text" placeholder="{{ .Site.Params.search.placeholder | default (T `searchPlaceholder`) }}" id="search-input-desktop">
<a href="javascript:void(0);" class="search-button search-toggle" id="search-toggle-desktop" title="{{ T `search` }}">
- <i class="fas fa-search fa-fw"></i>
+ <span class="svg-icon icon-search"></span>
</a>
<a href="javascript:void(0);" class="search-button search-clear" id="search-clear-desktop" title="{{ T `clear` }}">
- <i class="fas fa-times-circle fa-fw"></i>
+ <span class="svg-icon icon-cancel"></span>
</a>
<span class="search-button search-loading" id="search-loading-desktop">
- <i class="fas fa-spinner fa-fw fa-spin"></i>
+ <span class="svg-icon icon-loading"></span>
</span>
</span>
{{- end -}}
<a href="javascript:void(0);" class="menu-item theme-switch" title="{{ T "switchTheme" }}">
- <i class="fas fa-adjust fa-fw"></i>
+ <span class="svg-icon icon-moon"></span>
</a>
</div>
</div>
@@ -93,16 +94,18 @@
{{- with .logo -}}
{{- dict "Src" . "Class" "logo" | partial "plugin/image.html" -}}
{{- end -}}
+ {{- with .logoSvg }}
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 36" width="96" height="36" style="vertical-align: middle">
+ <style>tspan{white-space:pre}</style>
+ <path class="logo-svg" d="{{ . }}"/>
+ </svg>
+ {{- end -}}
{{- with .pre -}}
<span class="header-title-pre">{{ . | safeHTML }}</span>
{{- end -}}
- {{- if .typeit -}}
- {{- $id := dict "Content" .name "Scratch" $.Scratch | partial "function/id.html" -}}
- <span id="{{ $id }}" class="typeit"></span>
- {{- dict $id (slice $id) | dict "typeitMap" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}}
- {{- else -}}
- {{- .name -}}
- {{- end -}}
+
+ {{- .name -}}
+
{{- with .post -}}
<span class="header-title-post">{{ . | safeHTML }}</span>
{{- end -}}
@@ -121,13 +124,13 @@
<div class="search mobile" id="search-mobile">
<input type="text" placeholder="{{ .Site.Params.search.placeholder | default (T `searchPlaceholder`) }}" id="search-input-mobile">
<a href="javascript:void(0);" class="search-button search-toggle" id="search-toggle-mobile" title="{{ T `search` }}">
- <i class="fas fa-search fa-fw"></i>
+ <span class="svg-icon icon-search"></span>
</a>
<a href="javascript:void(0);" class="search-button search-clear" id="search-clear-mobile" title="{{ T `clear` }}">
- <i class="fas fa-times-circle fa-fw"></i>
+ <span class="svg-icon icon-cancel"></span>
</a>
<span class="search-button search-loading" id="search-loading-mobile">
- <i class="fas fa-spinner fa-fw fa-spin"></i>
+ <span class="svg-icon icon-loading"></span>
</span>
</div>
<a href="javascript:void(0);" class="search-cancel" id="search-cancel-mobile">
@@ -146,12 +149,11 @@
</a>
{{- end -}}
<a href="javascript:void(0);" class="menu-item theme-switch" title="{{ T "switchTheme" }}">
- <i class="fas fa-adjust fa-fw"></i>
+ <span class="svg-icon icon-moon"></span>
</a>
{{- if .Site.IsMultiLingual -}}
<a href="javascript:void(0);" class="menu-item" title="{{ T "selectLanguage" }}">
{{- .Language.LanguageName -}}
- <i class="fas fa-chevron-right fa-fw"></i>
<select class="language-select" onchange="location = this.value;">
{{- if eq .Kind "404" -}}
{{- range .Sites -}}
diff --git a/layouts/partials/home/profile.html b/layouts/partials/home/profile.html
index 8b1c49e..de234bc 100644
--- a/layouts/partials/home/profile.html
+++ b/layouts/partials/home/profile.html
@@ -31,13 +31,7 @@
{{- with $profile.subtitle -}}
<div class="home-subtitle">
- {{- if $profile.typeit -}}
- {{- $id := dict "Content" . "Scratch" $.Scratch | partial "function/id.html" -}}
- <div id="{{ $id }}" class="typeit"></div>
- {{- dict $id (slice $id) | dict "typeitMap" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}}
- {{- else -}}
- {{- . | safeHTML -}}
- {{- end -}}
+ {{- . | safeHTML -}}
</div>
{{- end -}}
diff --git a/layouts/partials/plugin/image.html b/layouts/partials/plugin/image.html
index 5a7f9d8..3a98b21 100644
--- a/layouts/partials/plugin/image.html
+++ b/layouts/partials/plugin/image.html
@@ -1,40 +1,22 @@
-{{- /* lazysizes and lightgallery.js */ -}}
{{- $src := .Src -}}
{{- with dict "Path" .Src "Resources" .Resources | partial "function/resource.html" -}}
{{- $src = .RelPermalink -}}
{{- end -}}
-{{- $small := .SrcSmall | default $src -}}
-{{- with dict "Path" .SrcSmall "Resources" .Resources | partial "function/resource.html" -}}
- {{- $small = .RelPermalink -}}
-{{- end -}}
-
-{{- $large := .SrcLarge | default $src -}}
-{{- with dict "Path" .SrcLarge "Resources" .Resources | partial "function/resource.html" -}}
- {{- $large = .RelPermalink -}}
-{{- end -}}
-
{{- $alt := .Alt | default $src -}}
-{{- $loading := resources.Get "svg/loading.svg" | minify -}}
-<div style="text-align: center">
+
{{- if .Linked -}}
- <a target="_blank" class="lightgallery" href="{{ $large | safeURL }}" title="{{ .Title | default $alt }}" data-thumbnail="{{ $small | safeURL }}"{{ with .Caption }} data-sub-html="<h2>{{ . }}</h2>{{ with $.Title }}<p>{{ . }}</p>{{ end }}"{{ end }}{{ with .Rel }} rel="{{ . }}"{{ end }}>
- <img
- class="lazyload{{ with .Class }} {{ . }}{{ end }}"
- src="{{ $loading.RelPermalink }}"
- data-src="{{ .Src | safeURL }}"
- data-srcset="{{ $small | safeURL }}, {{ .Src | safeURL }} 1.5x, {{ $large | safeURL }} 1.6x"
+ <a target="_blank" href="{{ .Src | safeURL }}" title="{{ .Title | default $alt }}" {{ with .Rel }} rel="{{ . }}"{{ end }}>
+ <img loading="lazy" decoding="async"
data-sizes="auto"
- alt="{{ $alt }}"{{ with .Height }} height="{{ . }}"{{ end }}{{ with .Width }} width="{{ . }}"{{ end }} />
+ src="{{ .Src | safeURL }}"
+ alt="{{ $alt }}"{{ with .Height }} height="{{ . }}"{{ end }}{{ with .Width }} width="{{ . }}"{{ end }}
+ />
</a>
{{- else -}}
- <img
- class="lazyload{{ with .Class }} {{ . }}{{ end }}"
- src="{{ $loading.RelPermalink }}"
- data-src="{{ .Src | safeURL }}"
- data-srcset="{{ $small | safeURL }}, {{ .Src | safeURL }} 1.5x, {{ $large | safeURL }} 1.6x"
- data-sizes="auto"
- alt="{{ $alt }}"
- title="{{ .Title | default $alt }}"{{ with .Height }} height="{{ . }}"{{ end }}{{ with .Width }} width="{{ . }}"{{ end }} />
+ <img loading="lazy" decoding="async"
+ src="{{ .Src | safeURL }}"
+ alt="{{ $alt }}"
+ title="{{ .Title | default $alt }}"{{ with .Height }} height="{{ . }}"{{ end }}{{ with .Width }} width="{{ . }}"{{ end }}
+ />
{{- end -}}
-</div> \ No newline at end of file
diff --git a/layouts/partials/plugin/share.html b/layouts/partials/plugin/share.html
index 73c32b0..b32ff0f 100644
--- a/layouts/partials/plugin/share.html
+++ b/layouts/partials/plugin/share.html
@@ -1,200 +1,262 @@
{{- $share := (.Scratch.Get "params").share | default dict -}}
{{- if $share.enable -}}
-
{{- /* 000: Telegram */ -}}
{{- if $share.Telegram -}}
- <a class="share-icon share-telegram" href="javascript:void(0);" title="{{ T `shareOn` }} Telegram" data-sharer="telegram" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Site.Params.Social.Telegram }} data-via="{{ . }}"{{ end }}{{ with .Params.tags }} data-hashtags="{{ delimit . `,` }}"{{ end }}>
- {{- dict "Class" "fab fa-telegram fa-fw" | partial "plugin/icon.html" -}}
- </a>
+ <div class="share-link">
+ <a class="share-icon share-telegram" href="javascript:void(0);" title="{{ T `shareOn` }} Telegram" data-sharer="telegram" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Site.Params.Social.Telegram }} data-via="{{ . }}"{{ end }}{{ with .Params.tags }} data-hashtags="{{ delimit . `,` }}"{{ end }}>
+ {{- dict "Class" "svg-social-icon icon-telegram" | partial "plugin/icon.html" -}}
+ </a>
+ </div>
{{- end -}}
{{- /* 001: Twitter */ -}}
{{- if $share.Twitter -}}
+<div class="share-link">
<a class="share-icon share-twitter" href="javascript:void(0);" title="{{ T `shareOn` }} Twitter" data-sharer="twitter" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Site.Params.Social.Twitter }} data-via="{{ . }}"{{ end }}{{ with .Params.tags }} data-hashtags="{{ delimit . `,` }}"{{ end }}>
- {{- dict "Class" "fab fa-twitter fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-twitter" | partial "plugin/icon.html" -}}
</a>
+</div>
{{- end -}}
{{- /* 002: Facebook */ -}}
{{- if $share.Facebook -}}
+ <div class="share-link">
<a class="share-icon share-facebook" href="javascript:void(0);" title="{{ T `shareOn` }} Facebook" data-sharer="facebook" data-url="{{ .Permalink }}"{{ with .Params.tags }} data-hashtag="{{ index . 0 }}"{{ end }}>
- {{- dict "Class" "fab fa-facebook-square fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-facebook" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 003: Linkedin */ -}}
{{- if $share.Linkedin -}}
+ <div class="share-link">
<a class="share-icon share-linkedin" href="javascript:void(0);" title="{{ T `shareOn` }} Linkedin" data-sharer="linkedin" data-url="{{ .Permalink }}">
- {{- dict "Class" "fab fa-linkedin fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-linkedin" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 004: WhatsApp */ -}}
{{- if $share.Whatsapp -}}
+ <div class="share-link">
<a class="share-icon share-whatsapp" href="javascript:void(0);" title="{{ T `shareOn` }} WhatsApp" data-sharer="whatsapp" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-web>
- {{- dict "Class" "fab fa-whatsapp fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-whatsapp" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 005: Viber */ -}}
{{- if $share.Viber -}}
+ <div class="share-link">
<a class="share-icon share-viber" href="javascript:void(0);" title="{{ T `shareOn` }} Viber" data-sharer="viber" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
- {{- dict "Class" "fab fa-viber fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-viber" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 006: Pinterest */ -}}
{{- if $share.Pinterest -}}
+ <div class="share-link">
<a class="share-icon share-pinterest" href="javascript:void(0);" title="{{ T `shareOn` }} Pinterest" data-sharer="pinterest" data-url="{{ .Permalink }}"{{ with .Description }} data-description="{{ . }}"{{ end }}{{ with .Params.featuredImage }} data-image="{{ . }}"{{ end }}>
- {{- dict "Class" "fab fa-pinterest fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-pinterest" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 007: Tumblr */ -}}
{{- if $share.Tumblr -}}
+ <div class="share-link">
<a class="share-icon share-tumblr" href="javascript:void(0);" title="{{ T `shareOn` }} Tumblr" data-sharer="tumblr" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Description }} data-caption="{{ . }}"{{ end }}{{ with .Params.tags }} data-tags="{{ delimit . `,` }}"{{ end }}>
- {{- dict "Class" "fab fa-tumblr fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-tumblr" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 009: Reddit */ -}}
{{- if $share.Reddit -}}
+ <div class="share-link">
<a class="share-icon share-reddit" href="javascript:void(0);" title="{{ T `shareOn` }} Reddit" data-sharer="reddit" data-url="{{ .Permalink }}">
- {{- dict "Class" "fab fa-reddit fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-reddit" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 010: VK */ -}}
{{- if $share.VK -}}
+ <div class="share-link">
<a class="share-icon share-vk" href="javascript:void(0);" title="{{ T `shareOn` }} VK" data-sharer="vk" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Description }} data-caption="{{ . }}"{{ end }}{{ with .Params.featuredImage }} data-image="{{ . }}"{{ end }}>
- {{- dict "Class" "fab fa-vk fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-vk" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 011: Buffer */ -}}
{{- if $share.Buffer -}}
+ <div class="share-link">
<a class="share-icon share-buffer" href="javascript:void(0);" title="{{ T `shareOn` }} Buffer" data-sharer="buffer" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Site.Params.Social.Twitter }} data-via="{{ . }}"{{ end }}{{ with .Params.featuredImage }} data-picture="{{ . }}"{{ end }}>
- {{- dict "Class" "fab fa-buffer fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-buffer" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 012: Xing */ -}}
{{- if $share.Xing -}}
+ <div class="share-link">
<a class="share-icon share-xing" href="javascript:void(0);" title="{{ T `shareOn` }} Xing" data-sharer="xing" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
- {{- dict "Class" "fab fa-xing fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-xing" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 013: Line */ -}}
{{- if $share.Line -}}
+<div class="share-link">
<a class="share-icon share-line" href="javascript:void(0);" title="{{ T `shareOn` }} Line" data-sharer="line" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
{{- dict "Simpleicons" "line" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
</a>
+</div>
{{- end -}}
{{- /* 014: Instapaper */ -}}
{{- if $share.Instapaper -}}
+<div class="share-link">
<a class="share-icon share-instapaper" href="javascript:void(0);" title="{{ T `shareOn` }} Instapaper" data-sharer="instapaper" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-description="{{ .Description }}">
{{- dict "Simpleicons" "instapaper" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
</a>
+</div>
{{- end -}}
{{- /* 015: Pocket */ -}}
{{- if $share.Pocket -}}
+ <div class="share-link">
<a class="share-icon share-pocket" href="javascript:void(0);" title="{{ T `shareOn` }} Pocket" data-sharer="pocket" data-url="{{ .Permalink }}">
- {{- dict "Class" "fab fa-get-pocket fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-pocket" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 016: Digg */ -}}
{{- if $share.Digg -}}
+ <div class="share-link">
<a class="share-icon share-digg" href="javascript:void(0);" title="{{ T `shareOn` }} Digg" data-sharer="digg" data-url="{{ .Permalink }}">
- {{- dict "Class" "fab fa-digg fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-digg" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 017: StumbleUpon */ -}}
{{- if $share.Stumbleupon -}}
+ <div class="share-link">
<a class="share-icon share-stumbleupon" href="javascript:void(0);" title="{{ T `shareOn` }} StumbleUpon" data-sharer="stumbleupon" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
- {{- dict "Class" "fab fa-stumbleupon fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-stumbleupon" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 018: Flipboard */ -}}
{{- if $share.Flipboard -}}
+ <div class="share-link">
<a class="share-icon share-flipboard" href="javascript:void(0);" title="{{ T `shareOn` }} Flipboard" data-sharer="flipboard" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
- {{- dict "Class" "fab fa-flipboard fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-flipboard" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 019: 微博 */ -}}
{{- if $share.Weibo -}}
+ <div class="share-link">
<a class="share-icon share-weibo" href="javascript:void(0);" title="{{ T `shareOn` }} 微博" data-sharer="weibo" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Params.featuredImage }} data-image="{{ . }}"{{ end }}{{ with .Site.Params.Social.Weibo }} data-ralateuid="{{ . }}"{{ end }}>
- {{- dict "Class" "fab fa-weibo fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-weibo" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 020: 人人 */ -}}
{{- if $share.Renren -}}
+ <div class="share-link">
<a class="share-icon share-renren" href="javascript:void(0);" title="{{ T `shareOn` }} 人人" data-sharer="renren" data-url="{{ .Permalink }}">
- {{- dict "Class" "fab fa-renren fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-renren" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 021: Myspace */ -}}
{{- if $share.Myspace -}}
+ <div class="share-link">
<a class="share-icon share-myspace" href="javascript:void(0);" title="{{ T `shareOn` }} Myspace" data-sharer="myspace" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-description="{{ .Description }}">
{{- dict "Simpleicons" "myspace" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 022: Blogger */ -}}
{{- if $share.Blogger -}}
+ <div class="share-link">
<a class="share-icon share-blogger" href="javascript:void(0);" title="{{ T `shareOn` }} Blogger" data-sharer="blogger" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-description="{{ .Description }}">
- {{- dict "Class" "fab fa-blogger fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-blogger" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 023: 百度 */ -}}
{{- if $share.Baidu -}}
+ <div class="share-link">
<a class="share-icon share-baidu" href="javascript:void(0);" title="{{ T `shareOn` }} 百度" data-sharer="baidu" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
{{- dict "Simpleicons" "baidu" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 024: OK.RU */ -}}
{{- if $share.Odnoklassniki -}}
+ <div class="share-link">
<a class="share-icon share-ok" href="javascript:void(0);" title="{{ T `shareOn` }} OK.RU" data-sharer="okru" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
- {{- dict "Class" "fab fa-odnoklassniki fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-odnoklassniki" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 025: Evernote */ -}}
{{- if $share.Evernote -}}
+ <div class="share-link">
<a class="share-icon share-evernote" href="javascript:void(0);" title="{{ T `shareOn` }} Evernote" data-sharer="evernote" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
- {{- dict "Class" "fab fa-evernote fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-evernote" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 026: Skype */ -}}
{{- if $share.Skype -}}
+ <div class="share-link">
<a class="share-icon share-skype" href="javascript:void(0);" title="{{ T `shareOn` }} Skype" data-sharer="skype" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
- {{- dict "Class" "fab fa-skype fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-skype" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 027: Trello */ -}}
{{- if $share.Trello -}}
+ <div class="share-link">
<a class="share-icon share-trello" href="javascript:void(0);" title="{{ T `shareOn` }} Trello" data-sharer="trello" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-description="{{ .Description }}">
- {{- dict "Class" "fab fa-trello fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-trello" | partial "plugin/icon.html" -}}
</a>
+ </div>
{{- end -}}
{{- /* 028: Mix */ -}}
{{- if $share.Mix -}}
+ <div class="share-link">
<a class="share-icon share-mix" href="//mix.com/add?url={{ .Permalink }}&amp;description={{ .Title }}" target="_blank" title="{{ T `shareOn` }} Mix">
- {{- dict "Class" "fab fa-mix fa-fw" | partial "plugin/icon.html" -}}
+ {{- dict "Class" "svg-social-icon icon-mix" | partial "plugin/icon.html" -}}
</a>
+ </div>
+ {{- end -}}
+
+ {{- /* 029: Hacker News */ -}}
+ {{- if $share.Hackernews -}}
+ <a class="share-icon share-hackernews" href="javascript:void(0);" title="{{ T `shareOn` }} Hacker News" data-sharer="hackernews" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
+ {{- dict "Class" "svg-social-icon icon-hacker-news" | partial "plugin/icon.html" -}}
+ </a>
{{- end -}}
{{- end -}}
diff --git a/layouts/partials/plugin/timeago.html b/layouts/partials/plugin/timeago.html
deleted file mode 100644
index c8e6399..0000000
--- a/layouts/partials/plugin/timeago.html
+++ /dev/null
@@ -1,19 +0,0 @@
-{{- $fingerprint := .Scratch.Get "fingerprint" -}}
-{{- $timeAgoLang := .Site.Params.TimeAgo.Lang -}}
-{{- $timeAgoEnable := .Site.Params.TimeAgo.Enable -}}
-
-{{- if $timeAgoEnable }}
-{{- /* Timeago script */ -}}
-{{- dict "Source" "js/timeago.min.js" "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
-{{- $_ := (resources.Get "js/timeago.min.js.map").RelPermalink -}}
-
-{{- if $timeAgoLang }}
-{{- /* Timeago language script */ -}}
-{{- dict "Source" (printf "js/timeago/timeago.%v.min.js" $timeAgoLang) "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
-{{- $_ := (resources.Get (printf "js/timeago/timeago.%v.min.js.map" $timeAgoLang)).RelPermalink -}}
-{{- end -}}
-
-{{- /* Timeago starter script */ -}}
-{{- dict "Source" "js/timeago_starter.min.js" "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
-{{- $_ := (resources.Get "js/timeago_starter.min.js.map").RelPermalink -}}
-{{- end -}} \ No newline at end of file
diff --git a/layouts/partials/rss/item-turbo.html b/layouts/partials/rss/item-turbo.html
index ec31841..03e2d56 100644
--- a/layouts/partials/rss/item-turbo.html
+++ b/layouts/partials/rss/item-turbo.html
@@ -24,10 +24,10 @@
{{- end -}}
{{- $content := .Page.Description -}}
{{- if $params.rssFullText -}}
- {{- $content = dict "Content" .Page.Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" -}}
+ {{- $content = dict "Content" .Page.Content "Ruby" $params.ruby "Fraction" $params.fraction | partial "function/content.html" -}}
{{- else -}}
{{- with .Page.Summary -}}
- {{- $content = dict "Content" . "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" -}}
+ {{- $content = dict "Content" . "Ruby" $params.ruby "Fraction" $params.fraction | partial "function/content.html" -}}
{{- end -}}
{{- end -}}
{{- $content | replaceRE `<figure[^>]*>.*</figure>` "" | replaceRE `<img[^>]*( /)?>` "" | safeHTML -}}
diff --git a/layouts/partials/rss/item.html b/layouts/partials/rss/item.html
index ea08a6e..3081ee9 100644
--- a/layouts/partials/rss/item.html
+++ b/layouts/partials/rss/item.html
@@ -24,10 +24,10 @@
{{- end -}}
{{- $content := .Page.Description -}}
{{- if $params.rssFullText -}}
- {{- $content = dict "Content" .Page.Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" -}}
+ {{- $content = dict "Content" .Page.Content "Ruby" $params.ruby "Fraction" $params.fraction | partial "function/content.html" -}}
{{- else -}}
{{- with .Page.Summary -}}
- {{- $content = dict "Content" . "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" -}}
+ {{- $content = dict "Content" . "Ruby" $params.ruby "Fraction" $params.fraction | partial "function/content.html" -}}
{{- end -}}
{{- end -}}
{{- $content | replaceRE `<figure[^>]*>.*</figure>` "" | replaceRE `<img[^>]*( /)?>` "" | safeHTML -}}
diff --git a/layouts/partials/single/footer.html b/layouts/partials/single/footer.html
index d37d5eb..9cc7f11 100644
--- a/layouts/partials/single/footer.html
+++ b/layouts/partials/single/footer.html
@@ -1,30 +1,15 @@
{{- $params := .Scratch.Get "params" -}}
+{{- $pageTheme := $params.Theme | default .Site.Params.Page.theme | default "classic" -}}
+{{ $button := $params.button}}
+{{ if eq $button.enable true }}
<div class="post-info-share">
- <span>
- {{- partial "plugin/share.html" . -}}
- </span>
+ <a href="{{ $button.link }}" class="button button-big button-red">{{ $button.text }}</a>
</div>
-
-{{- $authorName := $params.author | default .Site.Author.name | default " " -}}
-{{- if not (eq $authorName " ") -}}
-{{ $author := index .Site.Data.authors $authorName }}
-<div class="footer-post-author" {{- if not $author.ps -}} style="border-radius: 10px;border-bottom: solid 2px #ececec" {{- end -}}>
- <div class="author-avatar"><a href="{{ with $author.link }} {{- . | safeHTML -}}{{ end }}" target="_blank"><img alt="" src="{{ with $author.avatar }} {{- . | safeHTML -}}{{ end }}" border="0"></a></div>
- <div class="author-info">
- <div class="name"><a href="{{ with $author.link }} {{- . | safeHTML -}}{{ end }}" target="_blank">{{ $author.name }}</a></div>
- <div class="number-posts">{{ $author.about }}</span></div>
- </div>
-</div>
-{{- if $author.ps -}}
-<div class="footer-donate">
- <div>{{- $author.ps | safeHTML -}}</div>
-</div>
-{{- end -}}
-{{- end -}}
+{{ end }}
<div class="post-footer" id="post-footer">
- {{- if or .PrevInSection .NextInSection -}}
+ {{- if and (or .PrevInSection .NextInSection) $params.showPostNav -}}
<div class="post-navigation">
{{- if .PrevInSection -}}
<div class="post-nav-box nav-box-prev">
@@ -39,3 +24,12 @@
</div>
{{- end -}}
</div>
+
+{{- with .Params.tags -}}
+<div class="post-tags">
+ {{- range $index, $value := . -}}
+ {{- $tag := partialCached "function/path.html" $value $value | printf "/tags/%v" | $.Site.GetPage -}}
+ <a href="{{ $tag.RelPermalink }}" class="tag">{{ $tag.Title }}</a>
+ {{- end -}}
+</div>
+{{- end -}}