feat(exampleSite): merge en and zh exampleSite
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<h1 id="error-emoji"></h1>
|
||||
<p class="error-text">
|
||||
{{- T "pageNotFoundText" -}}
|
||||
<a href="{{ .Site.BaseURL }}" title="{{ T "backToHome" }}">↩︎</a>
|
||||
<a href="{{ `/` | relLangURL }}" title="{{ T `backToHome` }}">↩︎</a>
|
||||
</p>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{{- /* Meta */ -}}
|
||||
<div class="meta">
|
||||
{{- $author := .Params.author | default .Site.Author.name -}}
|
||||
{{- $authorLink := .Params.authorLink | default .Site.Author.link | default .Site.BaseURL -}}
|
||||
{{- $authorLink := .Params.authorLink | default .Site.Author.link | default (relLangURL "/") -}}
|
||||
<a class="author" href="{{ $authorLink }}" rel="author" target="_blank">
|
||||
<i class="fas fa-user-circle fa-fw"></i>{{ $author }}
|
||||
</a>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
{{- /* Author */ -}}
|
||||
{{- with .Site.Author.name -}}
|
||||
<span class="author" itemprop="copyrightHolder"> <a href="{{ $.Site.Author.link | default $.Site.BaseURL }}" target="_blank">{{ . }}</a></span>
|
||||
<span class="author" itemprop="copyrightHolder"> <a href="{{ $.Site.Author.link | default (relLangURL `/`) }}" target="_blank">{{ . }}</a></span>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* License */ -}}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "WebSite",
|
||||
"url": "{{ .Site.BaseURL }}",
|
||||
"url": "{{ relLangURL `/` }}",
|
||||
{{- with .Site.Author.name -}}
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
<header class="desktop" id="header-desktop">
|
||||
<div class="header-wrapper">
|
||||
<div class="header-title animated bounceIn">
|
||||
<a href="{{ .Site.BaseURL }}">
|
||||
<a href="{{ `/` | relLangURL }}">
|
||||
{{- .Site.Title -}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="menu">
|
||||
{{- $currentPage := . }}
|
||||
{{- range .Site.Menus.main -}}
|
||||
<a class="menu-item{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) | or (eq $currentPage.RelPermalink .URL) }} active{{ end }}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">
|
||||
<a class="menu-item{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) | or (eq $currentPage.RelPermalink .URL) }} active{{ end }}" href="{{ .URL | relLangURL }}" title="{{ .Title }}">
|
||||
{{- .Pre | safeHTML }}{{ .Name -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
@@ -25,7 +25,7 @@
|
||||
<div class="header-wrapper">
|
||||
<div class="header-container">
|
||||
<div class="header-title animated bounceIn">
|
||||
<a href="{{ .Site.BaseURL }}">
|
||||
<a href="{{ `/` | relLangURL }}">
|
||||
{{- .Site.Title -}}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
{{- /* 044: 知乎 */ -}}
|
||||
{{- with .Site.Params.Social.Zhihu -}}
|
||||
{{- $options := dict "href" (printf "https://www.zhihu.com/people/%s" .) "title" "知乎" -}}
|
||||
{{- $options = dict "class" "fab fa-zhihu fa-fw" | merge $options -}}
|
||||
{{- $options = dict "class" "loveit it-zhihu-line" "type" "other" "scratch" $.Scratch | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
{{- end -}}
|
||||
</section>
|
||||
<section>
|
||||
<span><a href="javascript:window.history.back();">{{ T "back" }}</a></span> | <span><a href="{{ .Site.BaseURL }}">{{ T "home" }}</a></span>
|
||||
<span><a href="javascript:window.history.back();">{{ T "back" }}</a></span> | <span><a href="{{ `/` | relLangURL }}">{{ T "home" }}</a></span>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -89,15 +89,16 @@
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
renderMathInElement(document.body, {
|
||||
delimiters: [
|
||||
{ left: "$", right: "$", display: false },
|
||||
{ left: "$$", right: "$$", display: true },
|
||||
{ left: "\\(", right: "\\)", display: false },
|
||||
{ left: "\\[", right: "\\]", display: true },
|
||||
{{- if and $math.blockLeftDelimiter $math.blockRightDelimiter -}}
|
||||
{ left: "{{ $math.blockLeftDelimiter }}", right: "{{ $math.blockRightDelimiter }}", display: true },
|
||||
{{- end -}}
|
||||
{{- if and $math.inlineLeftDelimiter $math.inlineRightDelimiter -}}
|
||||
{ left: "{{ $math.inlineLeftDelimiter }}", right: "{{ $math.inlineRightDelimiter }}", display: false },
|
||||
{{- end -}}
|
||||
{{- if and $math.blockLeftDelimiter $math.blockRightDelimiter -}}
|
||||
{ left: "{{ $math.blockLeftDelimiter }}", right: "{{ $math.blockRightDelimiter }}", display: true },
|
||||
{{- end -}}
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="meta">
|
||||
<div class="meta-line">
|
||||
{{- $author := .Params.author | default .Site.Author.name -}}
|
||||
{{- $authorLink := .Params.authorLink | default .Site.Author.link | default .Site.BaseURL -}}
|
||||
{{- $authorLink := .Params.authorLink | default .Site.Author.link | default (relLangURL "/") -}}
|
||||
<a class="author" href="{{ $authorLink }}" rel="author" target="_blank">
|
||||
<i class="fas fa-user-circle fa-fw"></i>{{ $author }}
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user