mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-14 02:46:16 +01:00
feat(style): adjust style of header, tags and dynamic-to-top button
This commit is contained in:
parent
d8bfd23ace
commit
3d9aad3205
23 changed files with 146 additions and 130 deletions
|
@ -65,7 +65,6 @@ b, strong {
|
|||
a {
|
||||
color: $global-link-color;
|
||||
text-decoration: none;
|
||||
transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
|
||||
|
||||
&:hover {
|
||||
color: $global-link-hover-color;
|
||||
|
@ -82,47 +81,48 @@ a {
|
|||
|
||||
b, strong {
|
||||
font-weight: bold;
|
||||
|
||||
.dark-theme & {
|
||||
color: #ddd;
|
||||
}
|
||||
}
|
||||
|
||||
#dynamic-to-top {
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
width: auto;
|
||||
z-index: 90;
|
||||
z-index: 100;
|
||||
position: fixed;
|
||||
bottom: 2rem;
|
||||
right: 2rem;
|
||||
top: auto;
|
||||
left: auto;
|
||||
font-family: sans-serif;
|
||||
font-size: 1rem;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
padding: 1rem 1rem;
|
||||
font-size: 1.4rem;
|
||||
line-height: 1.8rem;
|
||||
padding: .6rem .6rem;
|
||||
color: $global-font-secondary-color;
|
||||
background: $header-background-color;
|
||||
border: 1px solid $global-border-color;
|
||||
background: #222;
|
||||
outline: none;
|
||||
&:hover {
|
||||
background: #000;
|
||||
border-radius: 2rem;
|
||||
|
||||
&:hover, &:active {
|
||||
color: $global-font-color;
|
||||
background: $global-background-color;
|
||||
cursor: pointer;
|
||||
}
|
||||
&:active {
|
||||
background: #000;
|
||||
|
||||
&:active, &:focus, &:hover {
|
||||
outline: none;
|
||||
}
|
||||
&:focus, &:hover {
|
||||
outline: none;
|
||||
}
|
||||
span {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
width: .875rem;
|
||||
height: .75rem;
|
||||
background: url('data:image/png;base64,iVBORw0KGgoAAAAN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yWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAKVJREFUeNqUz7ENgzAURdErUSXQMgdTZJFIqeg8DFI2YQeEvAEbUJja3y9NEiwCUXIlN/62jww7Saok3Z+r4pckXSRNWpskXb5deClHfeo7ylGrLqnbTmOMs/e+9d63McZ554GOlFLId0IIvXOuAUqgdM41IYQ+P5NSCpjZkitADRTZTwqgznUzWzCzZaMc9dbNbGEYhuuOclQB1OM43gBO/N/5MQAeMwpyB1MtLQAAAABJRU5ErkJggg==') no-repeat center center;
|
||||
}
|
||||
|
||||
.dark-theme &{
|
||||
border: 1px solid $global-border-color-dark;
|
||||
.dark-theme & {
|
||||
color: $global-font-secondary-color-dark;
|
||||
background: $header-background-color-dark;
|
||||
border-color: $global-border-color-dark;
|
||||
|
||||
&:hover, &:active {
|
||||
color: $global-font-color-dark;
|
||||
background: $global-background-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
@media only screen and (max-width: 960px) {
|
||||
#header-desktop {
|
||||
.header-wrapper {
|
||||
margin: 0 1rem;
|
||||
padding: 0 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 720px) {
|
||||
@media only screen and (max-width: 680px) {
|
||||
#header-desktop {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -22,14 +22,14 @@
|
|||
color: $single-link-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $single-link-color-dark;
|
||||
color: $global-link-color-dark;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $single-link-hover-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $single-link-hover-color-dark;
|
||||
color: $global-link-hover-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,6 @@
|
|||
|
||||
.dark-theme &:hover {
|
||||
color: $single-link-hover-color-dark;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -179,12 +178,10 @@
|
|||
min-width: 20%;
|
||||
max-width: 80%;
|
||||
display: inline-block;
|
||||
padding: .625rem;
|
||||
padding: .5rem;
|
||||
margin: 0 auto;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
font-size: .875rem;
|
||||
color: #969696;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
img {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
&:focus,
|
||||
&:hover {
|
||||
color: $global-link-hover-color;
|
||||
transform: scale(1.1);
|
||||
transform: scale(1.2);
|
||||
|
||||
.dark-theme & {
|
||||
color: $global-link-hover-color-dark;
|
||||
|
|
|
@ -8,25 +8,21 @@ header {
|
|||
}
|
||||
|
||||
.header-title {
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.menu .menu-item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.language-select {
|
||||
font-weight: $global-font-weight;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
background: transparent;
|
||||
background-image: none;
|
||||
-webkit-appearance: none;
|
||||
color: $global-font-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $global-font-color-dark;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
|
@ -47,23 +43,20 @@ header {
|
|||
.header-wrapper {
|
||||
width: auto;
|
||||
text-align: center;
|
||||
margin: 0 4rem;
|
||||
padding: 0 3rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.header-title a {
|
||||
padding: 0 8px;
|
||||
font-size: 1.25rem;
|
||||
.menu {
|
||||
.menu-item {
|
||||
margin: 0 .5rem;
|
||||
|
||||
i {
|
||||
line-height: 2rem;
|
||||
&.theme-switch {
|
||||
margin: 0 .3rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu a {
|
||||
padding: 0 8px;
|
||||
|
||||
&.active {
|
||||
a.active {
|
||||
font-weight: 900;
|
||||
color: $header-hover-color;
|
||||
|
||||
|
@ -96,10 +89,6 @@ header {
|
|||
padding-left: 1rem;
|
||||
box-sizing: border-box;
|
||||
|
||||
.header-title {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.menu-toggle {
|
||||
cursor: pointer;
|
||||
line-height: 4rem;
|
||||
|
|
|
@ -2,12 +2,13 @@
|
|||
display: block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
max-width: 1000px;
|
||||
margin-left: 1000px;
|
||||
padding: 0 .8rem;
|
||||
border-left: 1px solid $global-border-color;
|
||||
overflow-wrap: break-word;
|
||||
box-sizing: border-box;
|
||||
top: if($header-normal-mode-desktop, 7rem, 12rem);
|
||||
top: if($header-normal-mode-desktop, 5rem, 10rem);
|
||||
|
||||
.dark-theme & {
|
||||
border-left: 1px solid $global-border-color-dark;
|
||||
|
|
|
@ -50,8 +50,8 @@ $selection-color-dark: rgba(38, 139, 211, 0.3) !default;
|
|||
|
||||
// ========== Header ========== //
|
||||
// Height of the header
|
||||
$header-height-desktop: 4rem !default;
|
||||
$header-height-mobile: 3.8rem !default;
|
||||
$header-height-desktop: 3.5rem !default;
|
||||
$header-height-mobile: 3.5rem !default;
|
||||
|
||||
// Color of the header background
|
||||
$header-background-color: #f8f8f8 !default;
|
||||
|
@ -77,11 +77,11 @@ $toc-content-font-size: 0.9rem !default;
|
|||
|
||||
// Color of the single link
|
||||
$single-link-color: #2d96bd !default;
|
||||
$single-link-color-dark: #eee !default;
|
||||
$single-link-color-dark: #55bde2 !default;
|
||||
|
||||
// Color of the hover single link
|
||||
$single-link-hover-color: #ef3982 !default;
|
||||
$single-link-hover-color-dark: #2d96bd !default;
|
||||
$single-link-hover-color-dark: #bdebfc !default;
|
||||
|
||||
// Color of the table background
|
||||
$table-background-color: #fff !default;
|
||||
|
|
2
assets/js/theme.min.js
vendored
2
assets/js/theme.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -25,7 +25,7 @@ enableEmoji = true
|
|||
# language code
|
||||
languageCode = "en"
|
||||
# website title
|
||||
title = "LoveIt Theme"
|
||||
title = "LoveIt"
|
||||
# language name
|
||||
languageName = "English"
|
||||
# whether to include Chinese/Japanese/Korean
|
||||
|
@ -66,7 +66,7 @@ enableEmoji = true
|
|||
[[languages.en.menu.main]]
|
||||
identifier = "documentation"
|
||||
pre = ""
|
||||
name = "Documentation"
|
||||
name = "Docs"
|
||||
url = "/categories/documentation/"
|
||||
title = ""
|
||||
weight = 4
|
||||
|
@ -77,6 +77,13 @@ enableEmoji = true
|
|||
url = "/about/"
|
||||
title = ""
|
||||
weight = 5
|
||||
[[languages.en.menu.main]]
|
||||
identifier = "github"
|
||||
pre = "<i class='fab fa-github fa-fw'></i>"
|
||||
name = ""
|
||||
url = "https://github.com/dillonzq/LoveIt"
|
||||
title = "GitHub"
|
||||
weight = 6
|
||||
[languages.en.params]
|
||||
# site description
|
||||
description = "About LoveIt Theme"
|
||||
|
@ -242,7 +249,7 @@ enableEmoji = true
|
|||
# 网站语言, 仅在这里 CN 大写
|
||||
languageCode = "zh-CN"
|
||||
# 网站标题
|
||||
title = "LoveIt 主题"
|
||||
title = "LoveIt"
|
||||
# 语言名称
|
||||
languageName = "简体中文"
|
||||
# 是否包括中日韩文字
|
||||
|
@ -260,7 +267,7 @@ enableEmoji = true
|
|||
[[languages.zh-cn.menu.main]]
|
||||
identifier = "posts"
|
||||
pre = ""
|
||||
name = "文章"
|
||||
name = "所有文章"
|
||||
url = "/posts/"
|
||||
title = ""
|
||||
weight = 1
|
||||
|
@ -281,7 +288,7 @@ enableEmoji = true
|
|||
[[languages.zh-cn.menu.main]]
|
||||
identifier = "documentation"
|
||||
pre = ""
|
||||
name = "主题文档"
|
||||
name = "文档"
|
||||
url = "/categories/documentation/"
|
||||
title = ""
|
||||
weight = 4
|
||||
|
@ -292,6 +299,13 @@ enableEmoji = true
|
|||
url = "/about/"
|
||||
title = ""
|
||||
weight = 5
|
||||
[[languages.zh-cn.menu.main]]
|
||||
identifier = "github"
|
||||
pre = "<i class='fab fa-github fa-fw'></i>"
|
||||
name = ""
|
||||
url = "https://github.com/dillonzq/LoveIt"
|
||||
title = "GitHub"
|
||||
weight = 6
|
||||
[languages.zh-cn.params]
|
||||
# 网站描述
|
||||
description = "关于 LoveIt 主题"
|
||||
|
@ -457,7 +471,7 @@ enableEmoji = true
|
|||
# language code
|
||||
languageCode = "fr"
|
||||
# website title
|
||||
title = "LoveIt Thème"
|
||||
title = "LoveIt"
|
||||
# language name
|
||||
languageName = "Français"
|
||||
# whether to include Chinese/Japanese/Korean
|
||||
|
@ -496,7 +510,7 @@ enableEmoji = true
|
|||
[[languages.fr.menu.main]]
|
||||
identifier = "documentation"
|
||||
pre = ""
|
||||
name = "Documentation"
|
||||
name = "Docs"
|
||||
url = "/categories/documentation/"
|
||||
title = ""
|
||||
weight = 4
|
||||
|
@ -507,6 +521,13 @@ enableEmoji = true
|
|||
url = "/about/"
|
||||
title = ""
|
||||
weight = 5
|
||||
[[languages.fr.menu.main]]
|
||||
identifier = "github"
|
||||
pre = "<i class='fab fa-github fa-fw'></i>"
|
||||
name = ""
|
||||
url = "https://github.com/dillonzq/LoveIt"
|
||||
title = "GitHub"
|
||||
weight = 6
|
||||
[languages.fr.params]
|
||||
# site description
|
||||
description = "À propos du thème LoveIt"
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: "Documentation"
|
||||
slug: "documentation"
|
||||
---
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: "Documentation"
|
||||
slug: "documentation"
|
||||
---
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: "文档"
|
||||
slug: "documentation"
|
||||
---
|
|
@ -56,7 +56,7 @@
|
|||
|
||||
{{- /* Dynamic to top button */ -}}
|
||||
<a href="#" class="dynamic-to-top animated faster" id="dynamic-to-top">
|
||||
<span> </span>
|
||||
<i class="fas fa-chevron-up fa-fw"></i>
|
||||
</a>
|
||||
|
||||
{{- /* Load JavaScript scripts and CSS */ -}}
|
||||
|
|
|
@ -29,15 +29,14 @@
|
|||
</span>
|
||||
|
||||
{{- with .Params.categories -}}
|
||||
<span class="post-category">
|
||||
|
||||
<span class="post-category">
|
||||
{{- T "included" -}}
|
||||
{{- range . -}}
|
||||
|
||||
<span>
|
||||
<a href="{{ `/categories/` | relLangURL }}{{ urlize .}}">
|
||||
<i class="far fa-folder fa-fw"></i>{{ . | humanize }}
|
||||
</a>
|
||||
</span>
|
||||
{{- range $index, $value := . -}}
|
||||
{{- if gt $index 0 }} {{ end -}}
|
||||
<a href="{{ `/categories/` | relLangURL }}{{ urlize $value }}">
|
||||
<i class="far fa-folder fa-fw"></i>{{ $value | humanize }}
|
||||
</a>
|
||||
{{- end -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
|
@ -57,12 +56,10 @@
|
|||
<a href="{{ .RelPermalink }}">{{ T "readMore" }}</a>
|
||||
{{- with .Params.tags -}}
|
||||
<div class="post-tags">
|
||||
{{- range . -}}
|
||||
<span>
|
||||
<a href="{{ `/tags/` | relLangURL }}{{ urlize .}}">
|
||||
<i class="fas fa-tag fa-fw"></i>{{ . }}
|
||||
</a>
|
||||
</span>
|
||||
<i class="fas fa-tags fa-fw"></i>
|
||||
{{- range $index, $value := . -}}
|
||||
{{- if gt $index 0 }}, {{ end -}}
|
||||
<a href="{{ `/tags/` | relLangURL }}{{ urlize $value }}">{{ $value }}</a>
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="copyright">
|
||||
{{- /* Hugo and LoveIt */ -}}
|
||||
<div class="copyright-line">
|
||||
{{- printf (T "poweredBySome") `<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 "poweredBySome") `<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"><i class="far fa-heart fa-fw"></i> LoveIt</a>
|
||||
</div>
|
||||
|
||||
<div class="copyright-line">
|
||||
|
|
|
@ -8,15 +8,19 @@
|
|||
</div>
|
||||
<div class="menu">
|
||||
{{- range .Site.Menus.main -}}
|
||||
<a class="menu-item{{ if $.IsMenuCurrent "main" . | or ($.HasMenuCurrent "main" .) | or (.URL | relLangURL | string | eq $.RelPermalink ) }} active{{ end }}" href="{{ .URL | relLangURL }}"{{ with .Title }} title="{{ . }}"{{ end }}>
|
||||
<a class="menu-item{{ if $.IsMenuCurrent "main" . | or ($.HasMenuCurrent "main" .) | or (.URL | relLangURL | string | eq $.RelPermalink ) }} active{{ end }}" href="{{ .URL | relLangURL }}"{{ with .Title }} title="{{ . }}"{{ end }} rel="noopener noreffer"{{ if strings.HasPrefix .URL "http" }} target="_blank"{{ end }}>
|
||||
{{- .Pre | safeHTML }}{{ .Name -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
<span class="menu-item">|</span>
|
||||
<a href="javascript:void(0);" class="menu-item theme-switch" title="{{ T "switchTheme" }}">
|
||||
<i class="fas fa-adjust fa-fw"></i>
|
||||
</a>
|
||||
{{- if .Site.IsMultiLingual -}}
|
||||
|
|
||||
<a href="javascript:void(0);" class="menu-item" title="{{ T "selectLanguage" }}">
|
||||
<i class="fas fa-language fa-fw"></i>
|
||||
<select class="language-select" onchange="location = this.value;">
|
||||
{{- .Language.LanguageName -}}
|
||||
<i class="fas fa-chevron-right fa-fw"></i>
|
||||
<select class="language-select" id="language-select-desktop" onchange="location = this.value;">
|
||||
{{- range .Page.AllTranslations -}}
|
||||
{{- $translation := . -}}
|
||||
{{- range $.Site.Languages -}}
|
||||
|
@ -32,9 +36,6 @@
|
|||
</select>
|
||||
</a>
|
||||
{{- end -}}
|
||||
<a href="javascript:void(0);" class="theme-switch" title="{{ T "switchTheme" }}">
|
||||
<i class="fas fa-adjust fa-fw "></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
@ -55,13 +56,17 @@
|
|||
<div class="menu" id="menu-mobile">
|
||||
{{- $currentPage := . -}}
|
||||
{{- range .Site.Menus.main -}}
|
||||
<a class="menu-item" href="{{ .URL | relLangURL }}" title="{{ .Title }}">
|
||||
<a class="menu-item" href="{{ .URL | relLangURL }}" title="{{ .Title }}" rel="noopener noreffer"{{ if strings.HasPrefix .URL "http" }} target="_blank"{{ end }}>
|
||||
{{- .Pre | safeHTML }}{{ .Name -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
<a href="javascript:void(0);" class="menu-item theme-switch" title="{{ T "switchTheme" }}">
|
||||
<i class="fas fa-adjust fa-fw"></i>
|
||||
</a>
|
||||
{{- if .Site.IsMultiLingual -}}
|
||||
<a href="javascript:void(0);" class="menu-item" title="{{ T "selectLanguage" }}">
|
||||
<i class="fas fa-language fa-fw"></i>
|
||||
{{- .Language.LanguageName -}}
|
||||
<i class="fas fa-chevron-right fa-fw"></i>
|
||||
<select class="language-select" onchange="location = this.value;">
|
||||
{{- range .Page.AllTranslations -}}
|
||||
{{- $translation := . -}}
|
||||
|
@ -78,9 +83,6 @@
|
|||
</select>
|
||||
</a>
|
||||
{{- end -}}
|
||||
<a href="javascript:void(0);" class="theme-switch" title="{{ T "switchTheme" }}">
|
||||
<i class="fas fa-adjust fa-fw"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
|
|
@ -44,12 +44,10 @@
|
|||
<div class="post-info-more">
|
||||
<section>
|
||||
{{- with .Params.tags -}}
|
||||
{{- range . -}}
|
||||
<span>
|
||||
<a href="{{ `/tags/` | relLangURL }}{{ urlize .}}">
|
||||
<i class="fas fa-tag fa-fw"></i>{{ . }}
|
||||
</a>
|
||||
</span>
|
||||
<i class="fas fa-tags fa-fw"></i>
|
||||
{{- range $index, $value := . -}}
|
||||
{{- if gt $index 0 }}, {{ end -}}
|
||||
<a href="{{ `/tags/` | relLangURL }}{{ urlize $value }}">{{ $value }}</a>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</section>
|
||||
|
|
|
@ -17,15 +17,14 @@
|
|||
</span>
|
||||
|
||||
{{- with .Params.categories -}}
|
||||
<span class="post-category">
|
||||
|
||||
<span class="post-category">
|
||||
{{- T "included" -}}
|
||||
{{- range . -}}
|
||||
|
||||
<span>
|
||||
<a href="{{ `/categories/` | relLangURL }}{{ urlize .}}">
|
||||
<i class="far fa-folder fa-fw"></i>{{ . | humanize }}
|
||||
</a>
|
||||
</span>
|
||||
{{- range $index, $value := . -}}
|
||||
{{- if gt $index 0 }} {{ end -}}
|
||||
<a href="{{ `/categories/` | relLangURL }}{{ urlize $value }}">
|
||||
<i class="far fa-folder fa-fw"></i>{{ $value | humanize }}
|
||||
</a>
|
||||
{{- end -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{- define "title" -}}
|
||||
{{- .Title | humanize }} | {{ T .Data.Singular | default (humanize .Data.Singular) }} | {{ .Site.Title -}}
|
||||
{{- .Title }} | {{ T .Data.Singular | default (humanize .Data.Singular) }} | {{ .Site.Title -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "content" -}}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{- define "title" -}}
|
||||
{{- T "all" }}{{ T .Data.Plural | default (humanize .Data.Plural) }} | {{ .Site.Title -}}
|
||||
{{- .Title | default (T .Data.Plural) | default (humanize .Data.Plural) }} | {{ .Site.Title -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "content" -}}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -14,7 +14,7 @@
|
|||
}
|
||||
|
||||
isMobile() {
|
||||
return window.matchMedia('only screen and (max-width: 720px)').matches;
|
||||
return window.matchMedia('only screen and (max-width: 680px)').matches;
|
||||
}
|
||||
|
||||
isTocStatic() {
|
||||
|
@ -258,14 +258,14 @@
|
|||
header.classList.add('fadeInDown');
|
||||
}
|
||||
});
|
||||
if (this.newScrollTop > 400) {
|
||||
if (this.newScrollTop > 200) {
|
||||
if (scroll > MIN_SCROLL) {
|
||||
toTopButton.classList.remove('fadeIn');
|
||||
toTopButton.classList.add('fadeOut');
|
||||
toTopButton.classList.remove('fadeInUp');
|
||||
toTopButton.classList.add('fadeOutDown');
|
||||
} else if (scroll < - MIN_SCROLL) {
|
||||
toTopButton.style.display = 'block';
|
||||
toTopButton.classList.remove('fadeOut');
|
||||
toTopButton.classList.add('fadeIn');
|
||||
toTopButton.classList.remove('fadeOutDown');
|
||||
toTopButton.classList.add('fadeInUp');
|
||||
}
|
||||
} else {
|
||||
toTopButton.style.display = 'none';
|
||||
|
|
Loading…
Reference in a new issue