feat(header): add Logo, pre and post config for header title (#252)

This commit is contained in:
Dillon 2020-04-23 16:49:30 +08:00 committed by GitHub
parent 919f559fd0
commit 87fbb05e86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 141 additions and 44 deletions

View file

@ -3,6 +3,11 @@
text-align: right;
}
.group-title {
margin-top: 1.5rem;
margin-bottom: 1rem;
}
@import "../_partial/_archive/terms";
@import "../_partial/_archive/tags";
}

View file

@ -205,7 +205,8 @@
img {
max-width: 100%;
min-height: 1.2rem;
min-height: 1.25em;
vertical-align: text-bottom;
}
figure {
@ -339,10 +340,8 @@
}
}
.version img {
min-height: 1.2rem;
height: 1.2rem;
vertical-align: text-bottom;
.version {
height: 1.25em;
}
}

View file

@ -1,7 +1,3 @@
.archive-item {
margin-left: 2rem;
}
.categories-card {
margin: 0 auto;
margin-top: 3rem;
@ -10,7 +6,6 @@
justify-content: space-between;
flex-direction: row;
flex-wrap: wrap;
padding: 0 2.5rem;
line-height: 1.6rem;
.card-item {
@ -32,6 +27,8 @@
font-size: 1.2rem;
font-weight: bold;
display: inline-block;
margin-top: 1rem;
margin-bottom: .75rem;
}
span {
@ -42,12 +39,19 @@
}
}
.archive-item {
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
margin: .25rem 0 .25rem 1.5rem;
}
.archive-item-link {
display: inline-block;
min-width: 10%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 95%;
text-overflow: ellipsis;
&:hover {
color: $global-link-hover-color;
@ -64,7 +68,7 @@
}
.archive-item-date {
float: right;
width: 4em;
text-align: right;
color: $global-font-secondary-color;

View file

@ -6,6 +6,13 @@ header {
.dark & {
background-color: $header-background-color-dark;
}
.logo {
min-height: 1.25em;
height: 1.25em;
vertical-align: text-bottom;
padding-right: .25rem;
}
}
.header-wrapper {
@ -136,7 +143,7 @@ header {
padding: 0 1.5rem;
.header-title {
font-size: $header-title-font-size-desktop;
font-size: $header-title-font-size;
}
.menu {
@ -203,7 +210,7 @@ header {
@include transition(margin-top 0.3s ease 0s);
.header-title {
font-size: $header-title-font-size-mobile;
font-size: $header-title-font-size;
max-width: 80%;
}

View file

@ -3,9 +3,9 @@ code {
font-family: $code-font-family;
color: $code-color;
img, .version img {
min-height: 1.2 * $code-font-size;
height: 1.2 * $code-font-size;
img {
min-height: 1.25em;
max-height: 1.25em;
}
.dark & {
@ -25,7 +25,7 @@ pre {
.copy-button {
font-size: $code-font-size;
line-height: 1.4 * $code-font-size;
line-height: 1.4em;
position: absolute;
top: 0;
right: 0;
@ -129,7 +129,7 @@ code, pre, .highlight table, .highlight tr, .highlight td {
.highlight {
font-family: $code-font-family;
font-size: $code-font-size;
line-height: 1.4 * $code-font-size;
line-height: 1.4em;
/* Comment */ .c,
/* CommentHashbang */ .ch,
/* CommentMultiline */ .cm,

View file

@ -58,9 +58,7 @@ $header-background-color-dark: #252627 !default;
// Font style of the header title
$header-title-font-family: $global-font-family !default;
$header-title-font-size-desktop: 1.5rem !default;
$header-title-font-size-mobile: 1.5rem !default;
$header-title-font-size: 1.5rem !default;
// Position of the header
$header-position-desktop: if($header-normal-mode-desktop, static, fixed) !default;

View file

@ -44,6 +44,8 @@ enableEmoji = true
identifier = "posts"
# you can add extra information before the name (HTML format is supported), such as icons
pre = ""
# you can add extra information after the name (HTML format is supported), such as icons
post = ""
name = "Posts"
url = "/posts/"
# title will be shown when you hover on this menu link.
@ -52,6 +54,7 @@ enableEmoji = true
[[languages.en.menu.main]]
identifier = "tags"
pre = ""
post = ""
name = "Tags"
url = "/tags/"
title = ""
@ -59,6 +62,7 @@ enableEmoji = true
[[languages.en.menu.main]]
identifier = "categories"
pre = ""
post = ""
name = "Categories"
url = "/categories/"
title = ""
@ -66,6 +70,7 @@ enableEmoji = true
[[languages.en.menu.main]]
identifier = "documentation"
pre = ""
post = ""
name = "Docs"
url = "/categories/documentation/"
title = ""
@ -73,6 +78,7 @@ enableEmoji = true
[[languages.en.menu.main]]
identifier = "about"
pre = ""
post = ""
name = "About"
url = "/about/"
title = ""
@ -212,7 +218,10 @@ enableEmoji = true
[languages.zh-cn.menu]
[[languages.zh-cn.menu.main]]
identifier = "posts"
# 你可以在名称 (允许 HTML 格式) 之前添加其他信息, 例如图标
pre = ""
# 你可以在名称 (允许 HTML 格式) 之后添加其他信息, 例如图标
post = ""
name = "所有文章"
url = "/posts/"
title = ""
@ -220,6 +229,7 @@ enableEmoji = true
[[languages.zh-cn.menu.main]]
identifier = "tags"
pre = ""
post = ""
name = "标签"
url = "/tags/"
title = ""
@ -227,6 +237,7 @@ enableEmoji = true
[[languages.zh-cn.menu.main]]
identifier = "categories"
pre = ""
post = ""
name = "分类"
url = "/categories/"
title = ""
@ -241,6 +252,7 @@ enableEmoji = true
[[languages.zh-cn.menu.main]]
identifier = "about"
pre = ""
post = ""
name = "关于"
url = "/about/"
title = ""
@ -381,6 +393,7 @@ enableEmoji = true
[[languages.fr.menu.main]]
identifier = "posts"
pre = ""
post = ""
name = "Postes"
url = "/posts/"
title = ""
@ -388,6 +401,7 @@ enableEmoji = true
[[languages.fr.menu.main]]
identifier = "tags"
pre = ""
post = ""
name = "Balises"
url = "/tags/"
title = ""
@ -395,6 +409,7 @@ enableEmoji = true
[[languages.fr.menu.main]]
identifier = "categories"
pre = ""
post = ""
name = "Catégories"
url = "/categories/"
title = ""
@ -402,6 +417,7 @@ enableEmoji = true
[[languages.fr.menu.main]]
identifier = "documentation"
pre = ""
post = ""
name = "Docs"
url = "/categories/documentation/"
title = ""
@ -556,6 +572,21 @@ enableEmoji = true
# mobile header mode ("fixed", "normal", "auto")
# 移动端导航栏模式 ("fixed", "normal", "auto")
mobileMode = "auto"
# Header title config
# 页面头部导航栏标题配置
[params.header.title]
# URL of the LOGO
# LOGO 的 URL
logo = ""
# title name
# 标题名称
name = "LoveIt"
# you can add extra information before the name (HTML format is supported), such as icons
# 你可以在名称 (允许 HTML 格式) 之前添加其他信息, 例如图标
pre = "<i class='far fa-kiss-wink-heart fa-fw'></i> "
# you can add extra information after the name (HTML format is supported), such as icons
# 你可以在名称 (允许 HTML 格式) 之后添加其他信息, 例如图标
post = ""
# Footer config
# 页面底部信息配置

View file

@ -15,7 +15,7 @@ math:
[![GitHub stars](https://img.shields.io/github/stars/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt)
[![GitHub forks](https://img.shields.io/github/forks/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt/fork)
[LoveIt :(far fa-heart):](https://github.com/dillonzq/LoveIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/) developed by [Dillon](https://dillonzq.com).
[:(far fa-kiss-wink-heart): LoveIt](https://github.com/dillonzq/LoveIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/) developed by [Dillon](https://dillonzq.com).
It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) and [KeepIt Theme](https://github.com/liuzc/LeaveIt/).

View file

@ -20,7 +20,7 @@ Sorry, this article has not been completely translated into **French**.
Welcome to take the time to propose a translation by [making a PR](https://github.com/dillonzq/LoveIt/pulls) to the theme!
{{< /admonition >}}
[LoveIt :(far fa-heart):](https://github.com/dillonzq/LoveIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/) developed by [Dillon](https://dillonzq.com).
[:(far fa-kiss-wink-heart): LoveIt](https://github.com/dillonzq/LoveIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/) developed by [Dillon](https://dillonzq.com).
It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) and [KeepIt Theme](https://github.com/liuzc/LeaveIt/).

View file

@ -15,7 +15,7 @@ math:
[![GitHub stars](https://img.shields.io/github/stars/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt)
[![GitHub forks](https://img.shields.io/github/forks/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt/fork)
[LoveIt :(far fa-heart):](https://github.com/dillonzq/LoveIt) 是一个由 [Dillon](https://dillonzq.com) 开发的**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。
[:(far fa-kiss-wink-heart): LoveIt](https://github.com/dillonzq/LoveIt) 是一个由 [Dillon](https://dillonzq.com) 开发的**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。
它的原型基于 [LeaveIt 主题](https://github.com/liuzc/LeaveIt/) 和 [KeepIt 主题](https://github.com/liuzc/LeaveIt/)。

View file

@ -416,7 +416,7 @@ The rendered output looks like this:
### Task Lists
Task lists allow you to create a list of items with checkboxes. To create a task list, add dashes (`-`) and brackets with a space (`[ ]`) in front of task list items. To select a checkbox, add an x in between the brackets (`[x]`).
Task lists allow you to create a list of items with checkboxes. To create a task list, add dashes (`-`) and brackets with a space (`[ ]`) before task list items. To select a checkbox, add an x in between the brackets (`[x]`).
```markdown
- [x] Write the press release

View file

@ -421,7 +421,7 @@ The rendered output looks like this:
### Task Lists
Task lists allow you to create a list of items with checkboxes. To create a task list, add dashes (`-`) and brackets with a space (`[ ]`) in front of task list items. To select a checkbox, add an x in between the brackets (`[x]`).
Task lists allow you to create a list of items with checkboxes. To create a task list, add dashes (`-`) and brackets with a space (`[ ]`) before task list items. To select a checkbox, add an x in between the brackets (`[x]`).
```markdown
- [x] Write the press release

View file

@ -92,6 +92,8 @@ theme = "LoveIt"
identifier = "posts"
# you can add extra information before the name (HTML format is supported), such as icons
pre = ""
# you can add extra information after the name (HTML format is supported), such as icons
post = ""
name = "Posts"
url = "/posts/"
# title will be shown when you hover on this menu link
@ -100,6 +102,7 @@ theme = "LoveIt"
[[menu.main]]
identifier = "tags"
pre = ""
post = ""
name = "Tags"
url = "/tags/"
title = ""
@ -107,6 +110,7 @@ theme = "LoveIt"
[[menu.main]]
identifier = "categories"
pre = ""
post = ""
name = "Categories"
url = "/categories/"
title = ""
@ -742,6 +746,7 @@ defaultContentLanguage = "en"
[[languages.en.menu.main]]
identifier = "posts"
pre = ""
post = ""
name = "Posts"
url = "/posts/"
title = ""
@ -749,6 +754,7 @@ defaultContentLanguage = "en"
[[languages.en.menu.main]]
identifier = "tags"
pre = ""
post = ""
name = "Tags"
url = "/tags/"
title = ""
@ -756,6 +762,7 @@ defaultContentLanguage = "en"
[[languages.en.menu.main]]
identifier = "categories"
pre = ""
post = ""
name = "Categories"
url = "/categories/"
title = ""
@ -772,6 +779,7 @@ defaultContentLanguage = "en"
[[languages.zh-cn.menu.main]]
identifier = "posts"
pre = ""
post = ""
name = "文章"
url = "/posts/"
title = ""
@ -779,6 +787,7 @@ defaultContentLanguage = "en"
[[languages.zh-cn.menu.main]]
identifier = "tags"
pre = ""
post = ""
name = "标签"
url = "/tags/"
title = ""
@ -786,6 +795,7 @@ defaultContentLanguage = "en"
[[languages.zh-cn.menu.main]]
identifier = "categories"
pre = ""
post = ""
name = "分类"
url = "/categories/"
title = ""
@ -799,6 +809,7 @@ defaultContentLanguage = "en"
[[languages.fr.menu.main]]
identifier = "posts"
pre = ""
post = ""
name = "Postes"
url = "/posts/"
title = ""
@ -806,6 +817,7 @@ defaultContentLanguage = "en"
[[languages.fr.menu.main]]
identifier = "tags"
pre = ""
post = ""
name = "Balises"
url = "/tags/"
title = ""
@ -814,6 +826,7 @@ defaultContentLanguage = "en"
identifier = "categories"
name = "Catégories"
pre = ""
post = ""
url = "/categories/"
title = ""
weight = 3

View file

@ -97,6 +97,8 @@ theme = "LoveIt"
identifier = "posts"
# you can add extra information before the name (HTML format is supported), such as icons
pre = ""
# you can add extra information after the name (HTML format is supported), such as icons
post = ""
name = "Posts"
url = "/posts/"
# title will be shown when you hover on this menu link
@ -105,6 +107,7 @@ theme = "LoveIt"
[[menu.main]]
identifier = "tags"
pre = ""
post = ""
name = "Tags"
url = "/tags/"
title = ""
@ -112,6 +115,7 @@ theme = "LoveIt"
[[menu.main]]
identifier = "categories"
pre = ""
post = ""
name = "Categories"
url = "/categories/"
title = ""
@ -747,6 +751,7 @@ defaultContentLanguage = "en"
[[languages.en.menu.main]]
identifier = "posts"
pre = ""
post = ""
name = "Posts"
url = "/posts/"
title = ""
@ -754,6 +759,7 @@ defaultContentLanguage = "en"
[[languages.en.menu.main]]
identifier = "tags"
pre = ""
post = ""
name = "Tags"
url = "/tags/"
title = ""
@ -761,6 +767,7 @@ defaultContentLanguage = "en"
[[languages.en.menu.main]]
identifier = "categories"
pre = ""
post = ""
name = "Categories"
url = "/categories/"
title = ""
@ -777,6 +784,7 @@ defaultContentLanguage = "en"
[[languages.zh-cn.menu.main]]
identifier = "posts"
pre = ""
post = ""
name = "文章"
url = "/posts/"
title = ""
@ -784,6 +792,7 @@ defaultContentLanguage = "en"
[[languages.zh-cn.menu.main]]
identifier = "tags"
pre = ""
post = ""
name = "标签"
url = "/tags/"
title = ""
@ -791,6 +800,7 @@ defaultContentLanguage = "en"
[[languages.zh-cn.menu.main]]
identifier = "categories"
pre = ""
post = ""
name = "分类"
url = "/categories/"
title = ""
@ -804,6 +814,7 @@ defaultContentLanguage = "en"
[[languages.fr.menu.main]]
identifier = "posts"
pre = ""
post = ""
name = "Postes"
url = "/posts/"
title = ""
@ -811,6 +822,7 @@ defaultContentLanguage = "en"
[[languages.fr.menu.main]]
identifier = "tags"
pre = ""
post = ""
name = "Balises"
url = "/tags/"
title = ""
@ -819,6 +831,7 @@ defaultContentLanguage = "en"
identifier = "categories"
name = "Catégories"
pre = ""
post = ""
url = "/categories/"
title = ""
weight = 3

View file

@ -95,6 +95,8 @@ theme = "LoveIt"
identifier = "posts"
# 你可以在名称 (允许 HTML 格式) 之前添加其他信息, 例如图标
pre = ""
# 你可以在名称 (允许 HTML 格式) 之后添加其他信息, 例如图标
post = ""
name = "文章"
url = "/posts/"
# 当你将鼠标悬停在此菜单链接上时, 将显示的标题
@ -103,6 +105,7 @@ theme = "LoveIt"
[[menu.main]]
identifier = "tags"
pre = ""
post = ""
name = "标签"
url = "/tags/"
title = ""
@ -110,6 +113,7 @@ theme = "LoveIt"
[[menu.main]]
identifier = "categories"
pre = ""
post = ""
name = "分类"
url = "/categories/"
title = ""
@ -745,6 +749,7 @@ defaultContentLanguage = "zh-cn"
[[languages.en.menu.main]]
identifier = "posts"
pre = ""
post = ""
name = "Posts"
url = "/posts/"
title = ""
@ -752,6 +757,7 @@ defaultContentLanguage = "zh-cn"
[[languages.en.menu.main]]
identifier = "tags"
pre = ""
post = ""
name = "Tags"
url = "/tags/"
title = ""
@ -759,6 +765,7 @@ defaultContentLanguage = "zh-cn"
[[languages.en.menu.main]]
identifier = "categories"
pre = ""
post = ""
name = "Categories"
url = "/categories/"
title = ""
@ -775,6 +782,7 @@ defaultContentLanguage = "zh-cn"
[[languages.zh-cn.menu.main]]
identifier = "posts"
pre = ""
post = ""
name = "文章"
url = "/posts/"
title = ""
@ -782,6 +790,7 @@ defaultContentLanguage = "zh-cn"
[[languages.zh-cn.menu.main]]
identifier = "tags"
pre = ""
post = ""
name = "标签"
url = "/tags/"
title = ""
@ -789,6 +798,7 @@ defaultContentLanguage = "zh-cn"
[[languages.zh-cn.menu.main]]
identifier = "categories"
pre = ""
post = ""
name = "分类"
url = "/categories/"
title = ""
@ -802,6 +812,7 @@ defaultContentLanguage = "zh-cn"
[[languages.fr.menu.main]]
identifier = "posts"
pre = ""
post = ""
name = "Postes"
url = "/posts/"
title = ""
@ -809,14 +820,16 @@ defaultContentLanguage = "zh-cn"
[[languages.fr.menu.main]]
identifier = "tags"
pre = ""
post = ""
name = "Balises"
url = "/tags/"
title = ""
weight = 2
[[languages.fr.menu.main]]
identifier = "categories"
name = "Catégories"
pre = ""
post = ""
name = "Catégories"
url = "/categories/"
title = ""
weight = 3

View file

@ -12,7 +12,7 @@
{{- /* Paginate */ -}}
{{- $pages := .Pages.GroupByDate "2006" -}}
{{- range (.Site.Params.section.paginate | default .Site.Params.paginate | .Paginate $pages).PageGroups -}}
<h3>{{ .Key }}</h3>
<h3 class="group-title">{{ .Key }}</h3>
{{- range .Pages -}}
<article class="archive-item">
<a href="{{ .RelPermalink }}" class="archive-item-link">

View file

@ -12,7 +12,7 @@
{{- if ne .Site.Params.footer.hugo false -}}
<div class="footer-line">
{{- $hugo := printf `<a href="https://gohugo.io/" target="_blank" rel="noopener noreffer" title="Hugo %s">Hugo</a>` hugo.Version -}}
{{- printf (T "poweredBySome") $hugo | safeHTML }} | {{ T "theme" }} - <a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="noopener noreffer" title="LoveIt {{ .Scratch.Get `version` }}"><i class="far fa-heart fa-fw"></i> LoveIt</a>
{{- printf (T "poweredBySome") $hugo | safeHTML }} | {{ T "theme" }} - <a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="noopener noreffer" title="LoveIt {{ .Scratch.Get `version` }}"><i class="far fa-kiss-wink-heart fa-fw"></i> LoveIt</a>
</div>
{{- end -}}

View file

@ -88,7 +88,7 @@
{{- with $params.seo.publisher -}}
"publisher": {
"@type": "Organization",
"name": "{{ .name }}",
"name": {{ .name | safeHTML }},
"logo": {
"@type": "ImageObject",
"url": "{{ .logo.url | absURL }}",

View file

@ -2,8 +2,15 @@
<header class="desktop" id="header-desktop">
<div class="header-wrapper">
<div class="header-title">
<a href="{{ .Site.Home.RelPermalink }}">
{{- .Site.Title -}}
<a href="{{ .Site.Home.RelPermalink }}" title="{{ .Site.Title }}">
{{- with .Site.Params.header.title -}}
{{- with .logo -}}
{{- partial "plugin/image.html" (dict "src" . "alt" $.Site.Title "class" "logo") -}}
{{- end -}}
{{- .pre | safeHTML }}{{ .name }}{{ .post | safeHTML -}}
{{- else -}}
{{- .Site.Title -}}
{{- end -}}
</a>
</div>
<div class="menu">
@ -16,7 +23,7 @@
{{- $url = .URL | relLangURL -}}
{{- end -}}
<a class="menu-item{{ if $.IsMenuCurrent `main` . | or ($.HasMenuCurrent `main` .) | or (eq $.RelPermalink $url) }} active{{ end }}" href="{{ $url }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if (urls.Parse $url).Host }} rel="noopener noreffer" target="_blank"{{ end }}>
{{- .Pre | safeHTML }}{{ .Name -}}
{{- .Pre | safeHTML }} {{ .Name }} {{ .Post | safeHTML -}}
</a>
{{- end -}}
<span class="menu-item delimiter"></span>
@ -67,8 +74,15 @@
<div class="header-container">
<div class="header-wrapper">
<div class="header-title">
<a href="{{ .Site.Home.RelPermalink }}">
{{- .Site.Title -}}
<a href="{{ .Site.Home.RelPermalink }}" title="{{ .Site.Title }}">
{{- with .Site.Params.header.title -}}
{{- with .logo -}}
{{- partial "plugin/image.html" (dict "src" . "alt" $.Site.Title "class" "logo") -}}
{{- end -}}
{{- .pre | safeHTML }}{{ .name }}{{ .post | safeHTML -}}
{{- else -}}
{{- .Site.Title -}}
{{- end -}}
</a>
</div>
<div class="menu-toggle" id="menu-toggle-mobile">
@ -104,7 +118,7 @@
{{- $url = .URL | relLangURL -}}
{{- end -}}
<a class="menu-item" href="{{ $url }}" title="{{ .Title }}"{{ if (urls.Parse $url).Host }} rel="noopener noreffer" target="_blank"{{ end }}>
{{- .Pre | safeHTML }}{{ .Name -}}
{{- .Pre | safeHTML }}{{ .Name }}{{ .Post | safeHTML -}}
</a>
{{- end -}}
<a href="javascript:void(0);" class="menu-item theme-switch" title="{{ T "switchTheme" }}">

View file

@ -6,7 +6,7 @@
{{- if .linked -}}
<a class="lightgallery" href="{{ $large | relURL }}" title="{{ .title | default $alt }}" data-thumbnail="{{ $small | relURL }}"{{ with .caption }} data-sub-html="<h2>{{ . }}</h2>{{ with $.alt }}<p>{{ . }}</p>{{ end }}"{{ end }}{{ with .rel }} rel="{{ . }}"{{ end }}>
<img
class="lazyload"
class="lazyload{{ with .class }} {{ . }}{{ end }}"
src="{{ $loading.RelPermalink }}"
data-sizes="auto"
data-srcset="{{ $small | relURL }}, {{ .src | relURL }} 1.5x, {{ $large | relURL }} 2x"
@ -18,7 +18,7 @@
{{- $loading = resources.Get "svg/loading/small.svg" | minify -}}
{{- end -}}
<img
class="lazyload"
class="lazyload{{ with .class }} {{ . }}{{ end }}"
src="{{ $loading.RelPermalink | safeURL }}"
data-sizes="auto"
data-srcset="{{ $small | relURL }}, {{ .src | relURL }} 1.5x, {{ $large | relURL }} 2x"

View file

@ -7,4 +7,4 @@
{{- $res := resources.Get "svg/version.template.svg" -}}
{{- $res = $res | resources.ExecuteAsTemplate $path (dict "version" $version "label" $label "color" $color) | minify -}}
{{- $alt := printf "LoveIt %s | %s" $label $version -}}
<span class="version"><a href="{{ $url }}" rel="noopener noreffer" target="_blank">{{ partial "plugin/image.html" (dict "src" $res.RelPermalink "alt" $alt) }}</a></span>
<a href="{{ $url }}" rel="noopener noreffer" target="_blank">{{ partial "plugin/image.html" (dict "src" $res.RelPermalink "alt" $alt "class" "version") }}</a>

View file

@ -19,7 +19,7 @@
{{- /* Paginate */ -}}
{{- $pages := .Pages.GroupByDate "2006" -}}
{{- range (.Site.Params.list.paginate | default .Site.Params.paginate | .Paginate $pages).PageGroups -}}
<h3>{{ .Key }}</h3>
<h3 class="group-title">{{ .Key }}</h3>
{{- range .Pages -}}
<article class="archive-item">
<a href="{{ .RelPermalink }}" class="archive-item-link">