js asset libraries version update, i18n options for theme-name, new header option

hideHomeHeaderWhenMobile option added
This commit is contained in:
zzossig 2020-10-12 14:08:21 +09:00
parent 4f3acae640
commit 0decc1bce4
17 changed files with 120 additions and 1670 deletions

View File

@ -256,6 +256,7 @@ minItemsToShowInTagCloud = 1 # Minimum items to show in tag cloud
# header
homeHeaderType = "text" # text, img, slide, typewriter
hideHomeHeaderWhenMobile = false
# menu
showMobileMenuTerms = ["tags", "categories", "series"]

View File

@ -268,6 +268,7 @@ minItemsToShowInTagCloud = 1 # Minimum items to show in tag cloud
# header
homeHeaderType = "text" # text, img, slide, typewriter
hideHomeHeaderWhenMobile = false
# menu
showMobileMenuTerms = ["tags", "categories", "series"]

14
assets/js/fuse.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -10,6 +10,11 @@
.hide {
display: none;
&-mobile {
@media only screen and (max-width: 769px) {
display: none;
}
}
}
.grow {

View File

@ -21,6 +21,7 @@ minItemsToShowInTagCloud = 1 # Minimum items to show in tag cloud
# header
homeHeaderType = "text" # text, img, slide, typewriter
hideHomeHeaderWhenMobile = false
# menu
showMobileMenuTerms = ["tags", "categories", "series"]

View File

@ -98,4 +98,19 @@ other = "Pinned"
other = "This page looks best with JavaScript enabled"
[posts-by-order]
other = "TOP POSTS"
other = "TOP POSTS"
[skin-dark]
other = "dark"
[skin-light]
other = "light"
[skin-hacker]
other = "hacker"
[skin-solarized]
other = "solarized"
[skin-kimbie]
other = "kimbie"

View File

@ -99,3 +99,18 @@ other = "Por plibona vido the ĉi tiu paĝo, eble ŝaltu JavaSkripton"
[posts-by-order]
other = "PLEJ BONAJ AFIŜOJ"
[skin-dark]
other = "dark"
[skin-light]
other = "light"
[skin-hacker]
other = "hacker"
[skin-solarized]
other = "solarized"
[skin-kimbie]
other = "kimbie"

View File

@ -99,3 +99,18 @@ other = "لطفا برای نمایش محتوا اجرای جاوا اسکری
[posts-by-order]
other = "پست های پربازدید"
[skin-dark]
other = "dark"
[skin-light]
other = "light"
[skin-hacker]
other = "hacker"
[skin-solarized]
other = "solarized"
[skin-kimbie]
other = "kimbie"

View File

@ -99,3 +99,18 @@ other = "Pour un rendu optimal, activez JavaScript"
[posts-by-order]
other = "MEILLEURES PUBLICATIONS"
[skin-dark]
other = "dark"
[skin-light]
other = "light"
[skin-hacker]
other = "hacker"
[skin-solarized]
other = "solarized"
[skin-kimbie]
other = "kimbie"

View File

@ -98,4 +98,19 @@ other = "고정"
other = "자바스크립트를 활성화 해주세요"
[posts-by-order]
other = "TOP POSTS"
other = "TOP POSTS"
[skin-dark]
other = "dark"
[skin-light]
other = "light"
[skin-hacker]
other = "hacker"
[skin-solarized]
other = "solarized"
[skin-kimbie]
other = "kimbie"

View File

@ -98,4 +98,19 @@ other = "固定"
other = "Please enable Javascript to view the contents"
[posts-by-order]
other = "TOP POSTS"
other = "TOP POSTS"
[skin-dark]
other = "dark"
[skin-light]
other = "light"
[skin-hacker]
other = "hacker"
[skin-solarized]
other = "solarized"
[skin-kimbie]
other = "kimbie"

View File

@ -591,12 +591,15 @@
fuse = new Fuse(JSON.parse(xhr.response.toString('utf-8')), {
keys: sectionType.includes('publication') ? ['title', 'abstract'] : ['title', 'description', 'content'],
includeMatches: enableSearchHighlight,
shouldSort: true,
threshold: 0.4,
location: 0,
distance: 100,
shouldSort: true, // default: true
threshold: 0.4, // default: 0.6 (0.0 requires a perfect match)
location: 0, // default: 0
distance: 100, // default: 100
maxPatternLength: 32,
minMatchCharLength: 1,
isCaseSensitive: false, // defualt: false
findAllMatches: false, // default: false
useExtendedSearch: false, // default: false
});
window.fuse = fuse;
}

View File

@ -1,5 +1,5 @@
{{ if .IsHome }}
<header class="header">
<header class="header {{ if $.Param "hideHomeHeaderWhenMobile" }}hide-mobile{{ end }}">
{{ if and ($.Param "homeHeaderType") (eq ($.Param "homeHeaderType") "slide") }}
{{ partial "header/header-slide" . }}
{{ else if and ($.Param "homeHeaderType") (eq ($.Param "homeHeaderType") "img") }}

View File

@ -8,7 +8,7 @@
{{ if .Site.Params.themeOptions }}
{{ range $index, $value := .Site.Params.themeOptions }}
<a href="#" class="dropdown-item select-theme__item {{ if (eq $index 0) }}is-active{{ end }}">
{{ . }}
{{ i18n (print "skin-" .) | default . }}
</a>
{{ end }}
{{ end }}