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/).
|
||||
|
||||
@ -20,6 +20,7 @@ Anubis is a simple minimalist theme for [Hugo blog engine](https://gohugo.io/).
|
||||
- Robots.txt
|
||||
- Favorite posts
|
||||
- Pagination on post single page
|
||||
- Optional "Read more" link
|
||||
|
||||
## Installation
|
||||
|
||||
@ -66,6 +67,7 @@ params:
|
||||
dateFormat: "2006-01-02"
|
||||
paginationSinglePost: true
|
||||
style: light-without-switcher
|
||||
readMore: false
|
||||
|
||||
markup:
|
||||
goldmark:
|
||||
@ -113,7 +115,7 @@ Enabled by `paginationSinglePost` param in `params` section of config.
|
||||
|
||||
## 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
|
||||
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
|
||||
MIT
|
||||
|
||||
(c) Dmitry Kolosov
|
||||
© Dmitry Kolosov
|
||||
2020
|
||||
|
@ -16,6 +16,7 @@ googleAnalytics = ""
|
||||
dateFormat = "2006-01-02"
|
||||
paginationSinglePost = true
|
||||
style = "light-without-switcher"
|
||||
readMore = false
|
||||
|
||||
[menu]
|
||||
|
||||
|
@ -9,13 +9,11 @@ aliases:
|
||||
author: "Hugo Authors"
|
||||
menu:
|
||||
about:
|
||||
identifier: about
|
||||
name: About
|
||||
title: About
|
||||
url: /about
|
||||
weight: 1
|
||||
subpage:
|
||||
identifier: subpage
|
||||
parent: about
|
||||
name: Subpage
|
||||
title: Subpage
|
||||
|
@ -17,6 +17,7 @@ googleAnalytics = ""
|
||||
dateFormat = "2006-01-02"
|
||||
paginationSinglePost = true
|
||||
style = "light-without-switcher"
|
||||
readMore = false
|
||||
|
||||
[languages.en]
|
||||
languageName = "English"
|
||||
|
@ -36,3 +36,9 @@ toAllCategories:
|
||||
|
||||
skipToContent:
|
||||
other: "Zum Hauptinhalt springen"
|
||||
|
||||
darkTheme:
|
||||
other: "Dunkles thema"
|
||||
|
||||
lightTheme:
|
||||
other: "Licht thema"
|
||||
|
@ -35,4 +35,10 @@ toAllCategories:
|
||||
other: "to all categories"
|
||||
|
||||
skipToContent:
|
||||
other: "skip to main content"
|
||||
other: "skip to main content"
|
||||
|
||||
darkTheme:
|
||||
other: "dark theme"
|
||||
|
||||
lightTheme:
|
||||
other: "light theme"
|
||||
|
@ -35,4 +35,10 @@ toAllCategories:
|
||||
other: "vers toutes les catégories"
|
||||
|
||||
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:
|
||||
other: "przejdź do głównej zawartości"
|
||||
|
||||
darkTheme:
|
||||
other: "ciemny schemat"
|
||||
|
||||
lightTheme:
|
||||
other: "lekki schemat"
|
||||
|
@ -35,4 +35,10 @@ toAllCategories:
|
||||
other: "ко списку всех категорий"
|
||||
|
||||
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 }}
|
||||
{{ partial "languageSelect.html" . }}
|
||||
{{ end }}
|
||||
|
||||
<div class="common-footer-bottom">
|
||||
{{ if .Site.Menus.footer }}
|
||||
{{ $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>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{{ partial "themeSwitcher.html" . }}
|
||||
</div>
|
||||
{{ partial "themeSwitcher.html" . }}
|
||||
</footer>
|
||||
|
@ -1,9 +1,13 @@
|
||||
<h1 class="site-title">
|
||||
<a href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Title }}</a>
|
||||
</h1>
|
||||
<nav>
|
||||
{{ $currentPage := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
<a class="{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ if .Site.Menus.main }}
|
||||
<nav>
|
||||
{{ $currentPage := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
<a class="{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ else }}
|
||||
<nav></nav>
|
||||
{{ end }}
|
||||
|
@ -6,11 +6,11 @@
|
||||
<div class="content post-summary">
|
||||
{{ .Summary | safeHTML }}
|
||||
</div>
|
||||
<!-- {{ if .Truncated }}
|
||||
{{ if and (.Truncated) (.Site.Params.readMore) }}
|
||||
<div class="read-more">
|
||||
<a href="{{ .RelPermalink }}">{{ i18n "readMore" | humanize }}</a>
|
||||
</div>
|
||||
{{ end }} -->
|
||||
{{ end }}
|
||||
|
||||
{{ partial "postInfo.html" . }}
|
||||
</article>
|
@ -5,7 +5,7 @@
|
||||
|
||||
{{ if not (in (slice "light-without-switcher" "dark-without-switcher" "auto-without-switcher") $style) }}
|
||||
<button class="theme-switcher">
|
||||
Dark theme
|
||||
{{ i18n "darkTheme" | humanize }}
|
||||
</button>
|
||||
|
||||
<script>
|
||||
@ -36,8 +36,6 @@
|
||||
switchButton.addEventListener('click', switchTheme, false)
|
||||
})
|
||||
|
||||
|
||||
|
||||
function detectCurrentScheme() {
|
||||
if (localStorage.getItem(STORAGE_KEY)) {
|
||||
return localStorage.getItem(STORAGE_KEY)
|
||||
@ -55,9 +53,8 @@
|
||||
}
|
||||
|
||||
function changeButtonText()
|
||||
{
|
||||
console.log(currentTheme)
|
||||
switchButton.textContent = currentTheme == 'dark' ? 'Light theme' : 'Dark theme'
|
||||
{
|
||||
switchButton.textContent = currentTheme == 'dark' ? {{ i18n "lightTheme" | humanize }} : {{ i18n "darkTheme" | humanize }}
|
||||
}
|
||||
|
||||
function switchTheme(e) {
|
||||
|
@ -343,7 +343,7 @@ article figcaption {
|
||||
}
|
||||
|
||||
.read-more {
|
||||
font-size: 0.85em;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.divider {
|
||||
@ -442,6 +442,7 @@ ul.language-select > li, ul.footer-menu > li {
|
||||
font-size: 16px;
|
||||
border: none;
|
||||
margin-right: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
/* Media Queries */
|
||||
@ -473,7 +474,7 @@ ul.language-select > li, ul.footer-menu > li {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
header nav {
|
||||
header nav:not(:empty){
|
||||
background: var(--pagination-bg-color);
|
||||
margin-top: 1em;
|
||||
max-width: 100%;
|
||||
|
Loading…
Reference in New Issue
Block a user