Merge branch 'master' into master
This commit is contained in:
commit
d40b63815f
@ -1,4 +1,4 @@
|
|||||||
# Anubis Theme for Hugo
|
# Anubis Theme for Hugo [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) [![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://www.paypal.com/paypalme/mitrichius/1)
|
||||||
|
|
||||||
Anubis is a simple minimalist theme for [Hugo blog engine](https://gohugo.io/).
|
Anubis is a simple minimalist theme for [Hugo blog engine](https://gohugo.io/).
|
||||||
|
|
||||||
@ -20,6 +20,7 @@ Anubis is a simple minimalist theme for [Hugo blog engine](https://gohugo.io/).
|
|||||||
- Robots.txt
|
- Robots.txt
|
||||||
- Favorite posts
|
- Favorite posts
|
||||||
- Pagination on post single page
|
- Pagination on post single page
|
||||||
|
- Optional "Read more" link
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@ -66,6 +67,7 @@ params:
|
|||||||
dateFormat: "2006-01-02"
|
dateFormat: "2006-01-02"
|
||||||
paginationSinglePost: true
|
paginationSinglePost: true
|
||||||
style: light-without-switcher
|
style: light-without-switcher
|
||||||
|
readMore: false
|
||||||
|
|
||||||
markup:
|
markup:
|
||||||
goldmark:
|
goldmark:
|
||||||
@ -113,7 +115,7 @@ Enabled by `paginationSinglePost` param in `params` section of config.
|
|||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
If you find a bug or have an idea for a feature, feel free to write an [issue](https://github.com/mitrichius/hugo-theme-anubis/issues).
|
If you find a bug or have an idea for a feature, feel free to write an [issue](https://github.com/mitrichius/hugo-theme-anubis/issues) or make a PR.
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
See [issues](https://github.com/mitrichius/hugo-theme-anubis/issues).
|
See [issues](https://github.com/mitrichius/hugo-theme-anubis/issues).
|
||||||
@ -121,5 +123,5 @@ See [issues](https://github.com/mitrichius/hugo-theme-anubis/issues).
|
|||||||
## License
|
## License
|
||||||
MIT
|
MIT
|
||||||
|
|
||||||
(c) Dmitry Kolosov
|
© Dmitry Kolosov
|
||||||
2020
|
2020
|
||||||
|
@ -16,6 +16,7 @@ googleAnalytics = ""
|
|||||||
dateFormat = "2006-01-02"
|
dateFormat = "2006-01-02"
|
||||||
paginationSinglePost = true
|
paginationSinglePost = true
|
||||||
style = "light-without-switcher"
|
style = "light-without-switcher"
|
||||||
|
readMore = false
|
||||||
|
|
||||||
[menu]
|
[menu]
|
||||||
|
|
||||||
|
@ -9,13 +9,11 @@ aliases:
|
|||||||
author: "Hugo Authors"
|
author: "Hugo Authors"
|
||||||
menu:
|
menu:
|
||||||
about:
|
about:
|
||||||
identifier: about
|
|
||||||
name: About
|
name: About
|
||||||
title: About
|
title: About
|
||||||
url: /about
|
url: /about
|
||||||
weight: 1
|
weight: 1
|
||||||
subpage:
|
subpage:
|
||||||
identifier: subpage
|
|
||||||
parent: about
|
parent: about
|
||||||
name: Subpage
|
name: Subpage
|
||||||
title: Subpage
|
title: Subpage
|
||||||
|
@ -17,6 +17,7 @@ googleAnalytics = ""
|
|||||||
dateFormat = "2006-01-02"
|
dateFormat = "2006-01-02"
|
||||||
paginationSinglePost = true
|
paginationSinglePost = true
|
||||||
style = "light-without-switcher"
|
style = "light-without-switcher"
|
||||||
|
readMore = false
|
||||||
|
|
||||||
[languages.en]
|
[languages.en]
|
||||||
languageName = "English"
|
languageName = "English"
|
||||||
|
@ -36,3 +36,9 @@ toAllCategories:
|
|||||||
|
|
||||||
skipToContent:
|
skipToContent:
|
||||||
other: "Zum Hauptinhalt springen"
|
other: "Zum Hauptinhalt springen"
|
||||||
|
|
||||||
|
darkTheme:
|
||||||
|
other: "Dunkles thema"
|
||||||
|
|
||||||
|
lightTheme:
|
||||||
|
other: "Licht thema"
|
||||||
|
@ -36,3 +36,9 @@ toAllCategories:
|
|||||||
|
|
||||||
skipToContent:
|
skipToContent:
|
||||||
other: "skip to main content"
|
other: "skip to main content"
|
||||||
|
|
||||||
|
darkTheme:
|
||||||
|
other: "dark theme"
|
||||||
|
|
||||||
|
lightTheme:
|
||||||
|
other: "light theme"
|
||||||
|
@ -36,3 +36,9 @@ toAllCategories:
|
|||||||
|
|
||||||
skipToContent:
|
skipToContent:
|
||||||
other: "passer au contenu principal"
|
other: "passer au contenu principal"
|
||||||
|
|
||||||
|
darkTheme:
|
||||||
|
other: "thème sombre"
|
||||||
|
|
||||||
|
lightTheme:
|
||||||
|
other: "thème léger"
|
||||||
|
@ -36,3 +36,9 @@ toAllCategories:
|
|||||||
|
|
||||||
skipToContent:
|
skipToContent:
|
||||||
other: "przejdź do głównej zawartości"
|
other: "przejdź do głównej zawartości"
|
||||||
|
|
||||||
|
darkTheme:
|
||||||
|
other: "ciemny schemat"
|
||||||
|
|
||||||
|
lightTheme:
|
||||||
|
other: "lekki schemat"
|
||||||
|
@ -36,3 +36,9 @@ toAllCategories:
|
|||||||
|
|
||||||
skipToContent:
|
skipToContent:
|
||||||
other: "перейти к основному контенту"
|
other: "перейти к основному контенту"
|
||||||
|
|
||||||
|
darkTheme:
|
||||||
|
other: "тёмная тема"
|
||||||
|
|
||||||
|
lightTheme:
|
||||||
|
other: "светлая тема"
|
||||||
|
44
i18n/tw.yaml
Normal file
44
i18n/tw.yaml
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
powered:
|
||||||
|
other: "提供"
|
||||||
|
|
||||||
|
theme:
|
||||||
|
other: "主題"
|
||||||
|
|
||||||
|
readMore:
|
||||||
|
other: "繼續閱讀"
|
||||||
|
|
||||||
|
toNewPosts:
|
||||||
|
other: "新文章"
|
||||||
|
|
||||||
|
toOldPosts:
|
||||||
|
other: "舊文章"
|
||||||
|
|
||||||
|
tag:
|
||||||
|
other: "標籤"
|
||||||
|
|
||||||
|
Tags:
|
||||||
|
other: "標籤"
|
||||||
|
|
||||||
|
Posts:
|
||||||
|
other: "文章"
|
||||||
|
|
||||||
|
category:
|
||||||
|
other: "類別"
|
||||||
|
|
||||||
|
Categories:
|
||||||
|
other: "類別"
|
||||||
|
|
||||||
|
toAllTags:
|
||||||
|
other: "所有標籤"
|
||||||
|
|
||||||
|
toAllCategories:
|
||||||
|
other: "所有類別"
|
||||||
|
|
||||||
|
skipToContent:
|
||||||
|
other: "跳至內容"
|
||||||
|
|
||||||
|
darkTheme:
|
||||||
|
other: "暗色主題"
|
||||||
|
|
||||||
|
lightTheme:
|
||||||
|
other: "亮色主題"
|
@ -3,6 +3,7 @@
|
|||||||
{{ if gt $languagesCount 1 }}
|
{{ if gt $languagesCount 1 }}
|
||||||
{{ partial "languageSelect.html" . }}
|
{{ partial "languageSelect.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="common-footer-bottom">
|
<div class="common-footer-bottom">
|
||||||
{{ if .Site.Menus.footer }}
|
{{ if .Site.Menus.footer }}
|
||||||
{{ $currentPage := . }}
|
{{ $currentPage := . }}
|
||||||
@ -17,6 +18,7 @@
|
|||||||
{{ i18n "powered" | humanize }} <a target="_blank" rel="noopener noreferrer" href="https://gohugo.io/">Hugo</a>, {{ i18n "theme" }} <a target="_blank" rel="noopener noreferrer" href="https://github.com/mitrichius/hugo-theme-anubis">Anubis</a>.
|
{{ i18n "powered" | humanize }} <a target="_blank" rel="noopener noreferrer" href="https://gohugo.io/">Hugo</a>, {{ i18n "theme" }} <a target="_blank" rel="noopener noreferrer" href="https://github.com/mitrichius/hugo-theme-anubis">Anubis</a>.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{{ partial "themeSwitcher.html" . }}
|
{{ partial "themeSwitcher.html" . }}
|
||||||
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
<h1 class="site-title">
|
<h1 class="site-title">
|
||||||
<a href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Title }}</a>
|
<a href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Title }}</a>
|
||||||
</h1>
|
</h1>
|
||||||
<nav>
|
{{ if .Site.Menus.main }}
|
||||||
|
<nav>
|
||||||
{{ $currentPage := . }}
|
{{ $currentPage := . }}
|
||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
<a class="{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
|
<a class="{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</nav>
|
</nav>
|
||||||
|
{{ else }}
|
||||||
|
<nav></nav>
|
||||||
|
{{ end }}
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
<div class="content post-summary">
|
<div class="content post-summary">
|
||||||
{{ .Summary | safeHTML }}
|
{{ .Summary | safeHTML }}
|
||||||
</div>
|
</div>
|
||||||
<!-- {{ if .Truncated }}
|
{{ if and (.Truncated) (.Site.Params.readMore) }}
|
||||||
<div class="read-more">
|
<div class="read-more">
|
||||||
<a href="{{ .RelPermalink }}">{{ i18n "readMore" | humanize }}</a>
|
<a href="{{ .RelPermalink }}">{{ i18n "readMore" | humanize }}</a>
|
||||||
</div>
|
</div>
|
||||||
{{ end }} -->
|
{{ end }}
|
||||||
|
|
||||||
{{ partial "postInfo.html" . }}
|
{{ partial "postInfo.html" . }}
|
||||||
</article>
|
</article>
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
{{ if not (in (slice "light-without-switcher" "dark-without-switcher" "auto-without-switcher") $style) }}
|
{{ if not (in (slice "light-without-switcher" "dark-without-switcher" "auto-without-switcher") $style) }}
|
||||||
<button class="theme-switcher">
|
<button class="theme-switcher">
|
||||||
Dark theme
|
{{ i18n "darkTheme" | humanize }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -36,8 +36,6 @@
|
|||||||
switchButton.addEventListener('click', switchTheme, false)
|
switchButton.addEventListener('click', switchTheme, false)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function detectCurrentScheme() {
|
function detectCurrentScheme() {
|
||||||
if (localStorage.getItem(STORAGE_KEY)) {
|
if (localStorage.getItem(STORAGE_KEY)) {
|
||||||
return localStorage.getItem(STORAGE_KEY)
|
return localStorage.getItem(STORAGE_KEY)
|
||||||
@ -56,8 +54,7 @@
|
|||||||
|
|
||||||
function changeButtonText()
|
function changeButtonText()
|
||||||
{
|
{
|
||||||
console.log(currentTheme)
|
switchButton.textContent = currentTheme == 'dark' ? {{ i18n "lightTheme" | humanize }} : {{ i18n "darkTheme" | humanize }}
|
||||||
switchButton.textContent = currentTheme == 'dark' ? 'Light theme' : 'Dark theme'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function switchTheme(e) {
|
function switchTheme(e) {
|
||||||
|
@ -343,7 +343,7 @@ article figcaption {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.read-more {
|
.read-more {
|
||||||
font-size: 0.85em;
|
margin: 1em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.divider {
|
.divider {
|
||||||
@ -442,6 +442,7 @@ ul.language-select > li, ul.footer-menu > li {
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
border: none;
|
border: none;
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Media Queries */
|
/* Media Queries */
|
||||||
@ -473,7 +474,7 @@ ul.language-select > li, ul.footer-menu > li {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
header nav {
|
header nav:not(:empty){
|
||||||
background: var(--pagination-bg-color);
|
background: var(--pagination-bg-color);
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
Loading…
Reference in New Issue
Block a user