mobile search ui bug fix, script clean up

This commit is contained in:
zzossig 2020-01-29 09:55:11 +09:00
parent 783a3861b0
commit 05d80f34c1
18 changed files with 38 additions and 64 deletions

View File

@ -181,18 +181,11 @@
color: themed('link-hover');
}
}
&[data-dir="ltr"] {
right: 0;
}
&[data-dir="rtl"] {
left: 0;
}
}
&--input {
width: calc(100% - 70px);
&--input {
position: absolute;
width: calc(100% - 50px);
height: 70%;
outline: none;
border: none;
@ -223,13 +216,35 @@
@include moz-scrollbars(themed('custom-scrollbar-foreground-color'), themed('custom-scrollbar-background-color'));
}
}
&[data-dir="ltr"] {
&[data-dir="ltr"] {
.mobile-search__top--icon {
right: 0;
}
.mobile-search__body {
direction: ltr;
}
&[data-dir="rtl"] {
.mobile-search__top--input {
direction: ltr;
left: 0;
}
}
&[data-dir="rtl"] {
.mobile-search__top--icon {
left: 0;
}
.mobile-search__body {
direction: rtl;
}
.mobile-search__top--input {
direction: rtl;
right: 0;
}
}

View File

@ -1,8 +1,5 @@
{{ define "main" }}
{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
<script src="{{ $enquire.RelPermalink }}"></script>
<main class="main inner" data-sidebar-position="{{ $.Param "sidebarPosition" }}">
<div class="list__main {{ if $.Param "enableSidebar" }}{{ if eq .Site.Params.sidebarPosition "left" }}mr{{ else }}lm{{ end }}{{ else }}lmr{{ end }}">
{{ partial "body/breadcrumb" . }}

View File

@ -1,8 +1,5 @@
{{ define "main" }}
{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
<script src="{{ $enquire.RelPermalink }}"></script>
<main class="single__main {{ if or ($.Param "enableToc") ($.Param "toc") }}{{ if $.Param "hideToc" }}main{{ else if eq ($.Param "tocPosition") "outer" }}main{{ else }}main-main{{ end }}{{ else }}main{{ end }}">
{{ if eq .Site.Params.enableBreadcrumb true }}
{{ partial "body/breadcrumb" . }}

View File

@ -1,8 +1,5 @@
{{ define "main" }}
{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
<script src="{{ $enquire.RelPermalink }}"></script>
<main class="main inner" data-sidebar-position="{{ $.Param "sidebarPosition" }}">
<div class="list__main {{ if $.Param "enableSidebar" }}{{ if eq .Site.Params.sidebarPosition "left" }}mr{{ else }}lm{{ end }}{{ else }}lmr{{ end }}">
{{ partial "body/breadcrumb" . }}

View File

@ -2,9 +2,6 @@
{{ define "main" }}
{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
<script src="{{ $enquire.RelPermalink }}"></script>
<main class="main inner" data-sidebar-position="{{ $.Param "sidebarPosition" }}">
<div class="list__main {{ if $.Param "enableSidebar" }}{{ if eq .Site.Params.sidebarPosition "left" }}mr{{ else }}lm{{ end }}{{ else }}lmr{{ end }}">
<div class="summary__container">

View File

@ -8,6 +8,10 @@
{{ end }}
{{ end }}
{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
<script src="{{ $enquire.RelPermalink }}"></script>
{{ $lazysizes := resources.Get "js/lazysizes.min.js" | resources.Fingerprint }}
<script defer src="{{ $lazysizes.RelPermalink }}"></script>
{{ $fuse := resources.Get "js/fuse.min.js" | resources.Fingerprint }}
<script defer src="{{ $fuse.RelPermalink }}"></script>
{{ $getParents := resources.Get "js/helper/getParents.js" | resources.Minify | resources.Fingerprint }}

View File

@ -1,4 +1 @@
{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
<script defer src="{{ $enquire.RelPermalink }}"></script>
{{ $lazysizes := resources.Get "js/lazysizes.min.js" | resources.Fingerprint }}
<script defer src="{{ $lazysizes.RelPermalink }}"></script>

View File

@ -1,4 +0,0 @@
{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
<script defer src="{{ $enquire.RelPermalink }}"></script>
{{ $lazysizes := resources.Get "js/lazysizes.min.js" | resources.Fingerprint }}
<script defer src="{{ $lazysizes.RelPermalink }}"></script>

View File

@ -1,4 +0,0 @@
{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
<script defer src="{{ $enquire.RelPermalink }}"></script>
{{ $lazysizes := resources.Get "js/lazysizes.min.js" | resources.Fingerprint }}
<script defer src="{{ $lazysizes.RelPermalink }}"></script>

View File

@ -1,11 +1,7 @@
{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
<script defer src="{{ $enquire.RelPermalink }}"></script>
{{ $masonry := resources.Get "js/masonry.pkgd.min.js" | resources.Fingerprint }}
<script defer src="{{ $masonry.RelPermalink }}"></script>
{{ $imagesloaded := resources.Get "js/imagesloaded.pkgd.min.js" | resources.Fingerprint }}
<script defer src="{{ $imagesloaded.RelPermalink }}"></script>
{{ $lazysizes := resources.Get "js/lazysizes.min.js" | resources.Fingerprint }}
<script defer src="{{ $lazysizes.RelPermalink }}"></script>
<script>
window.onload = function() {

View File

@ -1,6 +1,3 @@
{{ $lazysizes := resources.Get "js/lazysizes.min.js" | resources.Fingerprint }}
<script defer src="{{ $lazysizes.RelPermalink }}"></script>
<script>
window.onload = function() {
// counter

View File

@ -1,4 +0,0 @@
{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
<script src="{{ $enquire.RelPermalink }}"></script>
{{ $lazysizes := resources.Get "js/lazysizes.min.js" | resources.Fingerprint }}
<script defer src="{{ $lazysizes.RelPermalink }}"></script>

View File

@ -1,7 +1,3 @@
{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
<script defer src="{{ $enquire.RelPermalink }}"></script>
{{ $lazysizes := resources.Get "js/lazysizes.min.js" | resources.Fingerprint }}
<script defer src="{{ $lazysizes.RelPermalink }}"></script>
{{ $shave := resources.Get "js/shave.min.js" | resources.Fingerprint }}
<script defer src="{{ $shave.RelPermalink }}"></script>

View File

@ -1,12 +1,8 @@
{{ $js := .Site.Data.lib.js }}
{{ $css := .Site.Data.lib.css }}
{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
<script defer src="{{ $enquire.RelPermalink }}"></script>
{{ $clipboard := resources.Get "js/clipboard.min.js" | resources.Fingerprint }}
<script defer src="{{ $clipboard.RelPermalink }}"></script>
{{ $lazysizes := resources.Get "js/lazysizes.min.js" | resources.Fingerprint }}
<script defer src="{{ $lazysizes.RelPermalink }}"></script>
{{ $getParents := resources.Get "js/helper/getParents.js" | resources.Minify }}
<script defer src="{{ $getParents.RelPermalink }}"></script>
{{ $closest := resources.Get "js/helper/closest.js" | resources.Minify }}

View File

@ -1,4 +0,0 @@
{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
<script defer src="{{ $enquire.RelPermalink }}"></script>
{{ $lazysizes := resources.Get "js/lazysizes.min.js" | resources.Fingerprint }}
<script defer src="{{ $lazysizes.RelPermalink }}"></script>

View File

@ -3,14 +3,14 @@
{{ partial "svgs/etc/search.svg" (dict "width" 22 "height" 22) }}
</div>
<div id="search-mobile-container" class="mobile-search hide">
<div id="search-mobile-container" class="mobile-search hide" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
<div class="mobile-search__top">
<input id="search-mobile" type="text" aria-label="Mobile Search" placeholder="{{T "search-placeholder"}}" class="mobile-search__top--input"/>
<div id="search-mobile-close" class="mobile-search__top--icon" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
<div id="search-mobile-close" class="mobile-search__top--icon">
{{ partial "svgs/etc/cancel.svg" (dict "width" 22 "height" 22) }}
</div>
</div>
<div id="search-mobile-results" class="mobile-search__body" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
<div id="search-mobile-results" class="mobile-search__body">
</div>
</div>

View File

@ -9,6 +9,7 @@
{{ .Content }}
</div>
</header>
</span>
<main class="main archive">
<div class="archive__container">
{{ $pages := (where .Site.RegularPages "Section" "talks") }}
@ -35,4 +36,4 @@
</div>
{{ partial "script/archive-script" . }}
</main>
{{ end }}
{{ end }}