Add optional Read more. Close #47
This commit is contained in:
parent
09f5cf0373
commit
3d08f96509
7 changed files with 14 additions and 10 deletions
|
@ -4,13 +4,16 @@
|
|||
{{ partial "languageSelect.html" . }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
|
||||
<div class="common-footer-bottom">
|
||||
<div class="copyright">
|
||||
<p>© {{ if isset .Site.Params "author"}}{{ .Site.Params.author }}, {{end}}{{ now.Year }}<br>
|
||||
{{ 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>
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue