Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Mar 10, 2021
1 parent 7591ae7 commit 69ff527
Show file tree
Hide file tree
Showing 33 changed files with 9,733 additions and 1,288 deletions.
8 changes: 4 additions & 4 deletions assets/css/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/katex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/main.js

Large diffs are not rendered by default.

27 changes: 1 addition & 26 deletions assets/js/main.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,5 @@
/*!
* Bootstrap v5.0.0-alpha3 (https://getbootstrap.com/)
* Bootstrap v5.0.0-beta1 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/

/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.16.1
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
2 changes: 1 addition & 1 deletion assets/js/search.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions exampleSite/config/_default/languages.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[en]
LanguageName = "English"
Weight = 1
languageName = "English"
weight = 1
contentDir = "content/en"

[zh-cn]
LanguageName = "简体中文"
Weight = 2
languageName = "简体中文"
weight = 4
contentDir = "content/zh-cn"

[zh-tw]
LanguageName = "繁體中文"
Weight = 3
languageName = "繁體中文"
weight = 3
contentDir = "content/zh-tw"
13 changes: 7 additions & 6 deletions layouts/_default/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
{{- end -}}
{{- end -}}
{{- end -}}

<script>
window.searchResultContentWordCount = parseInt('{{ default 240 .Site.Params.search.resultContentWordCount }}');
window.searchPaginate = parseInt('{{ default 10 .Site.Params.search.paginate }}');
Expand All @@ -30,7 +31,7 @@
<form id="searchForm" class="search-form mb-3">
<div class="input-group input-group-lg">
<button class="btn btn-search disabled position-absolute left-0" type="submit"><i class="fas fa-fw fa-search"></i></button>
<input class="form-control rounded-pill pl-5" name="q" type="search" aria-label="Search">
<input class="form-control rounded-pill ps-5" name="q" type="search" aria-label="Search">
</div>
</form>
<div class="search-stat mb-3 ml-1">
Expand All @@ -44,11 +45,13 @@
</div>
<script type="text/html" id="templateResult">
<div class="search-result surface" id="{{ print "{{id}}" }}">
<h2 class="search-result-title mb-4">
<h2 class="search-result-title mb-2">
<a {{ printf "href={{permalink}}" | safeHTMLAttr }}>{{ print "{{title}}" }}</a>
</h2>
<div class="search-result-content mb-3">{{ print "{{{content}}}" }}</div>
<div class="search-result-taxonomies mb-3">
<span class="search-result-score search-result-taxonomy">
<span {{ printf "style=\"%s\"" "width: {{{score}}}%" | safeHTMLAttr }}></span>
</span>
{{- $baseURL := absLangURL "" -}}
{{- $placeholder := "{{#url}}{{.}}{{/url}}" -}}
{{- range slice "series" "categories" "tags" -}}
Expand All @@ -57,9 +60,7 @@ <h2 class="search-result-title mb-4">
{{ printf "{{/%s}}" . }}
{{- end -}}
</div>
<div class="search-result-meta mb-3">
<span class="search-result-score"><i class="fas fa-fw fa-star"></i>{{ printf "{{{score}}}" }}</span>
</div>
<div class="search-result-content mb-3">{{ print "{{{content}}}" }}</div>
</div>
</script>
<script type="text/html" id="templateMissingKeywords">
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/header/font-size-switcher.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<li class="nav-item mr-2">
<a class="nav-link" tabindex="0" data-trigger="click" id="fontSizeSwitcher" data-toggle="popover" data-placement="bottom"
data-target="#fontSizesPopoverBody" data-html="true">
<li class="nav-item me-1">
<a class="nav-link" tabindex="0" data-bs-trigger="click" id="fontSizeSwitcher" data-bs-toggle="popover" data-bs-placement="bottom"
data-bs-target="#fontSizesPopoverBody" data-bs-html="true">
<i class="fas fa-fw fa-font" ></i>
</a>
</li>
Expand Down
12 changes: 6 additions & 6 deletions layouts/partials/header/language-switcher.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<li class="nav-item mr-2">
<a class="nav-link" tabindex="0" data-trigger="click" id="languageSwitcher" data-toggle="popover"
data-placement="bottom" data-target="#languagesPopoverBody" data-html="true">
<li class="nav-item me-1">
<a class="nav-link" tabindex="0" data-bs-trigger="click" id="languageSwitcher" data-bs-toggle="popover"
data-bs-placement="bottom" data-bs-target="#languagesPopoverBody" data-bs-html="true">
<i class="fas fa-fw fa-language" ></i>
</a>
</li>
Expand All @@ -9,10 +9,10 @@
{{- range $.Site.Home.AllTranslations -}}
{{- $active := eq $.Lang .Language.Lang -}}
<li class="language list-group-item{{ if $active }} active{{ end }}">
{{- if not $active }}
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
{{- if $active }}
{{- .Language.LanguageName }}
{{- else -}}
{{ .Language.LanguageName }}
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
{{- end -}}
</li>
{{- end -}}
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/header/navbar.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- $menusPositions := dict "right" "ml-auto" "left" "mr-auto" "center" "ml-auto mr-auto" -}}
{{- $menusPositions := dict "right" "ms-auto" "left" "me-auto" "center" "me-auto ms-auto" -}}
{{- $baseURL := $.Site.BaseURL -}}
<nav class="navbar fixed-top navbar-expand-xl">
<div class="container{{ if default false .Site.Params.fullWidth }}-fluid{{ end }}">
Expand All @@ -8,7 +8,7 @@
{{ . }}
{{- end -}}
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
Expand All @@ -23,7 +23,7 @@
{{- $active := or (eq $currentPage.Permalink (absLangURL .URL)) ($currentPage.IsMenuCurrent "main" .) -}}
{{- if .HasChildren -}}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle{{ if $currentPage.HasMenuCurrent "main" . }} active{{ end }}" id="navbarDropdown-{{ .Identifier }}" role="button" data-toggle="dropdown" aria-expanded="false">
<a class="nav-link dropdown-toggle{{ if $currentPage.HasMenuCurrent "main" . }} active{{ end }}" id="navbarDropdown-{{ .Identifier }}" role="button" data-toggle="dropdown" data-bs-toggle="dropdown" aria-expanded="false">
{{ .Pre }} {{- .Name -}} {{ .Post }}
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown-{{ .Identifier }}">
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/header/palette-switcher.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{- $palettes := slice "blue" "blue gray" "brown" "cyan" "green" "indigo" "orange" "pink" "purple" "red" "teal" "yellow" -}}
{{- $palettes = default $palettes .Site.Params.Palettes -}}
<li class="nav-item mr-2">
<a class="nav-link" tabindex="0" data-trigger="click" id="paletteSwitcher" data-toggle="popover" data-placement="bottom"
data-target="#palettesPopoverBody" data-html="true">
<li class="nav-item me-1">
<a class="nav-link" tabindex="0" data-bs-trigger="click" id="paletteSwitcher" data-bs-toggle="popover" data-bs-placement="bottom"
data-bs-target="#palettesPopoverBody" data-bs-html="true">
<i class="fas fa-fw fa-palette" ></i>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/header/search-bar.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if ne .Permalink (absLangURL "search/") -}}
<form class="search-bar d-flex mr-2" action="{{ absLangURL "search" }}">
<form class="search-bar d-flex me-1" action="{{ absLangURL "search" }}">
<div class="input-group input-group-sm">
<button class="btn btn-search disabled position-absolute left-0" type="submit"><i class="fas fa-fw fa-search"></i></button>
<input class="form-control rounded-pill" id="searchQuery" name="q" type="search" aria-label="Search">
Expand Down
Loading

0 comments on commit 69ff527

Please sign in to comment.