Merge pull request #147 from dillonzq/feature/adjust_style

feat(style): adjust style of header, tags and dynamic-to-top button
This commit is contained in:
Dillon
2020-03-14 14:50:13 +08:00
committed by GitHub
23 changed files with 146 additions and 130 deletions

View File

@@ -65,7 +65,6 @@ b, strong {
a { a {
color: $global-link-color; color: $global-link-color;
text-decoration: none; text-decoration: none;
transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
&:hover { &:hover {
color: $global-link-hover-color; color: $global-link-hover-color;
@@ -82,47 +81,48 @@ a {
b, strong { b, strong {
font-weight: bold; font-weight: bold;
.dark-theme & {
color: #ddd;
}
} }
#dynamic-to-top { #dynamic-to-top {
display: none; display: none;
overflow: hidden; overflow: hidden;
width: auto; width: auto;
z-index: 90; z-index: 100;
position: fixed; position: fixed;
bottom: 2rem; bottom: 2rem;
right: 2rem; right: 2rem;
top: auto; top: auto;
left: auto; left: auto;
font-family: sans-serif; font-size: 1.4rem;
font-size: 1rem; line-height: 1.8rem;
color: #fff; padding: .6rem .6rem;
text-decoration: none; color: $global-font-secondary-color;
font-weight: bold; background: $header-background-color;
padding: 1rem 1rem;
border: 1px solid $global-border-color; border: 1px solid $global-border-color;
background: #222; border-radius: 2rem;
outline: none;
&:hover { &:hover, &:active {
background: #000; color: $global-font-color;
background: $global-background-color;
cursor: pointer; cursor: pointer;
} }
&:active {
background: #000; &:active, &:focus, &:hover {
outline: none; outline: none;
} }
&:focus, &:hover {
outline: none;
}
span {
display: block;
overflow: hidden;
width: .875rem;
height: .75rem;
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAKCAYAAACE2W/HAAAACXBIWXMAAArwAAAK8AFCrDSYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNR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brnjg+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 & { .dark-theme & {
border: 1px solid $global-border-color-dark; 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;
}
} }
} }

View File

@@ -31,7 +31,7 @@
@media only screen and (max-width: 960px) { @media only screen and (max-width: 960px) {
#header-desktop { #header-desktop {
.header-wrapper { .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 { #header-desktop {
display: none; display: none;
} }

View File

@@ -22,14 +22,14 @@
color: $single-link-color; color: $single-link-color;
.dark-theme & { .dark-theme & {
color: $single-link-color-dark; color: $global-link-color-dark;
} }
&:hover { &:hover {
color: $single-link-hover-color; color: $single-link-hover-color;
.dark-theme & { .dark-theme & {
color: $single-link-hover-color-dark; color: $global-link-hover-color-dark;
} }
} }
} }
@@ -101,7 +101,6 @@
.dark-theme &:hover { .dark-theme &:hover {
color: $single-link-hover-color-dark; color: $single-link-hover-color-dark;
font-weight: bold;
} }
} }
@@ -179,12 +178,10 @@
min-width: 20%; min-width: 20%;
max-width: 80%; max-width: 80%;
display: inline-block; display: inline-block;
padding: .625rem; padding: .5rem;
margin: 0 auto; margin: 0 auto;
border-bottom: 1px solid #d9d9d9;
font-size: .875rem; font-size: .875rem;
color: #969696; color: #969696;
line-height: 1.7;
} }
img { img {

View File

@@ -14,7 +14,7 @@
&:focus, &:focus,
&:hover { &:hover {
color: $global-link-hover-color; color: $global-link-hover-color;
transform: scale(1.1); transform: scale(1.2);
.dark-theme & { .dark-theme & {
color: $global-link-hover-color-dark; color: $global-link-hover-color-dark;

View File

@@ -8,25 +8,21 @@ header {
} }
.header-title { .header-title {
font-size: 1.5rem;
font-weight: bold; font-weight: bold;
} }
.menu .menu-item {
position: relative;
}
.language-select { .language-select {
font-weight: $global-font-weight; position: absolute;
border: none; opacity: 0;
box-shadow: none; left: 0;
background: transparent; top: 0;
background-image: none; width: 100%;
-webkit-appearance: none; height: 100%;
color: $global-font-color;
.dark-theme & {
color: $global-font-color-dark;
}
&:focus {
outline: none;
}
&:hover { &:hover {
cursor: pointer; cursor: pointer;
@@ -47,23 +43,20 @@ header {
.header-wrapper { .header-wrapper {
width: auto; width: auto;
text-align: center; text-align: center;
margin: 0 4rem; padding: 0 3rem;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.header-title a { .menu {
padding: 0 8px; .menu-item {
font-size: 1.25rem; margin: 0 .5rem;
i { &.theme-switch {
line-height: 2rem; margin: 0 .3rem;
} }
} }
.menu a { a.active {
padding: 0 8px;
&.active {
font-weight: 900; font-weight: 900;
color: $header-hover-color; color: $header-hover-color;
@@ -96,10 +89,6 @@ header {
padding-left: 1rem; padding-left: 1rem;
box-sizing: border-box; box-sizing: border-box;
.header-title {
font-size: 1.25rem;
}
.menu-toggle { .menu-toggle {
cursor: pointer; cursor: pointer;
line-height: 4rem; line-height: 4rem;

View File

@@ -2,12 +2,13 @@
display: block; display: block;
position: absolute; position: absolute;
width: 100%; width: 100%;
max-width: 1000px;
margin-left: 1000px; margin-left: 1000px;
padding: 0 .8rem; padding: 0 .8rem;
border-left: 1px solid $global-border-color; border-left: 1px solid $global-border-color;
overflow-wrap: break-word; overflow-wrap: break-word;
box-sizing: border-box; box-sizing: border-box;
top: if($header-normal-mode-desktop, 7rem, 12rem); top: if($header-normal-mode-desktop, 5rem, 10rem);
.dark-theme & { .dark-theme & {
border-left: 1px solid $global-border-color-dark; border-left: 1px solid $global-border-color-dark;

View File

@@ -50,8 +50,8 @@ $selection-color-dark: rgba(38, 139, 211, 0.3) !default;
// ========== Header ========== // // ========== Header ========== //
// Height of the header // Height of the header
$header-height-desktop: 4rem !default; $header-height-desktop: 3.5rem !default;
$header-height-mobile: 3.8rem !default; $header-height-mobile: 3.5rem !default;
// Color of the header background // Color of the header background
$header-background-color: #f8f8f8 !default; $header-background-color: #f8f8f8 !default;
@@ -77,11 +77,11 @@ $toc-content-font-size: 0.9rem !default;
// Color of the single link // Color of the single link
$single-link-color: #2d96bd !default; $single-link-color: #2d96bd !default;
$single-link-color-dark: #eee !default; $single-link-color-dark: #55bde2 !default;
// Color of the hover single link // Color of the hover single link
$single-link-hover-color: #ef3982 !default; $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 // Color of the table background
$table-background-color: #fff !default; $table-background-color: #fff !default;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -25,7 +25,7 @@ enableEmoji = true
# language code # language code
languageCode = "en" languageCode = "en"
# website title # website title
title = "LoveIt Theme" title = "LoveIt"
# language name # language name
languageName = "English" languageName = "English"
# whether to include Chinese/Japanese/Korean # whether to include Chinese/Japanese/Korean
@@ -66,7 +66,7 @@ enableEmoji = true
[[languages.en.menu.main]] [[languages.en.menu.main]]
identifier = "documentation" identifier = "documentation"
pre = "" pre = ""
name = "Documentation" name = "Docs"
url = "/categories/documentation/" url = "/categories/documentation/"
title = "" title = ""
weight = 4 weight = 4
@@ -77,6 +77,13 @@ enableEmoji = true
url = "/about/" url = "/about/"
title = "" title = ""
weight = 5 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] [languages.en.params]
# site description # site description
description = "About LoveIt Theme" description = "About LoveIt Theme"
@@ -242,7 +249,7 @@ enableEmoji = true
# 网站语言, 仅在这里 CN 大写 # 网站语言, 仅在这里 CN 大写
languageCode = "zh-CN" languageCode = "zh-CN"
# 网站标题 # 网站标题
title = "LoveIt 主题" title = "LoveIt"
# 语言名称 # 语言名称
languageName = "简体中文" languageName = "简体中文"
# 是否包括中日韩文字 # 是否包括中日韩文字
@@ -260,7 +267,7 @@ enableEmoji = true
[[languages.zh-cn.menu.main]] [[languages.zh-cn.menu.main]]
identifier = "posts" identifier = "posts"
pre = "" pre = ""
name = "文章" name = "所有文章"
url = "/posts/" url = "/posts/"
title = "" title = ""
weight = 1 weight = 1
@@ -281,7 +288,7 @@ enableEmoji = true
[[languages.zh-cn.menu.main]] [[languages.zh-cn.menu.main]]
identifier = "documentation" identifier = "documentation"
pre = "" pre = ""
name = "主题文档" name = "文档"
url = "/categories/documentation/" url = "/categories/documentation/"
title = "" title = ""
weight = 4 weight = 4
@@ -292,6 +299,13 @@ enableEmoji = true
url = "/about/" url = "/about/"
title = "" title = ""
weight = 5 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] [languages.zh-cn.params]
# 网站描述 # 网站描述
description = "关于 LoveIt 主题" description = "关于 LoveIt 主题"
@@ -457,7 +471,7 @@ enableEmoji = true
# language code # language code
languageCode = "fr" languageCode = "fr"
# website title # website title
title = "LoveIt Thème" title = "LoveIt"
# language name # language name
languageName = "Français" languageName = "Français"
# whether to include Chinese/Japanese/Korean # whether to include Chinese/Japanese/Korean
@@ -496,7 +510,7 @@ enableEmoji = true
[[languages.fr.menu.main]] [[languages.fr.menu.main]]
identifier = "documentation" identifier = "documentation"
pre = "" pre = ""
name = "Documentation" name = "Docs"
url = "/categories/documentation/" url = "/categories/documentation/"
title = "" title = ""
weight = 4 weight = 4
@@ -507,6 +521,13 @@ enableEmoji = true
url = "/about/" url = "/about/"
title = "" title = ""
weight = 5 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] [languages.fr.params]
# site description # site description
description = "À propos du thème LoveIt" description = "À propos du thème LoveIt"

View File

@@ -0,0 +1,4 @@
---
title: "Documentation"
slug: "documentation"
---

View File

@@ -0,0 +1,4 @@
---
title: "Documentation"
slug: "documentation"
---

View File

@@ -0,0 +1,4 @@
---
title: "文档"
slug: "documentation"
---

View File

@@ -56,7 +56,7 @@
{{- /* Dynamic to top button */ -}} {{- /* Dynamic to top button */ -}}
<a href="#" class="dynamic-to-top animated faster" id="dynamic-to-top"> <a href="#" class="dynamic-to-top animated faster" id="dynamic-to-top">
<span>&nbsp;</span> <i class="fas fa-chevron-up fa-fw"></i>
</a> </a>
{{- /* Load JavaScript scripts and CSS */ -}} {{- /* Load JavaScript scripts and CSS */ -}}

View File

@@ -29,15 +29,14 @@
</span> </span>
{{- with .Params.categories -}} {{- with .Params.categories -}}
&nbsp;<span class="post-category">
{{- T "included" -}}
{{- range . -}}
&nbsp; &nbsp;
<span> <span class="post-category">
<a href="{{ `/categories/` | relLangURL }}{{ urlize .}}"> {{- T "included" -}}
<i class="far fa-folder fa-fw"></i>{{ . | humanize }} {{- range $index, $value := . -}}
{{- if gt $index 0 }}&nbsp;{{ end -}}
<a href="{{ `/categories/` | relLangURL }}{{ urlize $value }}">
<i class="far fa-folder fa-fw"></i>{{ $value | humanize }}
</a> </a>
</span>
{{- end -}} {{- end -}}
</span> </span>
{{- end -}} {{- end -}}
@@ -57,12 +56,10 @@
<a href="{{ .RelPermalink }}">{{ T "readMore" }}</a> <a href="{{ .RelPermalink }}">{{ T "readMore" }}</a>
{{- with .Params.tags -}} {{- with .Params.tags -}}
<div class="post-tags"> <div class="post-tags">
{{- range . -}} <i class="fas fa-tags fa-fw"></i>&nbsp;
&nbsp;<span> {{- range $index, $value := . -}}
<a href="{{ `/tags/` | relLangURL }}{{ urlize .}}"> {{- if gt $index 0 }},&nbsp;{{ end -}}
<i class="fas fa-tag fa-fw"></i>{{ . }} <a href="{{ `/tags/` | relLangURL }}{{ urlize $value }}">{{ $value }}</a>
</a>
</span>
{{- end -}} {{- end -}}
</div> </div>
{{- end -}} {{- end -}}

View File

@@ -2,7 +2,7 @@
<div class="copyright"> <div class="copyright">
{{- /* Hugo and LoveIt */ -}} {{- /* Hugo and LoveIt */ -}}
<div class="copyright-line"> <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>
<div class="copyright-line"> <div class="copyright-line">

View File

@@ -8,15 +8,19 @@
</div> </div>
<div class="menu"> <div class="menu">
{{- range .Site.Menus.main -}} {{- 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 -}} {{- .Pre | safeHTML }}{{ .Name -}}
</a> </a>
{{- end -}} {{- 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 -}} {{- if .Site.IsMultiLingual -}}
&nbsp;|&nbsp;
<a href="javascript:void(0);" class="menu-item" title="{{ T "selectLanguage" }}"> <a href="javascript:void(0);" class="menu-item" title="{{ T "selectLanguage" }}">
<i class="fas fa-language fa-fw"></i>&nbsp; {{- .Language.LanguageName -}}
<select class="language-select" onchange="location = this.value;"> <i class="fas fa-chevron-right fa-fw"></i>
<select class="language-select" id="language-select-desktop" onchange="location = this.value;">
{{- range .Page.AllTranslations -}} {{- range .Page.AllTranslations -}}
{{- $translation := . -}} {{- $translation := . -}}
{{- range $.Site.Languages -}} {{- range $.Site.Languages -}}
@@ -32,9 +36,6 @@
</select> </select>
</a> </a>
{{- end -}} {{- end -}}
<a href="javascript:void(0);" class="theme-switch" title="{{ T "switchTheme" }}">
<i class="fas fa-adjust fa-fw "></i>
</a>
</div> </div>
</div> </div>
</header> </header>
@@ -55,13 +56,17 @@
<div class="menu" id="menu-mobile"> <div class="menu" id="menu-mobile">
{{- $currentPage := . -}} {{- $currentPage := . -}}
{{- range .Site.Menus.main -}} {{- 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 -}} {{- .Pre | safeHTML }}{{ .Name -}}
</a> </a>
{{- end -}} {{- 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 -}} {{- if .Site.IsMultiLingual -}}
<a href="javascript:void(0);" class="menu-item" title="{{ T "selectLanguage" }}"> <a href="javascript:void(0);" class="menu-item" title="{{ T "selectLanguage" }}">
<i class="fas fa-language fa-fw"></i>&nbsp; {{- .Language.LanguageName -}}
<i class="fas fa-chevron-right fa-fw"></i>
<select class="language-select" onchange="location = this.value;"> <select class="language-select" onchange="location = this.value;">
{{- range .Page.AllTranslations -}} {{- range .Page.AllTranslations -}}
{{- $translation := . -}} {{- $translation := . -}}
@@ -78,9 +83,6 @@
</select> </select>
</a> </a>
{{- end -}} {{- end -}}
<a href="javascript:void(0);" class="theme-switch" title="{{ T "switchTheme" }}">
<i class="fas fa-adjust fa-fw"></i>
</a>
</div> </div>
</div> </div>
</header> </header>

View File

@@ -44,12 +44,10 @@
<div class="post-info-more"> <div class="post-info-more">
<section> <section>
{{- with .Params.tags -}} {{- with .Params.tags -}}
{{- range . -}} <i class="fas fa-tags fa-fw"></i>&nbsp;
<span> {{- range $index, $value := . -}}
<a href="{{ `/tags/` | relLangURL }}{{ urlize .}}"> {{- if gt $index 0 }},&nbsp;{{ end -}}
<i class="fas fa-tag fa-fw"></i>{{ . }} <a href="{{ `/tags/` | relLangURL }}{{ urlize $value }}">{{ $value }}</a>
</a>
</span>&nbsp;
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
</section> </section>

View File

@@ -17,15 +17,14 @@
</span> </span>
{{- with .Params.categories -}} {{- with .Params.categories -}}
&nbsp;<span class="post-category">
{{- T "included" -}}
{{- range . -}}
&nbsp; &nbsp;
<span> <span class="post-category">
<a href="{{ `/categories/` | relLangURL }}{{ urlize .}}"> {{- T "included" -}}
<i class="far fa-folder fa-fw"></i>{{ . | humanize }} {{- range $index, $value := . -}}
{{- if gt $index 0 }}&nbsp;{{ end -}}
<a href="{{ `/categories/` | relLangURL }}{{ urlize $value }}">
<i class="far fa-folder fa-fw"></i>{{ $value | humanize }}
</a> </a>
</span>
{{- end -}} {{- end -}}
</span> </span>
{{- end -}} {{- end -}}

View File

@@ -1,5 +1,5 @@
{{- define "title" -}} {{- define "title" -}}
{{- .Title | humanize }} | {{ T .Data.Singular | default (humanize .Data.Singular) }} | {{ .Site.Title -}} {{- .Title }} | {{ T .Data.Singular | default (humanize .Data.Singular) }} | {{ .Site.Title -}}
{{- end -}} {{- end -}}
{{- define "content" -}} {{- define "content" -}}

View File

@@ -1,5 +1,5 @@
{{- define "title" -}} {{- 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 -}} {{- end -}}
{{- define "content" -}} {{- define "content" -}}

View File

@@ -14,7 +14,7 @@
} }
isMobile() { isMobile() {
return window.matchMedia('only screen and (max-width: 720px)').matches; return window.matchMedia('only screen and (max-width: 680px)').matches;
} }
isTocStatic() { isTocStatic() {
@@ -258,14 +258,14 @@
header.classList.add('fadeInDown'); header.classList.add('fadeInDown');
} }
}); });
if (this.newScrollTop > 400) { if (this.newScrollTop > 200) {
if (scroll > MIN_SCROLL) { if (scroll > MIN_SCROLL) {
toTopButton.classList.remove('fadeIn'); toTopButton.classList.remove('fadeInUp');
toTopButton.classList.add('fadeOut'); toTopButton.classList.add('fadeOutDown');
} else if (scroll < - MIN_SCROLL) { } else if (scroll < - MIN_SCROLL) {
toTopButton.style.display = 'block'; toTopButton.style.display = 'block';
toTopButton.classList.remove('fadeOut'); toTopButton.classList.remove('fadeOutDown');
toTopButton.classList.add('fadeIn'); toTopButton.classList.add('fadeInUp');
} }
} else { } else {
toTopButton.style.display = 'none'; toTopButton.style.display = 'none';