mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
feat: autodetect Isotope usage
Remove Params.extensions.isotope.enable
This commit is contained in:
parent
4de6c3e203
commit
fa9827b726
9 changed files with 7 additions and 20 deletions
|
@ -101,8 +101,5 @@ extensions:
|
|||
cms:
|
||||
branch: master
|
||||
local_backend: false
|
||||
isotope:
|
||||
# Enable if you use the Portfolio widget or Publication filter
|
||||
enable: true
|
||||
academicons:
|
||||
enable: true
|
||||
|
|
|
@ -96,8 +96,5 @@ extensions:
|
|||
cms:
|
||||
branch: main
|
||||
local_backend: false
|
||||
isotope:
|
||||
# Enable if you use the Portfolio widget or Publication filter
|
||||
enable: false
|
||||
academicons:
|
||||
enable: false
|
||||
|
|
|
@ -91,8 +91,5 @@ extensions:
|
|||
cms:
|
||||
branch: main
|
||||
local_backend: false
|
||||
isotope:
|
||||
# Enable if you use the Portfolio widget or Publication filter
|
||||
enable: true
|
||||
academicons:
|
||||
enable: false
|
||||
|
|
|
@ -96,8 +96,5 @@ extensions:
|
|||
cms:
|
||||
branch: main
|
||||
local_backend: false
|
||||
isotope:
|
||||
# Enable if you use the Portfolio widget or Publication filter
|
||||
enable: false
|
||||
academicons:
|
||||
enable: false
|
||||
|
|
|
@ -96,8 +96,5 @@ extensions:
|
|||
cms:
|
||||
branch: main
|
||||
local_backend: false
|
||||
isotope:
|
||||
# Enable if you use the Portfolio widget or Publication filter
|
||||
enable: true
|
||||
academicons:
|
||||
enable: false
|
||||
|
|
|
@ -101,9 +101,6 @@ extensions:
|
|||
cms:
|
||||
branch: main
|
||||
local_backend: false
|
||||
isotope:
|
||||
# Enable if you use the Portfolio widget or Publication filter
|
||||
enable: true
|
||||
academicons:
|
||||
enable: true
|
||||
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
{{ if not ($scr.Get "use_cdn") }}
|
||||
<script src="{{ printf "/js/vendor/%s" ($scr.Get "vendor_js_filename") | relURL }}"></script>
|
||||
{{ else }}
|
||||
{{ $require_isotope := .Params.require_isotope | default site.Params.extensions.isotope.enable | default false }}
|
||||
{{ if $require_isotope }}
|
||||
{{ if .Page.Store.Get "has_isotope" }}
|
||||
{{ printf "<script src=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\"></script>" (printf $js.imagesLoaded.url $js.imagesLoaded.version) $js.imagesLoaded.sri | safeHTML }}
|
||||
{{ printf "<script src=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\"></script>" (printf $js.isotope.url $js.isotope.version) $js.isotope.sri | safeHTML }}
|
||||
{{ end }}
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
{{ $columns := $st.Params.design.columns | default "2" }}
|
||||
{{ $view := $st.Params.design.view | default "masonry" }}
|
||||
|
||||
{{/* Require Isotope */}}
|
||||
{{ $.Page.Store.Set "has_isotope" true }}
|
||||
|
||||
<div class="col-12 {{if eq $columns "2"}}col-lg-8{{end}}">
|
||||
|
||||
{{ with $st.Content }}{{ . }}{{ end }}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
{{- define "main" -}}
|
||||
|
||||
{{/* Require Isotope */}}
|
||||
{{ $.Page.Store.Set "has_isotope" true }}
|
||||
|
||||
{{ partial "page_header.html" . }}
|
||||
|
||||
<div class="universal-wrapper">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue