💄🔧 Update the sidebar info.
This commit is contained in:
parent
a2019876a2
commit
835e98d85d
20
i18n/en.yaml
20
i18n/en.yaml
@ -18,9 +18,6 @@ CateTitle:
|
||||
AllSome:
|
||||
other: "All {{ .Some }}"
|
||||
|
||||
NavToggleLabel:
|
||||
other: Toggle navigation bar
|
||||
|
||||
MSearchLabel:
|
||||
other: Search
|
||||
|
||||
@ -31,12 +28,23 @@ SymbolComma:
|
||||
SymbolPeriod:
|
||||
other: "."
|
||||
|
||||
Sidebar:
|
||||
label:
|
||||
posts: Posts
|
||||
categories: Categories
|
||||
tags: Tags
|
||||
rss: RSS
|
||||
ccommons: "Creative Commons"
|
||||
navToggle: "Toggle Navigation Bar"
|
||||
toc: TOC
|
||||
overview: Overview
|
||||
|
||||
SbPostsLable:
|
||||
other: "Posts"
|
||||
other: ""
|
||||
SbCatesTitle:
|
||||
other: "Categories"
|
||||
other: ""
|
||||
SbTagsTitle:
|
||||
other: "Tags"
|
||||
other: ""
|
||||
TableOfContents:
|
||||
other: "TOC"
|
||||
SiteOverview:
|
||||
|
@ -32,20 +32,17 @@ SymbolComma:
|
||||
SymbolPeriod:
|
||||
other: "。"
|
||||
|
||||
SbPostsLable:
|
||||
other: 日志
|
||||
SbCatesTitle:
|
||||
other: 分类
|
||||
SbTagsTitle:
|
||||
other: 标签
|
||||
TableOfContents:
|
||||
other: 文章目录
|
||||
SiteOverview:
|
||||
other: 站点概览
|
||||
RSSLable:
|
||||
other: RSS 订阅
|
||||
CCLinkTitle:
|
||||
other: 共享知识
|
||||
Sidebar:
|
||||
label:
|
||||
posts: 日志
|
||||
categories: 分类
|
||||
tags: 标签
|
||||
rss: RSS 订阅
|
||||
ccommons: 共享知识
|
||||
toc: 文章目录
|
||||
overview: 站点概览
|
||||
navToggle: 切换导航栏
|
||||
search: 搜索
|
||||
|
||||
TagsCounterTitle:
|
||||
zero: 暂无标签
|
||||
|
@ -17,7 +17,7 @@
|
||||
{{ if or .Site.Params.algoliaSearch.enable .Site.Params.localSearch.enable }}
|
||||
<li class="menu-item menu-item-search">
|
||||
<a role="button" class="popup-trigger hvr-icon-pulse">
|
||||
{{ if $ms.icons }}<i class="fa fa-search fa-fw hvr-icon"></i>{{ end }}{{ T "MSearchLabel" }}
|
||||
{{ if $ms.icons }}<i class="fa fa-search fa-fw hvr-icon"></i>{{ end }}{{ T "Sidebar.label.search" }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
@ -1,82 +0,0 @@
|
||||
{{ $SP := .Site.Params }}
|
||||
<aside class="sidebar">
|
||||
<div class="sidebar-inner sidebar-overview-active">
|
||||
<ul class="sidebar-nav">
|
||||
<li class="sidebar-nav-toc">{{ T "TableOfContents" }}</li>
|
||||
<li class="sidebar-nav-overview">{{ T "SiteInfo" }}</li>
|
||||
</ul>
|
||||
<div class="sidebar-panel-container">
|
||||
<div class="post-toc-wrap sidebar-panel">
|
||||
</div>
|
||||
<div class="site-overview-wrap sidebar-panel">
|
||||
<div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
|
||||
<img class="site-author-image" itemprop="image" alt="{{ $SP.author }}" src="{{ $SP.avatar.url }}">
|
||||
<p class="site-author-name" itemprop="name">{{ $SP.author }}</p>
|
||||
<div class="site-description" itemprop="description">{{ $SP.description }}</div>
|
||||
</div>
|
||||
<div class="site-state-wrap site-overview-item animated">
|
||||
{{ if $SP.siteState }}
|
||||
<nav class="site-state">
|
||||
<div class="site-state-item site-state-posts">
|
||||
<a href="{{ "/archives/" | relLangURL }}">
|
||||
<span class="site-state-item-count">{{ len (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) }}</span>
|
||||
<span class="site-state-item-name">{{ T "SitePostsTitle" }}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="site-state-item site-state-categories">
|
||||
<a href="{{ "/categories/" | relLangURL }}">
|
||||
<span class="site-state-item-count">{{ len .Site.Taxonomies.categories }}</span>
|
||||
<span class="site-state-item-name">{{ T "SiteCatesTitle" }}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="site-state-item site-state-tags">
|
||||
<a href="{{ "/tags/" | relLangURL }}">
|
||||
<span class="site-state-item-count">{{ len .Site.Taxonomies.tags }}</span>
|
||||
<span class="site-state-item-name">{{ T "SiteTagsTitle" }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
{{ end }}
|
||||
<div class="rss-link">
|
||||
<a href="{{ "/index.xml" | relLangURL }}" rel="alternate" type="application/rss+xml" target="_blank">
|
||||
<i class="fa fa-rss"></i>
|
||||
{{ T "RSSTitle" }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="links-of-social site-overview-item animated">
|
||||
{{ $si := $SP.socialIcons }}
|
||||
{{ range $SP.socials }}
|
||||
{{ range $name,$val := . }}
|
||||
{{ $vals := split $val "||" }}
|
||||
{{ $url := trim (index $vals 0) " " }}
|
||||
{{ $icon := trim (index $vals 1) " " }}
|
||||
<span class="links-of-social-item">
|
||||
<a href="{{ $url }}" title="{{ $name }} → {{ $url }}" rel="noopener" {{ if and $si.enable $si.transition }} class="hvr-icon-pulse" {{ end }} target="_blank">
|
||||
{{ if $si.enable }}
|
||||
<i class="{{ $icon }} fa-fw {{ if $si.transition }} hvr-icon {{ end }}"></i>
|
||||
{{ end }}
|
||||
{{ if or (not $si.enable) (not $si.iconsOnly) }}
|
||||
{{ $name }}
|
||||
{{ end }}
|
||||
</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ $cc := $SP.creativeCommons }}
|
||||
{{ if and $cc $cc.sidebar }}
|
||||
<div class="cc-license animated" itemprop="license">
|
||||
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.{{ substr .Site.Language 0 2 }}" class="cc-opacity" rel="noopener" target="_blank" title="{{ T "CCLinkTitle" }}">
|
||||
<img src="/imgs/cc/{{ $cc.size }}/{{ replace $cc.license "-" "_" }}.svg" alt="{{ T "CCLinkTitle" }}">
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="back-to-top" role="button" aria-label="返回顶部">
|
||||
<i class="fa fa-arrow-up"></i>
|
||||
<span>0%</span>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
@ -1,6 +1,6 @@
|
||||
{{ if .Site.Params.creativeCommons.post }}
|
||||
<div class="post-copyright">
|
||||
<img src="/imgs/cc/cc.svg" width="75" height="75" align="right" alt="{{ T "CCLinkTitle" }}"/>
|
||||
<img src="/imgs/cc/cc.svg" width="75" height="75" align="right" alt="{{ T "Sidebar.label.ccommons" }}"/>
|
||||
<ul>
|
||||
<li class="post-copyright-title">
|
||||
<strong>{{ print (T "PostCopyRight.title") (T "SymbolColon") }}</strong>
|
||||
|
@ -3,16 +3,15 @@
|
||||
<span class="toggle-line"></span>
|
||||
<span class="toggle-line"></span>
|
||||
</div>
|
||||
{{ $tocEnable := and .IsPage .Params.toc | default .Site.Params.toc.enable }}
|
||||
<aside class="sidebar">
|
||||
{{ $tocEnable := and .IsPage .Params.toc | default .Site.Params.toc.enable }}
|
||||
|
||||
<div class="sidebar-inner {{ if $tocEnable }}sidebar-nav-active sidebar-toc-active{{ else }}sidebar-overview-active{{ end }}">
|
||||
<ul class="sidebar-nav">
|
||||
<li class="sidebar-nav-toc">
|
||||
{{ T "TableOfContents" }}
|
||||
{{ T "Sidebar.label.toc" }}
|
||||
</li>
|
||||
<li class="sidebar-nav-overview">
|
||||
{{ T "SiteOverview" }}
|
||||
{{ T "Sidebar.label.overview" }}
|
||||
</li>
|
||||
</ul>
|
||||
<div class="sidebar-panel-container">
|
||||
|
@ -14,19 +14,19 @@
|
||||
<div class="site-state-item site-state-posts">
|
||||
<a href="{{ "/archives/" | relLangURL }}">
|
||||
<span class="site-state-item-count">{{ .Scratch.Get "postsCount" }}</span>
|
||||
<span class="site-state-item-name">{{ T "SbPostsLable" }}</span>
|
||||
<span class="site-state-item-name">{{ T "Sidebar.label.posts" }}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="site-state-item site-state-categories">
|
||||
<a href="{{ "/categories/" | relLangURL }}">
|
||||
<span class="site-state-item-count">{{ .Scratch.Get "catsCount" }}</span>
|
||||
<span class="site-state-item-name">{{ T "SbCatesTitle" }}</span>
|
||||
<span class="site-state-item-name">{{ T "Sidebar.label.categories" }}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="site-state-item site-state-tags">
|
||||
<a href="{{ "/tags/" | relLangURL }}">
|
||||
<span class="site-state-item-count">{{ .Scratch.Get "tagsCount" }}</span>
|
||||
<span class="site-state-item-name">{{ T "SbTagsTitle" }}</span>
|
||||
<span class="site-state-item-name">{{ T "Sidebar.label.tags" }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
@ -63,8 +63,8 @@
|
||||
{{ with .Site.Params.creativeCommons }}
|
||||
{{ if .sidebar }}
|
||||
<div class="cc-license animated" itemprop="license">
|
||||
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.{{ substr $.Site.LanguageCode 0 2 }}" class="cc-opacity" rel="noopener" target="_blank" title="{{ T "CCLinkTitle" }}">
|
||||
<img src="/imgs/img-lazy-loading.gif" data-src="/imgs/cc/{{ .size }}/{{ replace .license "-" "_" }}.svg" alt="{{ T "CCLinkTitle" }}">
|
||||
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.{{ substr $.Site.LanguageCode 0 2 }}" class="cc-opacity" rel="noopener" target="_blank" title="{{ T "Sidebar.label.ccommons" }}">
|
||||
<img src="/imgs/img-lazy-loading.gif" data-src="/imgs/cc/{{ .size }}/{{ replace .license "-" "_" }}.svg" alt="{{ T "Sidebar.label.ccommons" }}">
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
Loading…
Reference in New Issue
Block a user