feat: add flexsearch
This commit is contained in:
4
layouts/shortcodes/alert.html
Normal file
4
layouts/shortcodes/alert.html
Normal file
@ -0,0 +1,4 @@
|
||||
<div class="alert alert-warning d-flex" role="alert">
|
||||
<div class="flex-shrink-1 alert-icon">{{ with .Get "icon" }}{{.}}{{ end }}</div>
|
||||
<div class="w-100">{{ with .Get "text" }}{{ . | safeHTML }}{{ end }}</div>
|
||||
</div>
|
3
layouts/shortcodes/img-simple.html
Normal file
3
layouts/shortcodes/img-simple.html
Normal file
@ -0,0 +1,3 @@
|
||||
{{ $image := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) -}}
|
||||
{{ $lqip := $image.Resize $.Site.Params.lqipWidth -}}
|
||||
<img class="img-simple img-fluid lazyload blur-up" src="{{ $lqip.Permalink }}" data-src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}>
|
@ -17,7 +17,7 @@
|
||||
{{ $imgSrcSet = (delimit $imgSrcSet ",") -}}
|
||||
|
||||
<figure{{ with .Get "class" }} class="{{.}}"{{ end }}>
|
||||
<img class="figure-img img-fluid lazyload blur-up" data-sizes="auto" src="{{ $lqip.Permalink }}" data-srcset="{{ $imgSrcSet }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}>
|
||||
<noscript><img class="figure-img img-fluid" sizes="100vw" srcset="{{ $imgSrcSet }}" src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}></noscript>
|
||||
<img class="img-fluid lazyload blur-up" data-sizes="auto" src="{{ $lqip.Permalink }}" data-srcset="{{ $imgSrcSet }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}>
|
||||
<noscript><img class="img-fluid" sizes="100vw" srcset="{{ $imgSrcSet }}" src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}></noscript>
|
||||
{{ with .Get "caption" }}<figcaption class="figure-caption">{{ . | safeHTML }}</figcaption>{{ end }}
|
||||
</figure>
|
||||
|
Reference in New Issue
Block a user