mirror of
https://github.com/dillonzq/LoveIt.git
synced 2025-01-11 12:41:39 +01:00
chore(style): update code style
This commit is contained in:
parent
344f0a9f41
commit
2a7611b5ae
36 changed files with 1204 additions and 970 deletions
|
@ -50,110 +50,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.post-toc {
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 240px;
|
||||
max-width: 300px;
|
||||
margin-left: 980px;
|
||||
padding: .8rem;
|
||||
border-left: 1px solid $global-border-color;
|
||||
word-wrap: break-word;
|
||||
box-sizing: border-box;
|
||||
top: 12rem;
|
||||
|
||||
.post-toc-title {
|
||||
font-weight: 400;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.post-toc-content {
|
||||
&.always-active ul {
|
||||
display: block;
|
||||
}
|
||||
|
||||
>nav>ul {
|
||||
margin: .625rem 0;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: .625rem;
|
||||
list-style: none;
|
||||
|
||||
ul {
|
||||
padding-left: 1.25rem;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.has-active > ul {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.toc-link.active {
|
||||
color: $global-link-hover-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.post-toc-mobile {
|
||||
display: none;
|
||||
padding-top: .8rem;
|
||||
|
||||
details {
|
||||
summary {
|
||||
.post-toc-title {
|
||||
display: block;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
line-height: 2em;
|
||||
padding: 0 .625rem;
|
||||
background: $code-background-color;
|
||||
|
||||
i.details {
|
||||
line-height: 2em;
|
||||
}
|
||||
|
||||
.dark-theme & {
|
||||
background: $code-background-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
&::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
details[open] {
|
||||
i.details {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
|
||||
.post-toc-content {
|
||||
border: 2px solid $code-background-color;
|
||||
|
||||
>nav>ul {
|
||||
margin: .625rem 0;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: .625rem;
|
||||
list-style: none;
|
||||
|
||||
ul {
|
||||
padding-left: 1.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
.dark-theme & {
|
||||
border: 2px solid $code-background-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
@import "../_partial/_post/toc";
|
||||
|
||||
.post-content {
|
||||
.post-dummy-target:target {
|
||||
|
@ -454,101 +351,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.post-footer {
|
||||
margin-top: 3rem;
|
||||
@import "../_partial/_post/footer";
|
||||
|
||||
.post-info {
|
||||
border-bottom: 1px solid $global-border-color;
|
||||
padding: 1rem 0 0.3rem;
|
||||
|
||||
.dark-theme & {
|
||||
border-bottom: 1px solid $global-border-color-dark;
|
||||
}
|
||||
|
||||
.post-info-line {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.post-info-mod {
|
||||
font-size: 0.8em;
|
||||
color: $global-font-secondary-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $global-font-secondary-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
.post-info-license {
|
||||
font-size: 0.8em;
|
||||
color: $global-font-secondary-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $global-font-secondary-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
.post-info-md
|
||||
a {
|
||||
font-size: 0.8em;
|
||||
color: $post-link-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $post-link-color-dark;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $post-link-hover-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $post-link-hover-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.post-info-more {
|
||||
padding: 0.3rem 0 1rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.post-nav {
|
||||
&::before,
|
||||
&::after {
|
||||
content: ' ';
|
||||
display: table;
|
||||
}
|
||||
|
||||
& a.prev,
|
||||
& a.next {
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
|
||||
transition-duration: .3s;
|
||||
transition-property: transform;
|
||||
transition-timing-function: ease-out;
|
||||
}
|
||||
|
||||
& a.prev {
|
||||
float: left;
|
||||
}
|
||||
|
||||
& a.prev:hover {
|
||||
transform: translateX(-4px);
|
||||
}
|
||||
|
||||
& a.next {
|
||||
float: right;
|
||||
}
|
||||
|
||||
& a.next:hover {
|
||||
transform: translateX(4px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.post-comment {
|
||||
padding: 4rem 0;
|
||||
}
|
||||
@import "../_partial/_post/comment";
|
||||
|
|
|
@ -32,10 +32,10 @@
|
|||
|
||||
&.active {
|
||||
font-weight: 900;
|
||||
color: $navbar-active-color;
|
||||
color: $navbar-hover-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $navbar-active-color-dark;
|
||||
color: $navbar-hover-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,11 +31,11 @@
|
|||
}
|
||||
|
||||
&:hover a {
|
||||
color: $pagination-link-active-color;
|
||||
color: $pagination-link-hover-color;
|
||||
}
|
||||
|
||||
.dark-theme &:hover a {
|
||||
color: $pagination-link-active-color-dark;
|
||||
color: $pagination-link-hover-color-dark;
|
||||
}
|
||||
|
||||
&:before,
|
||||
|
@ -44,14 +44,14 @@
|
|||
content: "";
|
||||
width: 0;
|
||||
height: 3px;
|
||||
background: $pagination-link-active-color;
|
||||
background: $pagination-link-hover-color;
|
||||
transition: 0.3s;
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
.dark-theme &:before,
|
||||
.dark-theme &:after {
|
||||
background: $pagination-link-active-color-dark;
|
||||
background: $pagination-link-hover-color-dark;
|
||||
}
|
||||
|
||||
&:before .active,
|
||||
|
@ -77,11 +77,11 @@
|
|||
|
||||
&.active {
|
||||
a {
|
||||
color: $pagination-link-active-color;
|
||||
color: $pagination-link-hover-color;
|
||||
}
|
||||
|
||||
.dark-theme & a {
|
||||
color: $pagination-link-active-color-dark;
|
||||
color: $pagination-link-hover-color-dark;
|
||||
}
|
||||
|
||||
&:before,
|
||||
|
|
3
assets/css/_partial/_post/_comment.scss
Normal file
3
assets/css/_partial/_post/_comment.scss
Normal file
|
@ -0,0 +1,3 @@
|
|||
.post-comment {
|
||||
padding: 4rem 0;
|
||||
}
|
94
assets/css/_partial/_post/_footer.scss
Normal file
94
assets/css/_partial/_post/_footer.scss
Normal file
|
@ -0,0 +1,94 @@
|
|||
.post-footer {
|
||||
margin-top: 3rem;
|
||||
|
||||
.post-info {
|
||||
border-bottom: 1px solid $global-border-color;
|
||||
padding: 1rem 0 0.3rem;
|
||||
|
||||
.dark-theme & {
|
||||
border-bottom: 1px solid $global-border-color-dark;
|
||||
}
|
||||
|
||||
.post-info-line {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.post-info-mod {
|
||||
font-size: 0.8em;
|
||||
color: $global-font-secondary-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $global-font-secondary-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
.post-info-license {
|
||||
font-size: 0.8em;
|
||||
color: $global-font-secondary-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $global-font-secondary-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
.post-info-md
|
||||
a {
|
||||
font-size: 0.8em;
|
||||
color: $post-link-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $post-link-color-dark;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $post-link-hover-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $post-link-hover-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.post-info-more {
|
||||
padding: 0.3rem 0 1rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.post-nav {
|
||||
&::before,
|
||||
&::after {
|
||||
content: ' ';
|
||||
display: table;
|
||||
}
|
||||
|
||||
& a.prev,
|
||||
& a.next {
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
|
||||
transition-duration: .3s;
|
||||
transition-property: transform;
|
||||
transition-timing-function: ease-out;
|
||||
}
|
||||
|
||||
& a.prev {
|
||||
float: left;
|
||||
}
|
||||
|
||||
& a.prev:hover {
|
||||
transform: translateX(-4px);
|
||||
}
|
||||
|
||||
& a.next {
|
||||
float: right;
|
||||
}
|
||||
|
||||
& a.next:hover {
|
||||
transform: translateX(4px);
|
||||
}
|
||||
}
|
||||
}
|
134
assets/css/_partial/_post/_toc.scss
Normal file
134
assets/css/_partial/_post/_toc.scss
Normal file
|
@ -0,0 +1,134 @@
|
|||
.post-toc {
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 240px;
|
||||
max-width: 300px;
|
||||
margin-left: 980px;
|
||||
padding: .8rem;
|
||||
border-left: 1px solid $global-border-color;
|
||||
word-wrap: break-word;
|
||||
box-sizing: border-box;
|
||||
top: 12rem;
|
||||
|
||||
.dark-theme & {
|
||||
border-left: 1px solid $global-border-color-dark;
|
||||
}
|
||||
|
||||
.post-toc-title {
|
||||
font-weight: 400;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.post-toc-content {
|
||||
&.always-active ul {
|
||||
display: block;
|
||||
}
|
||||
|
||||
>nav>ul {
|
||||
margin: .625rem 0;
|
||||
}
|
||||
|
||||
ul {
|
||||
text-indent: -0.85rem;
|
||||
padding-left: .625rem;
|
||||
list-style: none;
|
||||
|
||||
a::before {
|
||||
content: "|";
|
||||
font-weight: bolder;
|
||||
margin-right: .5rem;
|
||||
color: $post-link-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $post-link-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 1.25rem;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.has-active > ul {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.toc-link.active {
|
||||
font-weight: bold;
|
||||
color: $post-link-hover-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $post-link-hover-color-dark;
|
||||
}
|
||||
|
||||
&::before {
|
||||
font-weight: bolder;
|
||||
color: $post-link-hover-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $post-link-hover-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.post-toc-mobile {
|
||||
display: none;
|
||||
padding-top: .8rem;
|
||||
|
||||
details {
|
||||
summary {
|
||||
.post-toc-title {
|
||||
display: block;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
line-height: 2em;
|
||||
padding: 0 .625rem;
|
||||
background: $code-background-color;
|
||||
|
||||
i.details {
|
||||
line-height: 2em;
|
||||
}
|
||||
|
||||
.dark-theme & {
|
||||
background: $code-background-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
&::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
details[open] {
|
||||
i.details {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
|
||||
.post-toc-content {
|
||||
border: 2px solid $code-background-color;
|
||||
|
||||
>nav>ul {
|
||||
margin: .625rem 0;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: .625rem;
|
||||
list-style: none;
|
||||
|
||||
ul {
|
||||
padding-left: 1.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
.dark-theme & {
|
||||
border: 2px solid $code-background-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -29,8 +29,8 @@ $global-link-hover-color-dark: #fff !default;
|
|||
$global-border-color: #dcdcdc !default;
|
||||
$global-border-color-dark: #4a4b50 !default;
|
||||
|
||||
$navbar-active-color: #161209 !default;
|
||||
$navbar-active-color-dark: #fff !default;
|
||||
$navbar-hover-color: #161209 !default;
|
||||
$navbar-hover-color-dark: #fff !default;
|
||||
|
||||
$post-link-color: #2d96bd !default;
|
||||
$post-link-color-dark: #eee !default;
|
||||
|
@ -39,8 +39,8 @@ $post-link-hover-color-dark: #2d96bd !default;
|
|||
|
||||
$pagination-link-color: #2d96bd !default;
|
||||
$pagination-link-color-dark: #a9a9b3 !default;
|
||||
$pagination-link-active-color: #000 !default;
|
||||
$pagination-link-active-color-dark: #fff !default;
|
||||
$pagination-link-hover-color: #000 !default;
|
||||
$pagination-link-hover-color-dark: #fff !default;
|
||||
|
||||
// Color of the table background.
|
||||
$table-background-color: #fff !default;
|
||||
|
|
|
@ -21,6 +21,8 @@ enableRobotsTXT = true
|
|||
googleAnalytics = ""
|
||||
# copyright description used only for seo schema
|
||||
copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License."
|
||||
# date format
|
||||
dateFormatToUse = "2006-01-02"
|
||||
|
||||
# Markup related configuration in Hugo
|
||||
[markup]
|
||||
|
|
|
@ -69,7 +69,7 @@ other = "<span class=leancloud-visitors-count></span> pageviews"
|
|||
other = "Author"
|
||||
|
||||
[lastMod]
|
||||
other = "This article is updated with %s"
|
||||
other = "The article was updated on %s"
|
||||
|
||||
[license]
|
||||
other = "Published under the %s license"
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{{- define "title" }}{{ T "pageNotFound" | printf "404 %s" }} | {{ .Site.Title }}{{ end -}}
|
||||
{{- define "title" }}
|
||||
{{- T "pageNotFound" | printf "404 %s" }} | {{ .Site.Title -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "content" -}}
|
||||
<div class="notfound">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<figure>
|
||||
<img
|
||||
{{ $res := resources.Get "svg/loading.svg" | minify }}
|
||||
{{- $res := resources.Get "svg/loading.svg" | minify -}}
|
||||
src="{{ $res.RelPermalink }}"
|
||||
data-sizes="auto"
|
||||
data-src="{{ .Destination | safeURL }}"
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
|
||||
<title>
|
||||
{{- block "title" . }}{{ .Site.Title }}{{ end -}}
|
||||
</title>
|
||||
{{- partial "head.html" . -}}
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{{- define "title" }}{{ T "all" | humanize}}{{ T .Section | default .Section | humanize }} | {{ .Site.Title }}{{ end -}}
|
||||
{{- define "title" }}
|
||||
{{- T "all" | humanize}}{{ T .Section | default .Section | humanize }} | {{ .Site.Title -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "content" -}}
|
||||
{{- $data := .Data -}}
|
||||
|
|
|
@ -7,21 +7,27 @@
|
|||
</h1>
|
||||
<div class="post-content">
|
||||
{{- $content := .Content -}}
|
||||
|
||||
{{- $REin := `:\(([\w- ]+?)\):` -}}
|
||||
{{- $REout := `<i class="$1 fa-fw"></i>` -}}
|
||||
{{- $content = replaceRE $REin $REout $content -}}
|
||||
|
||||
{{- $REin = `\[(.+?)\]\^\((.+?)\)` -}}
|
||||
{{- $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` -}}
|
||||
{{- $content = replaceRE $REin $REout $content -}}
|
||||
|
||||
{{- $REin = `<sup>\[return\]</sup>` -}}
|
||||
{{- $REout = printf "<sup>[%s]</sup>" (T "return") -}}
|
||||
{{- $content = replaceRE $REin $REout $content -}}
|
||||
|
||||
{{- $REin = `<(h[23456]) (id=".+?")>` -}}
|
||||
{{- $REout = `<a class="post-dummy-target" $2></a><$1>` -}}
|
||||
{{- $content = replaceRE $REin $REout $content -}}
|
||||
|
||||
{{- $REin = `<(.+) (id="fnref:.+?")>` -}}
|
||||
{{- $REout = `<a class="post-dummy-target" $2></a><$1>` -}}
|
||||
{{- $content = replaceRE $REin $REout $content -}}
|
||||
|
||||
{{- $content | safeHTML -}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<article class="post" itemscope itemtype="http://schema.org/Article">
|
||||
{{ $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }}
|
||||
{{ $author := .Site.Author.name }}
|
||||
{{ if isset .Params "author" }}
|
||||
{{ $author = .Site.Author.name }}
|
||||
{{ end }}
|
||||
{{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
|
||||
{{- $author := .Site.Author.name -}}
|
||||
{{- if isset .Params "author" -}}
|
||||
{{- $author = .Site.Author.name -}}
|
||||
{{- end -}}
|
||||
|
||||
<!--featured_image-->
|
||||
{{ with .Params.featured_image }}
|
||||
{{ $image := $.Params.featured_image_preview | default . }}
|
||||
{{- with .Params.featured_image -}}
|
||||
{{- $image := $.Params.featured_image_preview | default . -}}
|
||||
<div class="post-featured-image-preview">
|
||||
{{ $res := resources.Get "svg/loading.svg" | minify }}
|
||||
{{- $res := resources.Get "svg/loading.svg" | minify -}}
|
||||
<img src="{{ $res.RelPermalink }}" data-sizes="auto" data-src="{{ $image }}" alt="featured image" class="lazyload">
|
||||
</div>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
<!-- end featured_image-->
|
||||
<h1 class="post-title post-list-title" itemprop="name headline">
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
|
@ -21,40 +21,43 @@
|
|||
<div class="post-meta">
|
||||
<a class="author" href="{{.Site.BaseURL }}" rel="author"><i class="fas fa-user-circle fa-fw"></i>{{ $author }} </a>
|
||||
{{ T "publish" }} <time datetime={{ $publish_date }}>{{ $publish_date }}</time>
|
||||
{{ with .Params.categories -}}
|
||||
{{- with .Params.categories -}}
|
||||
<span class="post-category">
|
||||
{{ T "included" }}
|
||||
{{ range . }}
|
||||
{{- T "included" -}}
|
||||
{{- range . -}}
|
||||
{{- $name := . -}}
|
||||
{{- with $.Site.GetPage "taxonomy" (printf "categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "categories/%s" ($name | urlize))) -}}
|
||||
<i class="far fa-folder fa-fw"></i><a href="{{ .Permalink }}">{{ $name }}</a>
|
||||
{{ end -}}
|
||||
{{ end }}
|
||||
<i class="far fa-folder fa-fw"></i>
|
||||
<a href="{{ .Permalink }}">{{ $name }}</a>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</span>
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
<div class="post-content">
|
||||
{{ if .Params.show_description }}
|
||||
<p>{{ .Params.description }}</p>
|
||||
{{ else }}
|
||||
{{ $summary := .Summary }}
|
||||
{{ $REin := `:\(([\w- ]+?)\):` }}
|
||||
{{ $REout := `<i class="$1 fa-fw"></i>` }}
|
||||
{{ $summary = replaceRE $REin $REout $summary }}
|
||||
{{ $REin = `\[(.+?)\]\^\((.+?)\)` }}
|
||||
{{ $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` }}
|
||||
{{ $summary = replaceRE $REin $REout $summary }}
|
||||
{{ $summary | safeHTML }}
|
||||
{{ end }}
|
||||
{{- if .Params.show_description -}}
|
||||
<p>
|
||||
{{- .Params.description -}}
|
||||
</p>
|
||||
{{- else -}}
|
||||
{{- $summary := .Summary -}}
|
||||
{{- $REin := `:\(([\w- ]+?)\):` -}}
|
||||
{{- $REout := `<i class="$1 fa-fw"></i>` -}}
|
||||
{{- $summary = replaceRE $REin $REout $summary -}}
|
||||
{{- $REin = `\[(.+?)\]\^\((.+?)\)` -}}
|
||||
{{- $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` -}}
|
||||
{{- $summary = replaceRE $REin $REout $summary -}}
|
||||
{{- $summary | safeHTML -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
<div class="post-footer">
|
||||
<a href="{{ .Permalink }}">{{ T "readMore" }}</a>
|
||||
{{ with .Params.tags }}
|
||||
{{- with .Params.tags -}}
|
||||
<div class="post-tags">
|
||||
{{ range . }}
|
||||
{{- range . -}}
|
||||
<span class="tag"><a href="{{ "tags/" | absURL }}{{ . | urlize }}/"><i class="fas fa-tag fa-fw"></i>{{ . }}</a></span>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
</article>
|
|
@ -1,4 +1,4 @@
|
|||
{{ if eq (getenv "HUGO_ENV") "production" | and .IsPage | and (ne .Params.comment false) -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .IsPage | and (ne .Params.comment false) -}}
|
||||
<!-- Disqus Comment System-->
|
||||
{{- if .Site.Params.disqus.shortname -}}
|
||||
<div id="disqus_thread"></div>
|
||||
|
@ -22,18 +22,18 @@
|
|||
<!-- gitalk Comment System-->
|
||||
{{- if .Site.Params.gitalk.owner -}}
|
||||
<div id="gitalk-container"></div>
|
||||
{{ if .Site.Params.cdn.gitalk_css }}
|
||||
{{ .Site.Params.cdn.gitalk_css | safeHTML }}
|
||||
{{ else }}
|
||||
{{- if .Site.Params.cdn.gitalk_css -}}
|
||||
{{- .Site.Params.cdn.gitalk_css | safeHTML -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "css/lib/gitalk/gitalk.css" | resources.Minify -}}
|
||||
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ if .Site.Params.cdn.gitalk_js }}
|
||||
{{ .Site.Params.cdn.gitalk_js | safeHTML }}
|
||||
{{ else }}
|
||||
{{- end -}}
|
||||
{{- if .Site.Params.cdn.gitalk_js -}}
|
||||
{{ .Site.Params.cdn.gitalk_js | safeHTML -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/gitalk/gitalk.min.js" | resources.Minify -}}
|
||||
<script src="{{ $res.RelPermalink }}"></script>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
<script type="text/javascript">
|
||||
var gitalk = new Gitalk({
|
||||
id: "{{ .Date }}",
|
||||
|
@ -53,12 +53,12 @@
|
|||
<!-- valine -->
|
||||
{{- if .Site.Params.valine.enable -}}
|
||||
<div id="vcomments"></div>
|
||||
{{ if .Site.Params.cdn.valine_js }}
|
||||
{{ .Site.Params.cdn.valine_js | safeHTML }}
|
||||
{{ else }}
|
||||
{{- if .Site.Params.cdn.valine_js -}}
|
||||
{{- .Site.Params.cdn.valine_js | safeHTML -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/valine/Valine.min.js" | resources.Minify -}}
|
||||
<script src="{{ $res.RelPermalink }}"></script>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
<script type="text/javascript">
|
||||
new Valine({
|
||||
el: "#vcomments",
|
||||
|
@ -92,4 +92,4 @@
|
|||
data-numposts="{{ .Site.Params.facebook.numPosts }}"
|
||||
></div>
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
{{- end -}}
|
|
@ -1,12 +1,14 @@
|
|||
<footer class="footer">
|
||||
<div class="copyright">
|
||||
<div class="copyright-line">
|
||||
{{ (printf (T "powered") `<a href="https://gohugo.io/" target="_blank" rel="external nofollow noopener noreffer">Hugo</a>`) | safeHTML }} | {{ T "theme" }}<a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="external nofollow noopener noreffer">LoveIt<i class="far fa-heart fa-fw"></i></a>
|
||||
{{- (printf (T "powered") `<a href="https://gohugo.io/" target="_blank" rel="external nofollow noopener noreffer">Hugo</a>`) | safeHTML }} | {{ T "theme" }}<a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="external nofollow noopener noreffer">LoveIt<i class="far fa-heart fa-fw"></i></a>
|
||||
</div>
|
||||
<div class="copyright-line">
|
||||
<i class="far fa-copyright fa-fw"></i>
|
||||
{{- with .Site.Params.since -}}
|
||||
<span itemprop="copyrightYear">{{ if lt . now.Year }}{{ . }} - {{ end }}{{ now.Year }}</span>
|
||||
<span itemprop="copyrightYear">
|
||||
{{- if lt . now.Year }}{{ . }} - {{ end }}{{ now.Year -}}
|
||||
</span>
|
||||
{{- else -}}
|
||||
<span itemprop="copyrightYear">{{ now.Year }}</span>
|
||||
{{- end -}}
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="robots" content="noodp" />
|
||||
<meta name="Description" content="{{ .Params.description | default .Site.Params.description }}">
|
||||
{{ with .Site.Params.google_verification -}}
|
||||
{{- with .Site.Params.google_verification -}}
|
||||
<meta name="google-site-verification" content="{{ . }}" />
|
||||
{{ end -}}
|
||||
{{ with .Site.Params.bing_verification -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.bing_verification -}}
|
||||
<meta name="msvalidate.01" content="{{ . }}" />
|
||||
{{ end -}}
|
||||
{{ with .Site.Params.yandex_verification -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.yandex_verification -}}
|
||||
<meta name="yandex-verification" content="{{ . }}" />
|
||||
{{ end -}}
|
||||
{{ with .Site.Params.pinterest_verification -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.pinterest_verification -}}
|
||||
<meta name="p:domain_verify" content="{{ . }}" />
|
||||
{{ end -}}
|
||||
{{ with .Site.Params.baidu_verification -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.baidu_verification -}}
|
||||
<meta name="baidu-site-verification" content="{{ . }}" />
|
||||
{{ end -}}
|
||||
{{ if .PrevInSection -}}
|
||||
{{- end -}}
|
||||
{{- if .PrevInSection -}}
|
||||
<link rel="prev" href="{{ .PrevInSection.Permalink }}" />
|
||||
{{ end -}}
|
||||
{{ if .NextInSection -}}
|
||||
{{- end -}}
|
||||
{{- if .NextInSection -}}
|
||||
<link rel="next" href="{{ .NextInSection.Permalink }}" />
|
||||
{{ end -}}
|
||||
{{- end -}}
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||
|
@ -31,26 +31,26 @@
|
|||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
{{ with .OutputFormats.Get "RSS" -}}
|
||||
{{- with .OutputFormats.Get "RSS" -}}
|
||||
<link rel="alternate" href="{{ .RelPermalink }}" type="application/rss+xml" title="{{ $.Site.Title }}">
|
||||
<link rel="feed" href="{{ .RelPermalink }}" type="application/rss+xml" title="{{ $.Site.Title }}">
|
||||
{{ end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ template "_internal/twitter_cards.html" . -}}
|
||||
{{- template "_internal/twitter_cards.html" . -}}
|
||||
|
||||
{{ partial "seo.html" . -}}
|
||||
{{- partial "seo.html" . -}}
|
||||
|
||||
{{ $res := resources.Get "css/style.scss" | toCSS | minify -}}
|
||||
{{- $res := resources.Get "css/style.scss" | toCSS | minify -}}
|
||||
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.fontawesome_free_css -}}
|
||||
{{ .Site.Params.cdn.fontawesome_free_css | safeHTML }}
|
||||
{{ else -}}
|
||||
{{ $res = resources.Get "css/lib/fontawesome-free/all.min.css" | minify -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.fontawesome_free_css -}}
|
||||
{{- .Site.Params.cdn.fontawesome_free_css | safeHTML -}}
|
||||
{{- else -}}
|
||||
{{- $res = resources.Get "css/lib/fontawesome-free/all.min.css" | minify -}}
|
||||
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.animate_css -}}
|
||||
{{ .Site.Params.cdn.animate_css | safeHTML }}
|
||||
{{ else -}}
|
||||
{{- end -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.animate_css -}}
|
||||
{{- .Site.Params.cdn.animate_css | safeHTML -}}
|
||||
{{- else -}}
|
||||
{{ $res = resources.Get "css/lib/animate/animate.min.css" | minify -}}
|
||||
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{- end -}}
|
|
@ -1,13 +1,17 @@
|
|||
<nav class="navbar">
|
||||
<div class="navbar-container">
|
||||
<div class="navbar-header animated bounceIn">
|
||||
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
|
||||
<a href="{{ .Site.BaseURL }}">
|
||||
{{- .Site.Title -}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="navbar-menu">
|
||||
{{ $currentPage := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
<a class="menu-item{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) | or (eq $currentPage.RelPermalink .URL) }} active{{ end }}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name | safeHTML }}</a>
|
||||
{{ end }}
|
||||
{{- $currentPage := . }}
|
||||
{{- range .Site.Menus.main -}}
|
||||
<a class="menu-item{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) | or (eq $currentPage.RelPermalink .URL) }} active{{ end }}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">
|
||||
{{- .Name | safeHTML -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
<a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180 fa-fw" title={{ T "switchTheme" }}></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -17,17 +21,21 @@
|
|||
<div class="navbar-container">
|
||||
<div class="navbar-header">
|
||||
<div class="navbar-header-title animated bounceIn">
|
||||
<a href="{{.Site.BaseURL}}">{{ .Site.Title }}</a>
|
||||
<a href="{{.Site.BaseURL}}">
|
||||
{{- .Site.Title -}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="menu-toggle" id="menu-toggle">
|
||||
<span></span><span></span><span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="navbar-menu" id="mobile-menu">
|
||||
{{ $currentPage := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
<a class="menu-item" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name | safeHTML }}</a>
|
||||
{{ end }}
|
||||
{{- $currentPage := . -}}
|
||||
{{- range .Site.Menus.main -}}
|
||||
<a class="menu-item" href="{{ .URL | absLangURL }}" title="{{ .Title }}">
|
||||
{{- .Name | safeHTML -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
<a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180 fa-fw" title={{ T "switchTheme" }}></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,32 +1,34 @@
|
|||
<div class="home-intro">
|
||||
{{ $avatar := "" }}
|
||||
{{ if .Site.Params.gravatar.email }}
|
||||
{{ $avatar = (printf "https://www.gravatar.com/avatar/%s?s=240&d=mp" (md5 .Site.Params.gravatar.email)) }}
|
||||
{{ else if .Site.Params.avatar }}
|
||||
{{ $avatar = .Site.Params.avatar }}
|
||||
{{ end }}
|
||||
{{ if $avatar }}
|
||||
{{- $avatar := "" -}}
|
||||
{{- if .Site.Params.gravatar.email -}}
|
||||
{{- $avatar = (printf "https://www.gravatar.com/avatar/%s?s=240&d=mp" (md5 .Site.Params.gravatar.email)) -}}
|
||||
{{- else if .Site.Params.avatar -}}
|
||||
{{- $avatar = .Site.Params.avatar -}}
|
||||
{{- end -}}
|
||||
{{- if $avatar -}}
|
||||
<div class="home-avatar">
|
||||
<a href="/posts">
|
||||
<img src={{ $avatar | relURL }} alt="avatar">
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{ with .Site.Params.subtitle }}
|
||||
{{- with .Site.Params.subtitle -}}
|
||||
<h2 class="home-description">
|
||||
{{ $id := md5 . | printf "tp-%s" }}
|
||||
<div id={{ printf "r%s" $id }} hidden=true>{{ . | safeHTML }}</div>
|
||||
{{- $id := md5 . | printf "tp-%s" -}}
|
||||
<div id={{ printf "r%s" $id }} hidden=true>
|
||||
{{- . | safeHTML -}}
|
||||
</div>
|
||||
<div id={{ $id }} class="typeit"></div>
|
||||
{{ with $.Scratch.Get "typeitMap" }}
|
||||
{{ $.Scratch.Set "typeitMap" (dict $id (slice $id) | merge .) }}
|
||||
{{ else }}
|
||||
{{ $.Scratch.Set "typeitMap" (dict $id (slice $id)) }}
|
||||
{{ end }}
|
||||
{{- with $.Scratch.Get "typeitMap" -}}
|
||||
{{- $.Scratch.Set "typeitMap" (dict $id (slice $id) | merge .) -}}
|
||||
{{- else -}}
|
||||
{{- $.Scratch.Set "typeitMap" (dict $id (slice $id)) -}}
|
||||
{{- end -}}
|
||||
</h2>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
<div class="home-social-links">
|
||||
{{ partial "home/social.html" . }}
|
||||
{{- partial "home/social.html" . -}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,171 +1,285 @@
|
|||
{{ with .Site.Params.Social.Github }}
|
||||
<a href="https://github.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-github-alt fa-fw" title="Github"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.LinkedIn }}
|
||||
<a href="https://linkedin.com/in/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-linkedin fa-fw" title="LinkedIn"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Twitter }}
|
||||
<a href="https://twitter.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-twitter fa-fw" title="Twitter"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Instagram }}
|
||||
<a href="https://www.instagram.com/{{.}}/" rel="me noopener noreffer" target="_blank"><i class="fab fa-instagram fa-fw" title="Instagram"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Facebook}}
|
||||
<a href="https://facebook.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-facebook fa-fw" title="Facebook"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Telegram}}
|
||||
<a href="https://t.me/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-telegram-plane fa-fw" title="Telegram"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Medium}}
|
||||
<a href="https://medium.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-medium fa-fw" title="Medium"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Gitlab}}
|
||||
<a href="https://gitlab.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-gitlab fa-fw" title="Gitlab"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Youtubelegacy}}
|
||||
<a href="https://www.youtube.com/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-youtube fa-fw" title="Youtube"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Youtubecustom}}
|
||||
<a href="https://www.youtube.com/c/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-youtube fa-fw" title="Youtube"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Youtubechannel}}
|
||||
<a href="https://www.youtube.com/channel/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-youtube fa-fw" title="Youtube"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Tumblr}}
|
||||
<a href="https://{{.}}.tumblr.com" rel="me noopener noreffer" target="_blank"><i class="fab fa-tumblr fa-fw" title="Tumblr"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Quora}}
|
||||
<a href="https://www.quora.com/profile/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-quora fa-fw" title="Quora"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Keybase}}
|
||||
<a href="https://keybase.io/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-keybase fa-fw" title="Keybase"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Pinterest}}
|
||||
<a href="https://www.pinterest.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-pinterest fa-fw" title="Pinterest"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Reddit}}
|
||||
<a href="https://www.reddit.com/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-reddit fa-fw" title="Reddit"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Codepen}}
|
||||
<a href="https://codepen.io/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-codepen fa-fw" title="Codepen"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.FreeCodeCamp}}
|
||||
<a href="https://freecodecamp.org/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-free-code-camp fa-fw"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Bitbucket}}
|
||||
<a href="https://bitbucket.org/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-bitbucket fa-fw" title="Bitbucket"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Stackoverflow}}
|
||||
<a href="https://stackoverflow.com/users/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-stack-overflow fa-fw" title="Stackoverflow"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Weibo}}
|
||||
<a href="https://weibo.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-weibo fa-fw" title="Weibo"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Odnoklassniki}}
|
||||
<a href="https://ok.ru/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-odnoklassniki fa-fw" title="Odnoklassniki"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.VKontakte}}
|
||||
<a href="https://vk.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-vk fa-fw" title="VKontakte"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Flickr}}
|
||||
<a href="https://www.flickr.com/photos/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-flickr fa-fw" title="Flickr"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Xing}}
|
||||
<a href="https://www.xing.com/profile/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-xing fa-fw" title="Xing"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Snapchat}}
|
||||
<a href="https://www.snapchat.com/add/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-snapchat fa-fw" title="Snapchat"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Soundcloud}}
|
||||
<a href="https://soundcloud.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-soundcloud fa-fw" title="Soundcloud"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Spotify}}
|
||||
<a href="https://open.spotify.com/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-spotify fa-fw" title="Spotify"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Bandcamp}}
|
||||
<a href="https://{{.}}.bandcamp.com/" rel="me noopener noreffer" target="_blank"><i class="fab fa-bandcamp fa-fw" title="Bandcamp"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Paypal}}
|
||||
<a href="https://paypal.me/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-paypal fa-fw" title="Paypal"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Fivehundredpx}}
|
||||
<a href="https://500px.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-500px fa-fw" title="Fivehundredpx"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Mix}}
|
||||
<a href="https://mix.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-mix fa-fw" title="Mix"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Goodreads}}
|
||||
<a href="https://www.goodreads.com/user/show/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-goodreads fa-fw" title="Goodreads"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Lastfm}}
|
||||
<a href="https://www.last.fm/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-POP_lastfm fa-fw" title="Lastfm"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Foursquare}}
|
||||
<a href="https://foursquare.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-foursquare fa-fw" title="Foursquare"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Hackernews}}
|
||||
<a href="https://news.ycombinator.com/user?id={{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-hacker-news fa-fw" title="Hackernews"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Kickstarter}}
|
||||
<a href="https://kickstarter.com/profile/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-kickstarter fa-fw" title="Kickstarter"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Patreon}}
|
||||
<a href="https://patreon.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-patreon fa-fw" title="Patreon"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Steam}}
|
||||
<a href="https://steamcommunity.com/id/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-steam fa-fw" title="Steam"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Twitch}}
|
||||
<a href="https://www.twitch.tv/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-twitch fa-fw" title="Twitch"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Strava}}
|
||||
<a href="https://www.strava.com/athletes/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-strava fa-fw" title="Strava"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Skype}}
|
||||
<a href="skype:{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-skype fa-fw" title="Skype"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Whatsapp}}
|
||||
<a href="https://wa.me/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-whatsapp fa-fw" title="Whatsapp"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Zhihu}}
|
||||
<a href="https://www.zhihu.com/people/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-zhihu fa-fw" title="Zhihu"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Angellist}}
|
||||
<a href="https://angel.co/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-angellist fa-fw" title="Angellist"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Slideshare}}
|
||||
<a href="https://slideshare.com/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-slideshare fa-fw" title="Slideshare"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Jsfiddle}}
|
||||
<a href="https://jsfiddle.com/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-jsfiddle fa-fw" title="Jsfiddle"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Deviantart}}
|
||||
<a href="https://{{ . }}.deviantart.com/" rel="me noopener noreffer" target="_blank"><i class="fab fa-deviantart fa-fw" title="Deviantart"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Behance}}
|
||||
<a href="https://behance.net/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-behance fa-fw" title="Behance"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Dribble}}
|
||||
<a href="https://dribbble.com/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-dribbble fa-fw" title="Dribble"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Wordpress}}
|
||||
<a href="https://{{ . }}.wordpress.com" rel="me noopener noreffer" target="_blank"><i class="fab fa-wordpress fa-fw" title="Wordpress"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Vine}}
|
||||
<a href="https://vine.co/" rel="me noopener noreffer" target="_blank"><i class="fab fa-vine fa-fw" title="Vine"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Googlescholar}}
|
||||
<a href="https://scholar.google.com/citations?{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-Googlescholar fa-fw" title="Googlescholar"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Researchgate}}
|
||||
<a href="https://www.researchgate.net/profile/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-researchgate fa-fw" title="Researchgate"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Mastodon}}
|
||||
<a href="https://mastodon.social/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-mastodon fa-fw" title="Mastodon"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Devto}}
|
||||
<a href="https://dev.to/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-dev fa-fw" title="Dev.To"></i></a>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.Social.Email}}
|
||||
<a href="mailto:{{.}}" rel="me noopener noreffer"><i class="far fa-envelope fa-fw" target="_blank" title="Email"></i></a>
|
||||
{{ end }}
|
||||
{{- with .Site.Params.Social.Github -}}
|
||||
<a href="https://github.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-github-alt fa-fw" title="Github"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.LinkedIn -}}
|
||||
<a href="https://linkedin.com/in/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-linkedin fa-fw" title="LinkedIn"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Twitter -}}
|
||||
<a href="https://twitter.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-twitter fa-fw" title="Twitter"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Instagram -}}
|
||||
<a href="https://www.instagram.com/{{ . }}/" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-instagram fa-fw" title="Instagram"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Facebook}}
|
||||
<a href="https://facebook.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-facebook fa-fw" title="Facebook"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Telegram}}
|
||||
<a href="https://t.me/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-telegram-plane fa-fw" title="Telegram"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Medium}}
|
||||
<a href="https://medium.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-medium fa-fw" title="Medium"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Gitlab}}
|
||||
<a href="https://gitlab.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-gitlab fa-fw" title="Gitlab"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Youtubelegacy}}
|
||||
<a href="https://www.youtube.com/user/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-youtube fa-fw" title="Youtube"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Youtubecustom}}
|
||||
<a href="https://www.youtube.com/c/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-youtube fa-fw" title="Youtube"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Youtubechannel}}
|
||||
<a href="https://www.youtube.com/channel/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-youtube fa-fw" title="Youtube"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Tumblr}}
|
||||
<a href="https://{{ . }}.tumblr.com" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-tumblr fa-fw" title="Tumblr"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Quora}}
|
||||
<a href="https://www.quora.com/profile/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-quora fa-fw" title="Quora"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Keybase}}
|
||||
<a href="https://keybase.io/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-keybase fa-fw" title="Keybase"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Pinterest}}
|
||||
<a href="https://www.pinterest.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-pinterest fa-fw" title="Pinterest"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Reddit}}
|
||||
<a href="https://www.reddit.com/user/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-reddit fa-fw" title="Reddit"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Codepen}}
|
||||
<a href="https://codepen.io/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-codepen fa-fw" title="Codepen"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.FreeCodeCamp}}
|
||||
<a href="https://freecodecamp.org/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-free-code-camp fa-fw"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Bitbucket}}
|
||||
<a href="https://bitbucket.org/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-bitbucket fa-fw" title="Bitbucket"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Stackoverflow}}
|
||||
<a href="https://stackoverflow.com/users/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-stack-overflow fa-fw" title="Stackoverflow"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Weibo}}
|
||||
<a href="https://weibo.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-weibo fa-fw" title="Weibo"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Odnoklassniki}}
|
||||
<a href="https://ok.ru/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-odnoklassniki fa-fw" title="Odnoklassniki"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.VKontakte}}
|
||||
<a href="https://vk.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-vk fa-fw" title="VKontakte"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Flickr}}
|
||||
<a href="https://www.flickr.com/photos/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-flickr fa-fw" title="Flickr"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Xing}}
|
||||
<a href="https://www.xing.com/profile/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-xing fa-fw" title="Xing"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Snapchat}}
|
||||
<a href="https://www.snapchat.com/add/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-snapchat fa-fw" title="Snapchat"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Soundcloud}}
|
||||
<a href="https://soundcloud.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-soundcloud fa-fw" title="Soundcloud"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Spotify}}
|
||||
<a href="https://open.spotify.com/user/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-spotify fa-fw" title="Spotify"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Bandcamp}}
|
||||
<a href="https://{{ . }}.bandcamp.com/" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-bandcamp fa-fw" title="Bandcamp"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Paypal}}
|
||||
<a href="https://paypal.me/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-paypal fa-fw" title="Paypal"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Fivehundredpx}}
|
||||
<a href="https://500px.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-500px fa-fw" title="Fivehundredpx"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Mix}}
|
||||
<a href="https://mix.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-mix fa-fw" title="Mix"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Goodreads}}
|
||||
<a href="https://www.goodreads.com/user/show/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-goodreads fa-fw" title="Goodreads"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Lastfm}}
|
||||
<a href="https://www.last.fm/user/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-POP_lastfm fa-fw" title="Lastfm"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Foursquare}}
|
||||
<a href="https://foursquare.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-foursquare fa-fw" title="Foursquare"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Hackernews}}
|
||||
<a href="https://news.ycombinator.com/user?id={{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-hacker-news fa-fw" title="Hackernews"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Kickstarter}}
|
||||
<a href="https://kickstarter.com/profile/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-kickstarter fa-fw" title="Kickstarter"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Patreon}}
|
||||
<a href="https://patreon.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-patreon fa-fw" title="Patreon"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Steam}}
|
||||
<a href="https://steamcommunity.com/id/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-steam fa-fw" title="Steam"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Twitch}}
|
||||
<a href="https://www.twitch.tv/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-twitch fa-fw" title="Twitch"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Strava}}
|
||||
<a href="https://www.strava.com/athletes/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-strava fa-fw" title="Strava"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Skype}}
|
||||
<a href="skype:{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-skype fa-fw" title="Skype"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Whatsapp}}
|
||||
<a href="https://wa.me/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-whatsapp fa-fw" title="Whatsapp"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Zhihu}}
|
||||
<a href="https://www.zhihu.com/people/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-zhihu fa-fw" title="Zhihu"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Angellist}}
|
||||
<a href="https://angel.co/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-angellist fa-fw" title="Angellist"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Slideshare}}
|
||||
<a href="https://slideshare.com/{{- . -}}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-slideshare fa-fw" title="Slideshare"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Jsfiddle}}
|
||||
<a href="https://jsfiddle.com/{{- . -}}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-jsfiddle fa-fw" title="Jsfiddle"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Deviantart}}
|
||||
<a href="https://{{- . -}}.deviantart.com/" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-deviantart fa-fw" title="Deviantart"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Behance}}
|
||||
<a href="https://behance.net/{{- . -}}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-behance fa-fw" title="Behance"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Dribble}}
|
||||
<a href="https://dribbble.com/{{- . -}}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-dribbble fa-fw" title="Dribble"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Wordpress}}
|
||||
<a href="https://{{- . -}}.wordpress.com" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-wordpress fa-fw" title="Wordpress"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Vine}}
|
||||
<a href="https://vine.co/" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-vine fa-fw" title="Vine"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Googlescholar}}
|
||||
<a href="https://scholar.google.com/citations?{{- . -}}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-Googlescholar fa-fw" title="Googlescholar"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Researchgate}}
|
||||
<a href="https://www.researchgate.net/profile/{{- . -}}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-researchgate fa-fw" title="Researchgate"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Mastodon}}
|
||||
<a href="https://mastodon.social/{{- . -}}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-mastodon fa-fw" title="Mastodon"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Devto}}
|
||||
<a href="https://dev.to/{{- . -}}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-dev fa-fw" title="Dev.To"></i>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Email}}
|
||||
<a href="mailto:{{ . }}" rel="me noopener noreffer">
|
||||
<i class="far fa-envelope fa-fw" target="_blank" title="Email"></i>
|
||||
</a>
|
||||
{{- end -}}
|
|
@ -1,26 +1,30 @@
|
|||
{{ if gt $.Paginator.TotalPages 1 -}}
|
||||
{{- if gt $.Paginator.TotalPages 1 -}}
|
||||
<ul class="pagination">
|
||||
{{- $.Scratch.Set "paginator.ellipsed" false -}}
|
||||
{{ range $.Paginator.Pagers -}}
|
||||
{{ $right := sub .TotalPages .PageNumber -}}
|
||||
{{ $showNumber := or (le .PageNumber 1) (eq $right 0) -}}
|
||||
{{ $showNumber := or $showNumber (and (gt .PageNumber (sub $.Paginator.PageNumber 3)) (lt .PageNumber (add $.Paginator.PageNumber 3))) -}}
|
||||
{{ if $showNumber -}}
|
||||
{{ $.Scratch.Set "paginator.ellipsed" false -}}
|
||||
{{ $.Scratch.Set "paginator.shouldEllipse" false -}}
|
||||
{{ else -}}
|
||||
{{ $.Scratch.Set "paginator.shouldEllipse" (not ($.Scratch.Get "paginator.ellipsed") ) -}}
|
||||
{{ $.Scratch.Set "paginator.ellipsed" true -}}
|
||||
{{ end -}}
|
||||
{{ if $showNumber -}}
|
||||
{{- range $.Paginator.Pagers -}}
|
||||
{{- $right := sub .TotalPages .PageNumber -}}
|
||||
{{- $showNumber := or (le .PageNumber 1) (eq $right 0) -}}
|
||||
{{- $showNumber := or $showNumber (and (gt .PageNumber (sub $.Paginator.PageNumber 3)) (lt .PageNumber (add $.Paginator.PageNumber 3))) -}}
|
||||
{{- if $showNumber -}}
|
||||
{{- $.Scratch.Set "paginator.ellipsed" false -}}
|
||||
{{- $.Scratch.Set "paginator.shouldEllipse" false -}}
|
||||
{{- else -}}
|
||||
{{- $.Scratch.Set "paginator.shouldEllipse" (not ($.Scratch.Get "paginator.ellipsed") ) -}}
|
||||
{{- $.Scratch.Set "paginator.ellipsed" true -}}
|
||||
{{- end -}}
|
||||
{{- if $showNumber -}}
|
||||
<li class="page-item {{ if eq . $.Paginator }}active{{ end }}">
|
||||
<span class="page-link">
|
||||
<a href="{{ .URL }}">{{ .PageNumber }}</a>
|
||||
<a href="{{ .URL }}">
|
||||
{{- .PageNumber -}}
|
||||
</a>
|
||||
</span>
|
||||
</li>
|
||||
{{- else if ($.Scratch.Get "paginator.shouldEllipse") -}}
|
||||
<li class="page-item "><span class="page-link" aria-hidden="true">…</span></li>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
<li class="page-item ">
|
||||
<span class="page-link" aria-hidden="true">…</span>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{- end }}
|
||||
{{- end -}}
|
|
@ -1,41 +1,49 @@
|
|||
{{ $modify_date := .Lastmod.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
|
||||
{{- $modify_date := .Lastmod.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
|
||||
<div class="post-footer" id="post-footer">
|
||||
<div class="post-info">
|
||||
<div class="post-info-line">
|
||||
<div class="post-info-mod">
|
||||
<span>{{ printf (T "lastMod") $modify_date }}</span>
|
||||
<span>
|
||||
{{- printf (T "lastMod") $modify_date -}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="post-info-license">
|
||||
{{ if .Params.license }}
|
||||
<span>{{ printf (T "license") .Params.license | safeHTML }}</span>
|
||||
{{ end }}
|
||||
{{- if .Params.license -}}
|
||||
<span>
|
||||
{{- printf (T "license") .Params.license | safeHTML -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-info-line">
|
||||
<div class="post-info-md">
|
||||
{{ if .Site.Params.linkToMarkdown }}
|
||||
{{ with .OutputFormats.Get "markdown" }}
|
||||
<span><a class="link-to-markdown" href="{{ .Permalink }}" target="_blank">{{ T "seeMarkDown" }}</a></span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- if .Site.Params.linkToMarkdown -}}
|
||||
{{- with .OutputFormats.Get "markdown" -}}
|
||||
<span>
|
||||
<a class="link-to-markdown" href="{{ .Permalink }}" target="_blank">
|
||||
{{- T "seeMarkDown" -}}
|
||||
</a>
|
||||
</span>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
<div class="post-info-share">
|
||||
{{ if and ( .Param "socialShare" ) (gt (len (.Param "share")) 0) }}
|
||||
<span>{{ partial "post/share.html" . }}</span>
|
||||
{{ end }}
|
||||
{{- if and ( .Param "socialShare" ) (gt (len (.Param "share")) 0) -}}
|
||||
<span>
|
||||
{{- partial "post/share.html" . -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="post-info-more">
|
||||
<section>
|
||||
{{ with .Params.tags }}
|
||||
{{ range . }}
|
||||
<span class="tag">
|
||||
<a href="{{ "tags/" | absURL }}{{ . | urlize }}/"><i class="fas fa-tag fa-fw"></i>{{ . }}</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- with .Params.tags -}}
|
||||
{{- range . -}}
|
||||
<span class="tag"><a href="{{ "tags/" | absURL }}{{ . | urlize }}/"><i class="fas fa-tag fa-fw"></i>{{ . }}</a></span>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</section>
|
||||
<section>
|
||||
<span><a href="javascript:window.history.back();">{{ T "back" }}</a></span> | <span><a href="{{ .Site.BaseURL }}">{{ T "home" }}</a></span>
|
||||
|
@ -43,11 +51,11 @@
|
|||
</div>
|
||||
|
||||
<div class="post-nav">
|
||||
{{ if .PrevInSection }}
|
||||
{{- if .PrevInSection -}}
|
||||
<a href="{{ .PrevInSection.Permalink }}" class="prev" rel="prev" title="{{ .PrevInSection.Title }}"><i class="fas fa-angle-left fa-fw"></i>{{ .PrevInSection.Title }}</a>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{ if .NextInSection }}
|
||||
<a href="{{ .NextInSection.Permalink }}" class="next" rel="next" title="{{ .NextInSection.Title }}">{{ .NextInSection.Title }}<i class="fas fa-angle-right fa-fw"></i></a>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
|
@ -1,52 +1,52 @@
|
|||
{{ if or (eq .Params.share.enable false) (eq .Site.Params.share.enable false) | not }}
|
||||
{{ if or .Params.Share.Twitter (and .Site.Params.Share.Twitter (ne .Params.Share.Twitter false)) }}
|
||||
{{- if or (eq .Params.share.enable false) (eq .Site.Params.share.enable false) | not -}}
|
||||
{{- if or .Params.Share.Twitter (and .Site.Params.Share.Twitter (ne .Params.Share.Twitter false)) -}}
|
||||
<a href="//twitter.com/share?url={{ .Permalink }}&text={{ .Title }}&via={{ .Site.Params.Social.Twitter }}" target="_blank" title="Share on Twitter">
|
||||
<i class="fab fa-twitter fa-fw"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if or .Params.Share.Facebook (and .Site.Params.Share.Facebook (ne .Params.Share.Facebook false)) }}
|
||||
{{- end -}}
|
||||
{{- if or .Params.Share.Facebook (and .Site.Params.Share.Facebook (ne .Params.Share.Facebook false)) -}}
|
||||
<a href="//www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" target="_blank" title="Share on Facebook">
|
||||
<i class="fab fa-facebook-square fa-fw"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if or .Params.Share.Reddit (and .Site.Params.Share.Reddit (ne .Params.Share.Reddit false)) }}
|
||||
{{- end -}}
|
||||
{{- if or .Params.Share.Reddit (and .Site.Params.Share.Reddit (ne .Params.Share.Reddit false)) -}}
|
||||
<a href="//reddit.com/submit?url={{ .Permalink }}&title={{ .Title }}" target="_blank" title="Share on Reddit">
|
||||
<i class="fab fa-reddit fa-fw"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if or .Params.Share.Linkedin (and .Site.Params.Share.Linkedin (ne .Params.Share.Linkedin false)) }}
|
||||
{{- end -}}
|
||||
{{- if or .Params.Share.Linkedin (and .Site.Params.Share.Linkedin (ne .Params.Share.Linkedin false)) -}}
|
||||
<a href="//www.linkedin.com/shareArticle?url={{ .Permalink }}&title={{ .Title }}" target="_blank" title="Share on LinkedIn">
|
||||
<i class="fab fa-linkedin fa-fw"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if or .Params.Share.Pinterest (and .Site.Params.Share.Pinterest (ne .Params.Share.Pinterest false)) }}
|
||||
{{- end -}}
|
||||
{{- if or .Params.Share.Pinterest (and .Site.Params.Share.Pinterest (ne .Params.Share.Pinterest false)) -}}
|
||||
<a href="//www.pinterest.com/pin/create/button/?url={{ .Permalink }}&description={{ .Title }}" target="_blank" title="Share on Pinterest">
|
||||
<i class="fab fa-pinterest fa-fw"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if or .Params.Share.YCombinator (and .Site.Params.Share.YCombinator (ne .Params.Share.YCombinator false)) }}
|
||||
{{- end -}}
|
||||
{{- if or .Params.Share.YCombinator (and .Site.Params.Share.YCombinator (ne .Params.Share.YCombinator false)) -}}
|
||||
<a href="//news.ycombinator.com/submitlink?u={{ .Permalink }}&description={{ .Title }}" target="_blank" title="Share on Hacker News">
|
||||
<i class="fab fa-y-combinator fa-fw"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if or .Params.Share.Mix (and .Site.Params.Share.Mix (ne .Params.Share.Mix false)) }}
|
||||
{{- end -}}
|
||||
{{- if or .Params.Share.Mix (and .Site.Params.Share.Mix (ne .Params.Share.Mix false)) -}}
|
||||
<a href="//mix.com/add?url={{ .Permalink }}&description={{ .Title }}" target="_blank" title="Share on Mix">
|
||||
<i class="fab fa-mix fa-fw"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if or .Params.Share.Tumblr (and .Site.Params.Share.Tumblr (ne .Params.Share.Tumblr false)) }}
|
||||
{{- end -}}
|
||||
{{- if or .Params.Share.Tumblr (and .Site.Params.Share.Tumblr (ne .Params.Share.Tumblr false)) -}}
|
||||
<a href="//www.tumblr.com/widgets/share/tool?canonicalUrl={{ .Permalink }}&title={{ .Title }}" target="_blank" title="Share on Tumblr">
|
||||
<i class="fab fa-tumblr fa-fw"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if or .Params.Share.VK (and .Site.Params.Share.VK (ne .Params.Share.VK false)) }}
|
||||
{{- end -}}
|
||||
{{- if or .Params.Share.VK (and .Site.Params.Share.VK (ne .Params.Share.VK false)) -}}
|
||||
<a href="//vk.com/share.php?url={{ .Permalink }}&title={{ .Title }}" target="_blank" title="Share on VKontakte ">
|
||||
<i class="fab fa-vk fa-fw"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if or .Params.Share.Weibo (and .Site.Params.Share.Weibo (ne .Params.Share.Weibo false)) }}
|
||||
<a href="//service.weibo.com/share/share.php?url={{ .Permalink }}&appkey=&title={{ .Title }}{{ with $.Params.featured_image }}&pic={{ . }}{{ end }}" target="_blank" title="Share on Weibo">
|
||||
{{- end -}}
|
||||
{{- if or .Params.Share.Weibo (and .Site.Params.Share.Weibo (ne .Params.Share.Weibo false)) -}}
|
||||
<a href="//service.weibo.com/share/share.php?url={{ .Permalink }}&appkey=&title={{ .Title }}{{ with $.Params.featured_image }}&pic={{ . }}{{- end -}}" target="_blank" title="Share on Weibo">
|
||||
<i class="fab fa-weibo fa-fw"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
|
@ -1,169 +1,178 @@
|
|||
<!-- jQuery https://github.com/jquery/jquery -->
|
||||
{{ $jquery := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.jquery_js }}
|
||||
{{ $jquery = .Site.Params.cdn.jquery_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/jquery/jquery.slim.min.js" | resources.Minify }}
|
||||
{{ $jquery = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{- $jquery := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.jquery_js -}}
|
||||
{{- $jquery = .Site.Params.cdn.jquery_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/jquery/jquery.slim.min.js" | resources.Minify -}}
|
||||
{{- $jquery = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
<!-- lazysizes https://github.com/aFarkas/lazysizes -->
|
||||
{{ $lazysizes := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.lazysizes_js }}
|
||||
{{ $lazysizes = .Site.Params.cdn.lazysizes_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/lazysizes/lazysizes.min.js" | resources.Minify }}
|
||||
{{ $lazysizes = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{- $lazysizes := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.lazysizes_js -}}
|
||||
{{- $lazysizes = .Site.Params.cdn.lazysizes_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/lazysizes/lazysizes.min.js" | resources.Minify -}}
|
||||
{{- $lazysizes = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
<!-- Smooth Scroll https://github.com/cferdinandi/smooth-scroll -->
|
||||
{{ $smooth_scroll := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.smooth_scroll_js }}
|
||||
{{ $smooth_scroll = .Site.Params.cdn.smooth_scroll_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/smooth-scroll/smooth-scroll.polyfills.min.js" | resources.Minify }}
|
||||
{{ $smooth_scroll = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ $smooth_scroll = delimit (slice $smooth_scroll "<script>window.scroll = new SmoothScroll('[data-scroll]', {speed: 300, speedAsDuration: true});</script>") "" }}
|
||||
{{- $smooth_scroll := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.smooth_scroll_js -}}
|
||||
{{- $smooth_scroll = .Site.Params.cdn.smooth_scroll_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/smooth-scroll/smooth-scroll.polyfills.min.js" | resources.Minify -}}
|
||||
{{- $smooth_scroll = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $smooth_scroll = delimit (slice $smooth_scroll "<script>window.scroll = new SmoothScroll('[data-scroll]', {speed: 300, speedAsDuration: true});</script>") "" -}}
|
||||
<!-- KaTeX https://github.com/KaTeX/KaTeX -->
|
||||
{{ $katex_css := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.katex_css }}
|
||||
{{ $katex_css = .Site.Params.cdn.katex_css }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "css/lib/katex/katex.min.css" | resources.Minify }}
|
||||
{{ $katex_css = printf "<link rel=\"stylesheet\" href=\"%s\">" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ $katex_js := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.katex_js }}
|
||||
{{ $katex_js = .Site.Params.cdn.katex_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/katex/katex.min.js" | resources.Minify }}
|
||||
{{ $katex_js = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ $katex_auto_render_js := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.katex_auto_render_js }}
|
||||
{{ $katex_auto_render_js = .Site.Params.cdn.katex_auto_render_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/katex/auto-render.min.js" | resources.Minify }}
|
||||
{{ $katex_auto_render_js = printf "<script defer src=\"%s\" onload=\"renderMathInElement(document.body);\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ $katex := delimit (slice $katex_css $katex_js $katex_auto_render_js) "" }}
|
||||
{{- $katex_css := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.katex_css -}}
|
||||
{{- $katex_css = .Site.Params.cdn.katex_css -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "css/lib/katex/katex.min.css" | resources.Minify -}}
|
||||
{{- $katex_css = printf "<link rel=\"stylesheet\" href=\"%s\">" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $katex_js := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.katex_js -}}
|
||||
{{- $katex_js = .Site.Params.cdn.katex_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/katex/katex.min.js" | resources.Minify -}}
|
||||
{{- $katex_js = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $katex_auto_render_js := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.katex_auto_render_js -}}
|
||||
{{- $katex_auto_render_js = .Site.Params.cdn.katex_auto_render_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/katex/auto-render.min.js" | resources.Minify -}}
|
||||
{{- $katex_auto_render_js = printf "<script defer src=\"%s\" onload=\"renderMathInElement(document.body);\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $katex := delimit (slice $katex_css $katex_js $katex_auto_render_js) "" -}}
|
||||
<!-- mermaid https://github.com/knsv/mermaid -->
|
||||
{{ $mermaid := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.mermaid_js }}
|
||||
{{ $mermaid = .Site.Params.cdn.mermaid_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/mermaid/mermaid.min.js" | resources.Minify }}
|
||||
{{ $mermaid = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ $mermaidInit := "<script>mermaid.initialize({startOnLoad: false, theme: null});</script>" }}
|
||||
{{ $mermaid = delimit (slice $mermaid $mermaidInit) "" }}
|
||||
{{- $mermaid := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.mermaid_js -}}
|
||||
{{- $mermaid = .Site.Params.cdn.mermaid_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/mermaid/mermaid.min.js" | resources.Minify -}}
|
||||
{{- $mermaid = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $mermaidInit := "<script>mermaid.initialize({startOnLoad: false, theme: null});</script>" -}}
|
||||
{{- $mermaid = delimit (slice $mermaid $mermaidInit) "" -}}
|
||||
<!-- ECharts https://github.com/apache/incubator-echarts -->
|
||||
{{ $echarts_js := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.echarts_js }}
|
||||
{{ $echarts_js = .Site.Params.cdn.echarts_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/echarts/echarts.min.js" | resources.Minify }}
|
||||
{{ $echarts_js = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ $echarts_macarons_js := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.echarts_macarons_js }}
|
||||
{{ $echarts_macarons_js = .Site.Params.cdn.echarts_macarons_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/echarts/macarons.js" | resources.Minify }}
|
||||
{{ $echarts_macarons_js = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ $echarts := delimit (slice $echarts_js $echarts_macarons_js) "" }}
|
||||
{{- $echarts_js := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.echarts_js -}}
|
||||
{{- $echarts_js = .Site.Params.cdn.echarts_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/echarts/echarts.min.js" | resources.Minify -}}
|
||||
{{- $echarts_js = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $echarts_macarons_js := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.echarts_macarons_js -}}
|
||||
{{- $echarts_macarons_js = .Site.Params.cdn.echarts_macarons_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/echarts/macarons.js" | resources.Minify -}}
|
||||
{{- $echarts_macarons_js = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $echarts := delimit (slice $echarts_js $echarts_macarons_js) "" -}}
|
||||
<!-- TypeIt https://github.com/alexmacarthur/typeit -->
|
||||
{{ $typeit := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.typeit_js }}
|
||||
{{ $typeit = .Site.Params.cdn.typeit_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/typeit/typeit.min.js" | resources.Minify }}
|
||||
{{ $typeit = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{- $typeit := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.typeit_js -}}
|
||||
{{- $typeit = .Site.Params.cdn.typeit_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/typeit/typeit.min.js" | resources.Minify -}}
|
||||
{{- $typeit = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
<!-- jQuery.countdown https://github.com/hilios/jQuery.countdown -->
|
||||
{{ $countdown := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.jquery_countdown_js }}
|
||||
{{ $countdown = .Site.Params.cdn.jquery_countdown_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/jquery-countdown/jquery.countdown.min.js" | resources.Minify }}
|
||||
{{ $countdown = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{- $countdown := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.jquery_countdown_js -}}
|
||||
{{- $countdown = .Site.Params.cdn.jquery_countdown_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/jquery-countdown/jquery.countdown.min.js" | resources.Minify -}}
|
||||
{{- $countdown = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
<!-- APlayer https://github.com/MoePlayer/APlayer -->
|
||||
{{ $aplayer_css := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.aplayer_css }}
|
||||
{{ $aplayer_css = .Site.Params.cdn.aplayer_css }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "css/lib/aplayer/APlayer.min.css" | resources.Minify }}
|
||||
{{ $aplayer_css = printf "<link rel=\"stylesheet\" href=\"%s\">" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ $aplayer_js := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.aplayer_js }}
|
||||
{{ $aplayer_js = .Site.Params.cdn.aplayer_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/aplayer/APlayer.min.js" | resources.Minify }}
|
||||
{{ $aplayer_js = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ $aplayer := delimit (slice $aplayer_css $aplayer_js) "" }}
|
||||
{{- $aplayer_css := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.aplayer_css -}}
|
||||
{{- $aplayer_css = .Site.Params.cdn.aplayer_css -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "css/lib/aplayer/APlayer.min.css" | resources.Minify -}}
|
||||
{{- $aplayer_css = printf "<link rel=\"stylesheet\" href=\"%s\">" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $aplayer_js := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.aplayer_js -}}
|
||||
{{- $aplayer_js = .Site.Params.cdn.aplayer_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/aplayer/APlayer.min.js" | resources.Minify -}}
|
||||
{{- $aplayer_js = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $aplayer := delimit (slice $aplayer_css $aplayer_js) "" -}}
|
||||
<!-- MetingJS https://github.com/metowolf/MetingJS -->
|
||||
{{ $meting := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.meting_js }}
|
||||
{{ $meting = .Site.Params.cdn.meting_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/meting/Meting.min.js" | resources.Minify }}
|
||||
{{ $meting = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{- $meting := "" -}}
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.meting_js -}}
|
||||
{{- $meting = .Site.Params.cdn.meting_js -}}
|
||||
{{- else -}}
|
||||
{{- $res := resources.Get "js/lib/meting/Meting.min.js" | resources.Minify -}}
|
||||
{{- $meting = printf "<script src=\"%s\"></script>" $res.RelPermalink -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ $jquery | safeHTML }}
|
||||
{{ $lazysizes | safeHTML }}
|
||||
{{ $smooth_scroll | safeHTML }}
|
||||
{{- $jquery | safeHTML -}}
|
||||
{{- $lazysizes | safeHTML -}}
|
||||
{{- $smooth_scroll | safeHTML -}}
|
||||
|
||||
{{ if .IsPage }}
|
||||
{{- if .IsPage -}}
|
||||
{{/* dev feature */}}
|
||||
{{ if .Params.dev }}
|
||||
{{ with .Scratch.Get "echartsMap" }}
|
||||
{{ $echarts | safeHTML }}
|
||||
<script>window.echartsMap = {
|
||||
{{ range $key, $var := . }}
|
||||
{{ $key }}: {{ $var | safeJS }},
|
||||
{{ end }}
|
||||
};window.echartsArr=[];</script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- if .Params.dev -}}
|
||||
{{- with .Scratch.Get "echartsMap" -}}
|
||||
{{- $echarts | safeHTML -}}
|
||||
<script>
|
||||
window.echartsMap = {
|
||||
{{- range $key, $var := . -}}
|
||||
{{- $key }}: {{ $var | safeJS -}},
|
||||
{{- end -}}
|
||||
};
|
||||
window.echartsArr=[];
|
||||
</script>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{/* dev feature */}}
|
||||
|
||||
{{ with .Scratch.Get "mermaidMap" }}
|
||||
{{ $mermaid | safeHTML }}
|
||||
<script>window.mermaidMap = {{ . | jsonify | safeJS }};</script>
|
||||
{{ end }}
|
||||
{{- with .Scratch.Get "mermaidMap" -}}
|
||||
{{- $mermaid | safeHTML -}}
|
||||
<script>
|
||||
window.mermaidMap = {{ . | jsonify | safeJS }};
|
||||
</script>
|
||||
{{- end -}}
|
||||
|
||||
{{ if or .Params.math .Site.Params.math }}
|
||||
{{ $katex | safeHTML }}
|
||||
{{ end }}
|
||||
{{- if or .Params.math .Site.Params.math -}}
|
||||
{{- $katex | safeHTML -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ if .Scratch.Get "music" }}
|
||||
{{ $aplayer | safeHTML }}
|
||||
{{ $meting | safeHTML }}
|
||||
{{ end }}
|
||||
{{- if .Scratch.Get "music" -}}
|
||||
{{- $aplayer | safeHTML -}}
|
||||
{{- $meting | safeHTML -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ with .Scratch.Get "countdownMap" }}
|
||||
{{ $countdown | safeHTML }}
|
||||
<script>window.countdownMap = {{ . | jsonify | safeJS }};</script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- with .Scratch.Get "countdownMap" -}}
|
||||
{{- $countdown | safeHTML -}}
|
||||
<script>
|
||||
window.countdownMap = {{ . | jsonify | safeJS }};
|
||||
</script>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ $typeitMap := .Scratch.Get "typeitMap" }}
|
||||
{{ if $typeitMap }}
|
||||
{{ $typeit | safeHTML }}
|
||||
{{ $typeitArr := slice }}
|
||||
{{ range $key, $val := $typeitMap }}
|
||||
{{ $typeitArr = $typeitArr | append (slice $val) }}
|
||||
{{ end }}
|
||||
<script>window.typeitArr = {{ $typeitArr | jsonify | safeJS }};</script>
|
||||
{{ end }}
|
||||
{{- $typeitMap := .Scratch.Get "typeitMap" -}}
|
||||
{{- if $typeitMap -}}
|
||||
{{- $typeit | safeHTML -}}
|
||||
{{- $typeitArr := slice -}}
|
||||
{{- range $key, $val := $typeitMap -}}
|
||||
{{- $typeitArr = $typeitArr | append (slice $val) -}}
|
||||
{{- end -}}
|
||||
<script>
|
||||
window.typeitArr = {{ $typeitArr | jsonify | safeJS }};
|
||||
</script>
|
||||
{{- end -}}
|
||||
|
||||
{{ $res := resources.Get "/js/blog.js" | resources.Minify }}
|
||||
{{- $res := resources.Get "/js/blog.js" | resources.Minify -}}
|
||||
<script src="{{ $res.RelPermalink }}"></script>
|
||||
|
||||
{{ if not .Site.IsServer }}
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
{{ end }}
|
||||
{{- if not .Site.IsServer -}}
|
||||
{{- template "_internal/google_analytics_async.html" . -}}
|
||||
{{- end -}}
|
|
@ -1,91 +1,91 @@
|
|||
{{ if .IsHome -}}
|
||||
{{- if .IsHome -}}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "WebSite",
|
||||
"url": "{{ .Site.BaseURL }}",
|
||||
{{ with .Site.Author.name }}
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ . }}"
|
||||
},
|
||||
{{ end }}
|
||||
{{ with .Site.Params.description }}
|
||||
"description": "{{ . }}",
|
||||
{{ end }}
|
||||
{{ with .Site.Params.image }}
|
||||
"image": "{{ .url | absURL }}",
|
||||
{{ end }}
|
||||
{{ with .Site.Params.logo }}
|
||||
"thumbnailUrl": "{{ .url | absURL }}",
|
||||
{{ end }}
|
||||
{{ with .Site.Copyright }}
|
||||
"license": "{{ . }}",
|
||||
{{ end }}
|
||||
"name": "{{ .Site.Title }}"
|
||||
"@context": "http://schema.org",
|
||||
"@type": "WebSite",
|
||||
"url": "{{ .Site.BaseURL }}",
|
||||
{{- with .Site.Author.name -}}
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ . }}"
|
||||
},
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.description -}}
|
||||
"description": "{{ . }}",
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.image -}}
|
||||
"image": "{{ .url | absURL }}",
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.logo -}}
|
||||
"thumbnailUrl": "{{ .url | absURL }}",
|
||||
{{- end -}}
|
||||
{{- with .Site.Copyright -}}
|
||||
"license": "{{ . }}",
|
||||
{{- end -}}
|
||||
"name": "{{ .Site.Title }}"
|
||||
}
|
||||
</script>
|
||||
{{ else if .IsPage -}}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "BlogPosting",
|
||||
"headline": "{{ .Title }}",
|
||||
"mainEntityOfPage": {
|
||||
"@type": "WebPage",
|
||||
"@id": "{{ .Permalink }}"
|
||||
},
|
||||
{{ if ge (.Param "lua.image.width") 696 }}
|
||||
"image": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ .Param "lua.image.url" | absURL }}",
|
||||
"width": {{ .Param "lua.image.width" }},
|
||||
"height": {{ .Param "lua.image.height" }}
|
||||
"@context": "http://schema.org",
|
||||
"@type": "BlogPosting",
|
||||
"headline": "{{ .Title }}",
|
||||
"mainEntityOfPage": {
|
||||
"@type": "WebPage",
|
||||
"@id": "{{ .Permalink }}"
|
||||
},
|
||||
{{ else if ge .Site.Params.image.width 696 }}
|
||||
"image": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ .Site.Params.image.url | absURL }}",
|
||||
"width": {{ .Site.Params.image.width }},
|
||||
"height": {{ .Site.Params.image.height }}
|
||||
},
|
||||
{{ end }}
|
||||
"genre": "{{ .Type }}",
|
||||
{{ with .Params.tags }}
|
||||
"keywords": "{{ delimit . ", " }}",
|
||||
{{ end }}
|
||||
"wordcount": {{ .WordCount }},
|
||||
"url": "{{ .Permalink }}",
|
||||
{{ if not .PublishDate.IsZero }}
|
||||
"datePublished": "{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTML }}",
|
||||
{{ else if not .Date.IsZero }}
|
||||
"datePublished": "{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}",
|
||||
{{ end }}
|
||||
{{ with .Lastmod }}
|
||||
"dateModified": "{{ .Format "2006-01-02T15:04:05-07:00" | safeHTML }}",
|
||||
{{ end }}
|
||||
{{ with .Site.Copyright }}
|
||||
"license": "{{ . }}",
|
||||
{{ end }}
|
||||
{{ with .Site.Params.publisher }}
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": "{{ .name }}",
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ .logo.url | absURL }}",
|
||||
"width": {{ .logo.width }},
|
||||
"height": {{ .logo.height }}
|
||||
}
|
||||
},
|
||||
{{ end }}
|
||||
{{ with .Site.Author.Name }}
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ . }}"
|
||||
},
|
||||
{{ end }}
|
||||
"description": "{{ .Description }}"
|
||||
{{- if ge (.Param "lua.image.width") 696 -}}
|
||||
"image": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ .Param "lua.image.url" | absURL }}",
|
||||
"width": {{ .Param "lua.image.width" }},
|
||||
"height": {{ .Param "lua.image.height" }}
|
||||
},
|
||||
{{- else if ge .Site.Params.image.width 696 -}}
|
||||
"image": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ .Site.Params.image.url | absURL }}",
|
||||
"width": {{ .Site.Params.image.width }},
|
||||
"height": {{ .Site.Params.image.height }}
|
||||
},
|
||||
{{- end -}}
|
||||
"genre": "{{ .Type }}",
|
||||
{{- with .Params.tags -}}
|
||||
"keywords": "{{ delimit . ", " }}",
|
||||
{{- end -}}
|
||||
"wordcount": {{ .WordCount }},
|
||||
"url": "{{ .Permalink }}",
|
||||
{{- if not .PublishDate.IsZero -}}
|
||||
"datePublished": "{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTML }}",
|
||||
{{- else if not .Date.IsZero -}}
|
||||
"datePublished": "{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}",
|
||||
{{- end -}}
|
||||
{{- with .Lastmod -}}
|
||||
"dateModified": "{{ .Format "2006-01-02T15:04:05-07:00" | safeHTML }}",
|
||||
{{- end -}}
|
||||
{{- with .Site.Copyright -}}
|
||||
"license": "{{ . }}",
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.publisher -}}
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": "{{ .name }}",
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ .logo.url | absURL }}",
|
||||
"width": {{ .logo.width }},
|
||||
"height": {{ .logo.height }}
|
||||
}
|
||||
},
|
||||
{{- end -}}
|
||||
{{- with .Site.Author.Name -}}
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ . }}"
|
||||
},
|
||||
{{- end -}}
|
||||
"description": "{{ .Description }}"
|
||||
}
|
||||
</script>
|
||||
{{ end }}
|
||||
{{- end -}}
|
|
@ -1,11 +1,11 @@
|
|||
{{ define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end }}
|
||||
{{- define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end -}}
|
||||
|
||||
{{ define "content" }}
|
||||
{{ $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }}
|
||||
{{ $author := .Site.Author.name }}
|
||||
{{ if isset .Params "author" }}
|
||||
{{ $author = .Site.Author.name }}
|
||||
{{ end }}
|
||||
{{- define "content" -}}
|
||||
{{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
|
||||
{{- $author := .Site.Author.name -}}
|
||||
{{- if isset .Params "author" -}}
|
||||
{{- $author = .Site.Author.name -}}
|
||||
{{- end }}
|
||||
|
||||
<article class="warpper">
|
||||
<h1 class="post-title animated flipInX">{{ .Title }}</h1>
|
||||
|
@ -13,17 +13,17 @@
|
|||
<div class="post-meta">
|
||||
<div class="post-meta-main">
|
||||
<a class="author" href="{{.Site.BaseURL }}" rel="author"><i class="fas fa-user-circle fa-fw"></i>{{ $author }} </a>
|
||||
{{ with .Params.categories -}}
|
||||
{{- with .Params.categories -}}
|
||||
<span class="post-category">
|
||||
{{ T "included" }}
|
||||
{{ range . }}
|
||||
{{- T "included" -}}
|
||||
{{- range . -}}
|
||||
{{- $name := . -}}
|
||||
{{- with $.Site.GetPage "taxonomy" (printf "categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "categories/%s" ($name | urlize))) -}}
|
||||
<i class="far fa-folder fa-fw"></i><a href="{{ .Permalink }}">{{ $name }}</a>
|
||||
{{ end -}}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</span>
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
<div class="post-meta-other">
|
||||
<i class="far fa-calendar-alt fa-fw"></i><time datetime={{ $publish_date }}>{{ $publish_date }}</time>
|
||||
|
@ -37,59 +37,70 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{{ with .Params.featured_image }}
|
||||
{{- with .Params.featured_image -}}
|
||||
<div class="post-featured-image">
|
||||
{{ $res := resources.Get "svg/loading.svg" | minify }}
|
||||
{{- $res := resources.Get "svg/loading.svg" | minify -}}
|
||||
<img src="{{ $res.RelPermalink }}" data-sizes="auto" data-src="{{ . }}" alt="featured image" class="lazyload">
|
||||
</div>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{ if or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) -}}
|
||||
{{- if or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) -}}
|
||||
<div class="post-toc" id="post-toc">
|
||||
<h2 class="post-toc-title">{{ T "toc" }}</h2>
|
||||
{{- $globalAutoCollapseToc := .Site.Params.autoCollapseToc | default true }}
|
||||
<div class="post-toc-content{{ if not (and $globalAutoCollapseToc (ne .Params.autoCollapseToc false)) }} always-active{{ end }}">
|
||||
{{ .TableOfContents }}
|
||||
{{- .TableOfContents -}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-toc-mobile" id="post-toc-mobile">
|
||||
<details>
|
||||
<summary><div class="post-toc-title"><span>{{ T "toc" }}</span><span><i class="details icon fas fa-angle-down"></i></span></div></summary>
|
||||
<summary>
|
||||
<div class="post-toc-title">
|
||||
<span>{{ T "toc" }}</span>
|
||||
<span><i class="details icon fas fa-angle-down"></i></span>
|
||||
</div>
|
||||
</summary>
|
||||
<div class="post-toc-content">
|
||||
{{ $toc := .TableOfContents }}
|
||||
{{ $toc = replaceRE `id="TableOfContents"` `id="TableOfContentsMobile"` $toc }}
|
||||
{{ $toc | safeHTML }}
|
||||
{{- $toc := .TableOfContents -}}
|
||||
{{- $toc = replaceRE `id="TableOfContents"` `id="TableOfContentsMobile"` $toc -}}
|
||||
{{- $toc | safeHTML -}}
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
<div class="post-content">
|
||||
{{ $content := .Content }}
|
||||
{{ $REin := `:\(([\w- ]+?)\):` }}
|
||||
{{ $REout := `<i class="$1 fa-fw"></i>` }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $REin = `\[(.+?)\]\^\((.+?)\)` }}
|
||||
{{ $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $REin = `<sup>\[return\]</sup>` }}
|
||||
{{ $REout = printf "<sup>[%s]</sup>" (T "return") }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $REin = `<(h[23456]) (id=".+?")>` }}
|
||||
{{ $REout = `<a class="post-dummy-target" $2></a><$1>` }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $REin = `<(.+) (id="fnref:.+?")>` }}
|
||||
{{ $REout = `<a class="post-dummy-target" $2></a><$1>` }}
|
||||
{{ $content = replaceRE $REin $REout $content }}
|
||||
{{ $content | safeHTML }}
|
||||
{{- $content := .Content -}}
|
||||
|
||||
{{- $REin := `:\(([\w- ]+?)\):` -}}
|
||||
{{- $REout := `<i class="$1 fa-fw"></i>` -}}
|
||||
{{- $content = replaceRE $REin $REout $content -}}
|
||||
|
||||
{{- $REin = `\[(.+?)\]\^\((.+?)\)` -}}
|
||||
{{- $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` -}}
|
||||
{{- $content = replaceRE $REin $REout $content -}}
|
||||
|
||||
{{- $REin = `<sup>\[return\]</sup>` -}}
|
||||
{{- $REout = printf "<sup>[%s]</sup>" (T "return") -}}
|
||||
{{- $content = replaceRE $REin $REout $content -}}
|
||||
|
||||
{{- $REin = `<(h[23456]) (id=".+?")>` -}}
|
||||
{{- $REout = `<a class="post-dummy-target" $2></a><$1>` -}}
|
||||
{{- $content = replaceRE $REin $REout $content -}}
|
||||
|
||||
{{- $REin = `<(.+) (id="fnref:.+?")>` -}}
|
||||
{{- $REout = `<a class="post-dummy-target" $2></a><$1>` -}}
|
||||
{{- $content = replaceRE $REin $REout $content -}}
|
||||
|
||||
{{- $content | safeHTML -}}
|
||||
</div>
|
||||
|
||||
{{ partial "post/footer.html" . }}
|
||||
{{- partial "post/footer.html" . -}}
|
||||
|
||||
<div class="post-comment">
|
||||
{{ if ( .Params.comment | default true ) }}
|
||||
{{ partial "comments.html" . }}
|
||||
{{ end }}
|
||||
{{- if ( .Params.comment | default true ) -}}
|
||||
{{- partial "comments.html" . -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
</article>
|
||||
{{- end }}
|
||||
{{- end -}}
|
|
@ -1,42 +1,54 @@
|
|||
{{ $_hugo_config := `{ "version": 1 }` -}}
|
||||
{{ $iconMap := dict "note" "fas fa-pencil-alt" -}}
|
||||
{{ $iconMap = dict "abstract" "fas fa-list-ul" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "info" "fas fa-info-circle" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "tip" "fas fa-lightbulb" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "success" "fas fa-check-circle" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "question" "fas fa-question-circle" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "warning" "fas fa-exclamation-triangle" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "failure" "fas fa-times-circle" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "danger" "fas fa-skull-crossbones" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "bug" "fas fa-bug" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "example" "fas fa-list-ol" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "quote" "fas fa-quote-right" | merge $iconMap -}}
|
||||
{{ $iconMap = dict "details" "fas fa-angle-down" | merge $iconMap -}}
|
||||
{{- $_hugo_config := `{ "version": 1 }` -}}
|
||||
{{- $iconMap := dict "note" "fas fa-pencil-alt" -}}
|
||||
{{- $iconMap = dict "abstract" "fas fa-list-ul" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "info" "fas fa-info-circle" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "tip" "fas fa-lightbulb" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "success" "fas fa-check-circle" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "question" "fas fa-question-circle" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "warning" "fas fa-exclamation-triangle" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "failure" "fas fa-times-circle" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "danger" "fas fa-skull-crossbones" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "bug" "fas fa-bug" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "example" "fas fa-list-ol" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "quote" "fas fa-quote-right" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "details" "fas fa-angle-down" | merge $iconMap -}}
|
||||
|
||||
{{ if .IsNamedParams -}}
|
||||
{{ $type := .Get "type" }}
|
||||
{{ if eq (.Get "details") "true" -}}
|
||||
{{- if .IsNamedParams -}}
|
||||
{{- $type := .Get "type" -}}
|
||||
{{- if eq (.Get "details") "true" -}}
|
||||
<details class="admonition {{ $type }}">
|
||||
{{- with .Get "title" }}<summary class="admonition-title"><i class="icon {{ index $iconMap $type }}"></i>{{ . }}<i class="details {{ index $iconMap "details" }}"></i></summary>{{ end }}
|
||||
{{- with .Get "title" -}}
|
||||
<summary class="admonition-title">
|
||||
<i class="icon {{ index $iconMap $type }}"></i>{{ . }}<i class="details {{ index $iconMap "details" }}"></i>
|
||||
</summary>
|
||||
{{- end -}}
|
||||
{{- .Inner -}}
|
||||
</details>
|
||||
{{- else -}}
|
||||
<div class="admonition {{ $type }}">
|
||||
{{- with .Get "title" }}<p class="admonition-title"><i class="icon {{ index $iconMap $type }}"></i>{{ . }}</p>{{ end }}
|
||||
{{- with .Get "title" -}}
|
||||
<p class="admonition-title"><i class="icon {{ index $iconMap $type }}"></i>{{ . }}</p>
|
||||
{{- end -}}
|
||||
{{- .Inner -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{ else -}}
|
||||
{{ $type := .Get 0 }}
|
||||
{{ if eq (.Get 2) "true" }}
|
||||
{{- else -}}
|
||||
{{- $type := .Get 0 -}}
|
||||
{{- if eq (.Get 2) "true" -}}
|
||||
<details class="admonition {{ $type }}">
|
||||
{{- with .Get 1 }}<summary class="admonition-title"><i class="icon {{ index $iconMap $type }}"></i>{{ . }}<i class="details {{ index $iconMap "details" }}"></i></summary>{{ end }}
|
||||
{{- with .Get 1 -}}
|
||||
<summary class="admonition-title">
|
||||
<i class="icon {{ index $iconMap $type }}"></i>{{ . }}<i class="details {{ index $iconMap "details" }}"></i>
|
||||
</summary>
|
||||
{{- end -}}
|
||||
{{- .Inner -}}
|
||||
</details>
|
||||
{{- else -}}
|
||||
<div class="admonition {{ $type }}">
|
||||
{{- with .Get 1 }}<p class="admonition-title"><i class="icon {{ index $iconMap $type }}"></i>{{ . }}</p>{{ end }}
|
||||
{{- with .Get 1 -}}
|
||||
<p class="admonition-title"><i class="icon {{ index $iconMap $type }}"></i>{{ . }}</p>
|
||||
{{- end -}}
|
||||
{{- .Inner -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
{{- end -}}
|
|
@ -1,12 +1,12 @@
|
|||
{{ if .Get "date" -}}
|
||||
{{ $date := .Get "date" }}
|
||||
{{ $id := delimit (split (md5 $date) "" | shuffle) "" | printf "countdown-%s" -}}
|
||||
{{ $defaultPattern := printf "%%D %s %%H %s %%M %s %%S %s" (T "day") (T "hour") (T "minute") (T "second") }}
|
||||
{{ $new := dict $id (dict "date" $date "pattern" (.Get "pattern" | default $defaultPattern)) }}
|
||||
{{ with .Page.Scratch.Get "countdownMap" -}}
|
||||
{{ .Page.Scratch.Set "countdownMap" (merge . $new) -}}
|
||||
{{ else -}}
|
||||
{{ .Page.Scratch.Set "countdownMap" $new -}}
|
||||
{{ end -}}
|
||||
{{- if .Get "date" -}}
|
||||
{{- $date := .Get "date" -}}
|
||||
{{- $id := delimit (split (md5 $date) "" | shuffle) "" | printf "countdown-%s" -}}
|
||||
{{- $defaultPattern := printf "%%D %s %%H %s %%M %s %%S %s" (T "day") (T "hour") (T "minute") (T "second") -}}
|
||||
{{- $new := dict $id (dict "date" $date "pattern" (.Get "pattern" | default $defaultPattern)) -}}
|
||||
{{- with .Page.Scratch.Get "countdownMap" -}}
|
||||
{{- .Page.Scratch.Set "countdownMap" (merge . $new) -}}
|
||||
{{- else -}}
|
||||
{{- .Page.Scratch.Set "countdownMap" $new -}}
|
||||
{{- end -}}
|
||||
<div id="{{ $id }}" style={{ .Get "style" | safeCSS }}></div>
|
||||
{{ end -}}
|
||||
{{- end -}}
|
|
@ -1,10 +1,10 @@
|
|||
<!-- shuffle md5 as id -->
|
||||
{{ $id := delimit (split (md5 .Inner) "" | shuffle) "" | printf "echarts-%s" -}}
|
||||
{{ $echartsMap := .Page.Scratch.Get "echartsMap" -}}
|
||||
{{ if $echartsMap -}}
|
||||
{{- $id := delimit (split (md5 .Inner) "" | shuffle) "" | printf "echarts-%s" -}}
|
||||
{{- $echartsMap := .Page.Scratch.Get "echartsMap" -}}
|
||||
{{- if $echartsMap -}}
|
||||
{{ $echartsMap = .Inner | printf "{%s}" | dict $id | merge $echartsMap -}}
|
||||
{{ else -}}
|
||||
{{- else -}}
|
||||
{{ $echartsMap = .Inner | printf "{%s}" | dict $id -}}
|
||||
{{ end -}}
|
||||
{{ .Page.Scratch.Set "echartsMap" $echartsMap -}}
|
||||
{{- end -}}
|
||||
{{- .Page.Scratch.Set "echartsMap" $echartsMap -}}
|
||||
<div class="echarts" id="{{ $id }}"></div>
|
|
@ -1,10 +1,10 @@
|
|||
<!-- shuffle md5 as id -->
|
||||
{{ $id := delimit (split (md5 .Inner) "" | shuffle) "" | printf "mermaid-%s" -}}
|
||||
{{ $mermaidMap := .Page.Scratch.Get "mermaidMap" -}}
|
||||
{{ if $mermaidMap -}}
|
||||
{{ $mermaidMap = trim .Inner "\n" | dict $id | merge $mermaidMap -}}
|
||||
{{ else -}}
|
||||
{{ $mermaidMap = trim .Inner "\n" | dict $id -}}
|
||||
{{ end -}}
|
||||
{{ .Page.Scratch.Set "mermaidMap" $mermaidMap -}}
|
||||
{{- $id := delimit (split (md5 .Inner) "" | shuffle) "" | printf "mermaid-%s" -}}
|
||||
{{- $mermaidMap := .Page.Scratch.Get "mermaidMap" -}}
|
||||
{{- if $mermaidMap -}}
|
||||
{{- $mermaidMap = trim .Inner "\n" | dict $id | merge $mermaidMap -}}
|
||||
{{- else -}}
|
||||
{{- $mermaidMap = trim .Inner "\n" | dict $id -}}
|
||||
{{- end -}}
|
||||
{{- .Page.Scratch.Set "mermaidMap" $mermaidMap -}}
|
||||
<div class="mermaid" id="{{ $id }}"></div>
|
|
@ -1,22 +1,22 @@
|
|||
{{ .Page.Scratch.Set "music" "true" -}}
|
||||
{{ if .IsNamedParams }}
|
||||
{{- .Page.Scratch.Set "music" "true" -}}
|
||||
{{- if .IsNamedParams -}}
|
||||
<meting-js server={{ .Get "server" }} type={{ .Get "type" }} id={{ .Get "id" }}
|
||||
{{ with .Get "autoplay" }}
|
||||
{{- with .Get "autoplay" -}}
|
||||
autoplay={{ . }}
|
||||
{{ end }}
|
||||
{{ with .Get "mini" }}
|
||||
{{- end -}}
|
||||
{{- with .Get "mini" -}}
|
||||
mini={{ . }}
|
||||
{{ end }}
|
||||
{{ with .Get "fixed" }}
|
||||
{{- end -}}
|
||||
{{- with .Get "fixed" -}}
|
||||
fixed={{ . }}
|
||||
{{ end }}
|
||||
{{ with .Get "list-folded" }}
|
||||
{{- end -}}
|
||||
{{- with .Get "list-folded" -}}
|
||||
list-folded={{ . }}
|
||||
{{ end }}
|
||||
{{ with .Get "list-max-height" }}
|
||||
{{- end -}}
|
||||
{{- with .Get "list-max-height" -}}
|
||||
list-max-height={{ . }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
theme="#A9A9B3"></meting-js>
|
||||
{{ else }}
|
||||
{{- else -}}
|
||||
<meting-js server={{ .Get 0 }} type={{ .Get 1 }} id={{ .Get 2 }} theme="#A9A9B3"></meting-js>></meting-js>
|
||||
{{ end }}
|
||||
{{- end }}
|
|
@ -1,50 +1,56 @@
|
|||
<!-- only the trailing newline is retained -->
|
||||
{{ $content := replaceRE `(?s)^\n*(.*?)\n*$` "$1\n" .Inner }}
|
||||
{{- $content := replaceRE `(?s)^\n*(.*?)\n*$` "$1\n" .Inner -}}
|
||||
<!-- shuffle md5 as id -->
|
||||
{{ $id := delimit (split (md5 $content) "" | shuffle) "" | printf "typeit-%s" }}
|
||||
{{- $id := delimit (split (md5 $content) "" | shuffle) "" | printf "typeit-%s" -}}
|
||||
|
||||
<div class={{ .Get "class" | default "typeit" }}>
|
||||
<!-- raw html content -->
|
||||
{{ if .Get "raw" }}
|
||||
<div id={{ printf "r%s" $id }} hidden=true>{{ $content | safeHTML }}</div>
|
||||
{{- if .Get "raw" -}}
|
||||
<div id={{ printf "r%s" $id }} hidden=true>
|
||||
{{- $content | safeHTML -}}
|
||||
</div>
|
||||
<div id={{ $id }}></div>
|
||||
{{ else if .Get "code" }}
|
||||
{{- else if .Get "code" -}}
|
||||
<!-- highlight code content without line number -->
|
||||
{{ $content = highlight $content (.Get "code") "linenos=false" }}
|
||||
{{- $content = highlight $content (.Get "code") "linenos=false" -}}
|
||||
<!-- delete outer label -->
|
||||
{{ $content = replaceRE `<div class="highlight"><pre class="chroma"><code[^<>]*>(?s)(.*)</code></pre></div>` "$1" $content }}
|
||||
{{- $content = replaceRE `<div class="highlight"><pre class="chroma"><code[^<>]*>(?s)(.*)</code></pre></div>` "$1" $content -}}
|
||||
<!-- parsing markdown links -->
|
||||
{{ $content = replaceRE `(<span[^<>]*>)([^<>]*)\[([^<>]+)\]\(([^<>]+)\)([^<>]*)(</span>)` "$1$2$6<a href=$4>$3</a>$1$5$6" $content }}
|
||||
{{- $content = replaceRE `(<span[^<>]*>)([^<>]*)\[([^<>]+)\]\(([^<>]+)\)([^<>]*)(</span>)` "$1$2$6<a href=$4>$3</a>$1$5$6" $content -}}
|
||||
<!-- replace " " to " " and replace "\n" to "<br />" -->
|
||||
{{ $content = replaceRE ` ` " " $content | replaceRE `(<\w+) ` "$1 " | replaceRE `\n` "<br />" }}
|
||||
{{- $content = replaceRE ` ` " " $content | replaceRE `(<\w+) ` "$1 " | replaceRE `\n` "<br />" -}}
|
||||
<!-- fix "<br />" location error which is a bug of Typeit HTML parser -->
|
||||
{{ $content = replaceRE `<br /></span>` "</span><br />" $content }}
|
||||
<div id={{ printf "r%s" $id }} hidden=true>{{ $content | safeHTML }}</div>
|
||||
{{- $content = replaceRE `<br /></span>` "</span><br />" $content -}}
|
||||
<div id={{ printf "r%s" $id }} hidden=true>
|
||||
{{- $content | safeHTML -}}
|
||||
</div>
|
||||
<div class="highlight" id={{ $id }}></div>
|
||||
{{ else }}
|
||||
{{ $tag := .Get "tag" | default "p" }}
|
||||
{{ $content = $content | markdownify | chomp }}
|
||||
<div id={{ printf "r%s" $id }} hidden=true>{{ $content | safeHTML }}</div>
|
||||
{{ printf "<%s id=%s></%s>" $tag $id $tag | safeHTML }}
|
||||
{{ end }}
|
||||
{{- else -}}
|
||||
{{- $tag := .Get "tag" | default "p" -}}
|
||||
{{- $content = $content | markdownify | chomp -}}
|
||||
<div id={{ printf "r%s" $id }} hidden=true>
|
||||
{{- $content | safeHTML -}}
|
||||
</div>
|
||||
{{- printf "<%s id=%s></%s>" $tag $id $tag | safeHTML -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ $typeitMap := .Page.Scratch.Get "typeitMap" }}
|
||||
{{ $group := slice $id }}
|
||||
{{ with .Get "group" }}
|
||||
{{ if $typeitMap }}
|
||||
{{ if index $typeitMap . }}
|
||||
{{ $group = index $typeitMap . | append $id }}
|
||||
{{ end }}
|
||||
{{ $typeitMap = dict . $group | merge $typeitMap }}
|
||||
{{ else }}
|
||||
{{ $typeitMap = dict . $group }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ if $typeitMap }}
|
||||
{{ $typeitMap = dict $id $group | merge $typeitMap }}
|
||||
{{ else }}
|
||||
{{ $typeitMap = dict $id $group }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ .Page.Scratch.Set "typeitMap" $typeitMap }}
|
||||
{{- $typeitMap := .Page.Scratch.Get "typeitMap" -}}
|
||||
{{- $group := slice $id -}}
|
||||
{{- with .Get "group" -}}
|
||||
{{- if $typeitMap -}}
|
||||
{{- if index $typeitMap . -}}
|
||||
{{- $group = index $typeitMap . | append $id -}}
|
||||
{{- end -}}
|
||||
{{- $typeitMap = dict . $group | merge $typeitMap -}}
|
||||
{{- else -}}
|
||||
{{- $typeitMap = dict . $group -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if $typeitMap -}}
|
||||
{{- $typeitMap = dict $id $group | merge $typeitMap -}}
|
||||
{{- else -}}
|
||||
{{- $typeitMap = dict $id $group -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- .Page.Scratch.Set "typeitMap" $typeitMap -}}
|
||||
</div>
|
||||
|
|
|
@ -1,29 +1,33 @@
|
|||
{{ define "title" }}{{ .Title }} | {{ T .Data.Singular | default (humanize .Data.Singular) }} | {{ .Site.Title }}{{ end }}
|
||||
{{- define "title" -}}
|
||||
{{- .Title }} | {{ T .Data.Singular | default (humanize .Data.Singular) }} | {{ .Site.Title -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ define "content" }}
|
||||
{{- define "content" -}}
|
||||
<div class="warpper archive">
|
||||
<h2 class="post-title animated pulse faster">
|
||||
{{ $taxonomy := .Data.Singular }}
|
||||
{{ if eq $taxonomy "category" }}
|
||||
{{- $taxonomy := .Data.Singular -}}
|
||||
{{- if eq $taxonomy "category" -}}
|
||||
<i class="far fa-folder-open fa-fw"></i>{{ .Title }}
|
||||
{{ else if eq $taxonomy "tag" }}
|
||||
{{- else if eq $taxonomy "tag" -}}
|
||||
<i class="fas fa-tag fa-fw"></i>{{ .Title }}
|
||||
{{ else }}
|
||||
{{ printf "%s - %s" (T $taxonomy | default (humanize $taxonomy)) .Title }}
|
||||
{{ end }}
|
||||
{{- else -}}
|
||||
{{- printf "%s - %s" (T $taxonomy | default (humanize $taxonomy)) .Title -}}
|
||||
{{- end -}}
|
||||
</h2>
|
||||
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
{{- range (.Paginate (.Pages.GroupByDate "2006")).PageGroups -}}
|
||||
<h3>{{ .Key }}</h3>
|
||||
{{ range .Pages }}
|
||||
{{- range .Pages -}}
|
||||
<article class="archive-item">
|
||||
<a href="{{ .RelPermalink }}" class="archive-item-link">{{ .Title }}</a>
|
||||
<a href="{{ .RelPermalink }}" class="archive-item-link">
|
||||
{{- .Title -}}
|
||||
</a>
|
||||
<span class="archive-item-date">
|
||||
{{ .Date.Format (.Site.Params.dateFormatToUse | default "01-02") }}
|
||||
{{- .Date.Format (.Site.Params.dateFormatToUse | default "01-02") -}}
|
||||
</span>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ partial "paginator.html" . }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- partial "paginator.html" . -}}
|
||||
</div>
|
||||
{{end }}
|
||||
{{- end -}}
|
|
@ -1,51 +1,55 @@
|
|||
{{ define "title" }}{{ T "all" | humanize}}{{ T .Data.Plural | default .Data.Plural | humanize }} | {{ .Site.Title }}{{ end }}
|
||||
{{- define "title" -}}
|
||||
{{- T "all" | humanize}}{{ T .Data.Plural | default .Data.Plural | humanize }} | {{ .Site.Title -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ define "content" }}
|
||||
{{ $taxonomies := .Data.Plural }}
|
||||
{{ $terms := .Data.Terms.ByCount }}
|
||||
{{ $type := .Type }}
|
||||
{{- define "content" -}}
|
||||
{{- $taxonomies := .Data.Plural -}}
|
||||
{{- $terms := .Data.Terms.ByCount -}}
|
||||
{{- $type := .Type -}}
|
||||
|
||||
<div class="warpper archive">
|
||||
<h2 class="post-title animated pulse faster">
|
||||
{{ T "all" | humanize}}{{ T $taxonomies | default $taxonomies | humanize }}
|
||||
{{- T "all" | humanize}}{{ T $taxonomies | default $taxonomies | humanize -}}
|
||||
</h2>
|
||||
|
||||
<!-- Categories Page -->
|
||||
{{ if eq $taxonomies "categories" }}
|
||||
{{- if eq $taxonomies "categories" -}}
|
||||
<div class="categories-card">
|
||||
{{ range $terms }}
|
||||
{{ $term := .Term }}
|
||||
{{ $pages := .Pages }}
|
||||
{{ with $.Site.GetPage "taxonomy" (printf "%s/%s" $type $term) }}
|
||||
{{- range $terms -}}
|
||||
{{- $term := .Term -}}
|
||||
{{- $pages := .Pages -}}
|
||||
{{- with $.Site.GetPage "taxonomy" (printf "%s/%s" $type $term) -}}
|
||||
<div class="card-item">
|
||||
<div class="categories">
|
||||
<a href="{{ .Permalink }}">
|
||||
<h3><i class="far fa-folder fa-fw"></i>{{ $term | humanize}}</h3>
|
||||
</a>
|
||||
{{ range first 5 $pages }}
|
||||
{{- range first 5 $pages -}}
|
||||
<article class="archive-item">
|
||||
<a href="{{ .Permalink }}" class="archive-item-link">{{ .Title }}</a>
|
||||
<a href="{{ .Permalink }}" class="archive-item-link">
|
||||
{{- .Title -}}
|
||||
</a>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ if gt (len $pages) 5 }}
|
||||
{{- end -}}
|
||||
{{- if gt (len $pages) 5 -}}
|
||||
<span class="more-post">
|
||||
<a href="{{ .Permalink }}" class="more-post-link">{{ T "more" }} >></a>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
<!-- Tag Cloud Page -->
|
||||
{{ else if eq $taxonomies "tags" }}
|
||||
{{- else if eq $taxonomies "tags" -}}
|
||||
<div class="tag-cloud-tags">
|
||||
{{ range $.Site.Taxonomies.tags.ByCount }}
|
||||
{{- range $.Site.Taxonomies.tags.ByCount -}}
|
||||
<a href="{{ .Page.Permalink }}"> {{ .Page.Title }} <small>({{ .Count }})</small></a>
|
||||
{{end}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{end }}
|
||||
{{- end -}}
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue