mirror of
https://gitlab.com/ansol/web-ansol.org.git
synced 2024-11-25 07:33:16 +00:00
Cleanup JS and tweak h1 css
This commit is contained in:
parent
918db5d2b1
commit
1bfeb5e4b9
@ -283,6 +283,17 @@ article.article p {
|
|||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
article.article .featured-image {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
article.article h1 {
|
||||||
|
font-size: 2.25rem;
|
||||||
|
font-weight: 300;
|
||||||
|
line-height: 2.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<body>
|
<body>
|
||||||
<nav class="main">
|
<nav class="main">
|
||||||
|
@ -2,18 +2,10 @@
|
|||||||
|
|
||||||
{{/* Attempt to load local vendor JS, otherwise load from CDN. */}}
|
{{/* Attempt to load local vendor JS, otherwise load from CDN. */}}
|
||||||
{{ $js := site.Data.assets.js }}
|
{{ $js := site.Data.assets.js }}
|
||||||
|
|
||||||
{{ if not ($scr.Get "use_cdn") }}
|
{{ if not ($scr.Get "use_cdn") }}
|
||||||
<script src="{{ printf "/js/vendor/%s" ($scr.Get "vendor_js_filename") | relURL }}"></script>
|
<script src="{{ printf "/js/vendor/%s" ($scr.Get "vendor_js_filename") | relURL }}"></script>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ printf "<script src=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\"></script>" (printf $js.jQuery.url $js.jQuery.version) $js.jQuery.sri | safeHTML }}
|
|
||||||
{{ 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 }}
|
|
||||||
{{ printf "<script src=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\"></script>" (printf $js.fancybox.url $js.fancybox.version) $js.fancybox.sri | safeHTML }}
|
|
||||||
|
|
||||||
{{ if or .Params.diagram site.Params.diagram }}
|
|
||||||
{{ printf "<script src=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\" title=\"mermaid\"></script>" (printf $js.mermaid.url $js.mermaid.version) $js.mermaid.sri | safeHTML }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if $.Scratch.Get "highlight_enabled" }}
|
{{ if $.Scratch.Get "highlight_enabled" }}
|
||||||
{{ $v := $js.highlight.version }}
|
{{ $v := $js.highlight.version }}
|
||||||
{{ printf "<script src=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\"></script>" (printf $js.highlight.url $v) $js.highlight.sri | safeHTML }}
|
{{ printf "<script src=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\"></script>" (printf $js.highlight.url $v) $js.highlight.sri | safeHTML }}
|
||||||
@ -25,12 +17,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{/* Maps JS. */}}
|
{{/* Maps JS. */}}
|
||||||
{{ if eq site.Params.map.engine 1 }}
|
{{ if and (or (eq site.Params.map.engine 2) (eq site.Params.map.engine 3)) ($scr.Get "use_cdn") }}
|
||||||
<script async defer src="https://maps.googleapis.com/maps/api/js?key={{ site.Params.map.api_key }}"></script>
|
|
||||||
{{ if ($scr.Get "use_cdn") }}
|
|
||||||
{{ printf "<script src=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\"></script>" (printf $js.gmaps.url $js.gmaps.version) $js.gmaps.sri | safeHTML }}
|
|
||||||
{{ end }}
|
|
||||||
{{ else if and (or (eq site.Params.map.engine 2) (eq site.Params.map.engine 3)) ($scr.Get "use_cdn") }}
|
|
||||||
{{ printf "<script src=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\"></script>" (printf $js.leaflet.url $js.leaflet.version) $js.leaflet.sri | safeHTML }}
|
{{ printf "<script src=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\"></script>" (printf $js.leaflet.url $js.leaflet.version) $js.leaflet.sri | safeHTML }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
@ -88,19 +75,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
{{ else if eq site.Params.search.engine 2 }}
|
|
||||||
{{/* Algolia search result template. */}}
|
|
||||||
<script id="search-hit-algolia-template" type="text/html">
|
|
||||||
<div class="search-hit">
|
|
||||||
<div class="search-hit-content">
|
|
||||||
<div class="search-hit-name">
|
|
||||||
{{ printf "<a href=\"%s\">{{{_highlightResult.title.value}}}</a>" "{{relpermalink}}" | safeHTML }}
|
|
||||||
</div>
|
|
||||||
<div class="article-metadata search-hit-type">{{"{{type}}"}}</div>
|
|
||||||
<p class="search-hit-description">{{ safeHTML "{{{_highlightResult.summary.value}}}" }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</script>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{/* Fuse search engine. */}}
|
{{/* Fuse search engine. */}}
|
||||||
@ -109,53 +83,15 @@
|
|||||||
{{ printf "<script src=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\"></script>" (printf $js.mark.url $js.mark.version) $js.mark.sri | safeHTML }}
|
{{ printf "<script src=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\"></script>" (printf $js.mark.url $js.mark.version) $js.mark.sri | safeHTML }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{/* Algolia search engine. */}}
|
|
||||||
{{ if eq site.Params.search.engine 2 }}
|
|
||||||
{{ if ($scr.Get "use_cdn") }}
|
|
||||||
{{ printf "<script src=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\"></script>" (printf $js.instantsearch.url $js.instantsearch.version) $js.instantsearch.sri | safeHTML }}
|
|
||||||
{{ end }}
|
|
||||||
<script>
|
|
||||||
const algoliaConfig = {
|
|
||||||
appId: {{ site.Params.search.algolia.app_id }},
|
|
||||||
apiKey: {{ site.Params.search.algolia.api_key }},
|
|
||||||
indexName: {{ site.Params.search.algolia.index_name }},
|
|
||||||
poweredBy: {{ site.Params.search.algolia.show_logo | default false }}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{/* Netlify Identity integration. */}}
|
|
||||||
{{ if .IsHome | and (site.Params.cms.netlify_cms | default true) }}
|
|
||||||
<script>
|
|
||||||
if (window.netlifyIdentity) {
|
|
||||||
window.netlifyIdentity.on("init", user => {
|
|
||||||
if (!user) {
|
|
||||||
window.netlifyIdentity.on("login", () => {
|
|
||||||
document.location.href = "/admin/";
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{/* Disqus Comment Count JS. */}}
|
|
||||||
{{ if and (eq site.Params.comments.engine 1) (site.Params.comments.disqus.show_count | default true) }}
|
|
||||||
<script id="dsq-count-scr" src="https://{{site.Params.comments.disqus.shortname}}.disqus.com/count.js" async></script>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ $js_comment := printf "/* Source Themes Academic v%s | https://sourcethemes.com/academic/ */\n" site.Data.academic.version }}
|
{{ $js_comment := printf "/* Source Themes Academic v%s | https://sourcethemes.com/academic/ */\n" site.Data.academic.version }}
|
||||||
{{ $js_bundle_head := $js_comment | resources.FromString "js/bundle-head.js" }}
|
{{ $js_bundle_head := $js_comment | resources.FromString "js/bundle-head.js" }}
|
||||||
{{ $js_linebreak := "\n" | resources.FromString "js/linebreak.js" }}{{/* Fix no line break after Bootstrap JS causing error. */}}
|
{{ $js_linebreak := "\n" | resources.FromString "js/linebreak.js" }}{{/* Fix no line break after Bootstrap JS causing error. */}}
|
||||||
{{ $js_academic := resources.Get "js/academic.js" }}
|
{{ $js_academic := resources.Get "js/academic.js" }}
|
||||||
{{ $js_academic_search := resources.Get "js/academic-search.js" }}
|
{{ $js_academic_search := resources.Get "js/academic-search.js" }}
|
||||||
{{ $js_algolia_search := resources.Get "js/algolia-search.js" }}
|
|
||||||
{{ $js_bootstrap := resources.Get "js/vendor/bootstrap.min.js" }}
|
{{ $js_bootstrap := resources.Get "js/vendor/bootstrap.min.js" }}
|
||||||
{{ $js_bundle := slice $js_bootstrap $js_linebreak $js_academic }}
|
{{ $js_bundle := slice $js_bootstrap $js_linebreak $js_academic }}
|
||||||
{{ if eq site.Params.search.engine 1 }}
|
{{ if eq site.Params.search.engine 1 }}
|
||||||
{{ $js_bundle = $js_bundle | append $js_academic_search }}
|
{{ $js_bundle = $js_bundle | append $js_academic_search }}
|
||||||
{{ else if eq site.Params.search.engine 2 }}
|
|
||||||
{{ $js_bundle = $js_bundle | append $js_algolia_search }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ range site.Params.plugins_js }}
|
{{ range site.Params.plugins_js }}
|
||||||
{{ $js_bundle = $js_bundle | append (resources.Get (printf "js/%s.js" .)) }}
|
{{ $js_bundle = $js_bundle | append (resources.Get (printf "js/%s.js" .)) }}
|
||||||
|
Loading…
Reference in New Issue
Block a user