Add Bootstrap and Bootstrap Icons files

This commit is contained in:
Will Faught
2023-02-17 10:42:30 -08:00
parent 48cde6fd36
commit 994a9f73fd
2329 changed files with 82905 additions and 44 deletions

View File

@@ -1,20 +1,33 @@
{{ $params := . }}
{{ $crossorigin := $params.crossorigin | default "anonymous" }}
{{ $href := $params.href }}
{{ $enablesourcemap := not hugo.IsProduction }}
{{ $href := relLangURL $params.href }}
{{ $includepaths := $params.includepaths }}
{{ $integrity := $params.integrity }}
{{ $outputstyle := cond hugo.IsProduction "compressed" "" }}
{{ $page := $params.page }}
{{ $raw := $params.raw }}
{{ $referrerpolicy := $params.referrerpolicy | default "no-referrer" }}
{{ $sass := $params.sass }}
{{ if $raw }}
{{ $href = relLangURL $href }}
{{ else }}
{{ $resource := (partial "paige/func-resource.html" (dict
{{ if not $raw }}
{{ $resource := partial "paige/func-resource.html" (dict
"page" $page
"url" (relLangURL $href)
)) | minify | fingerprint }}
"url" $href
) }}
{{ $resource = resources.ExecuteAsTemplate $href (or $page dict) $resource }}
{{ if $sass }}
{{ $resource = $resource | toCSS (dict
"enableSourceMap" $enablesourcemap
"includePaths" $includepaths
"outputStyle" $outputstyle
) }}
{{ end }}
{{ $resource = $resource | minify | fingerprint }}
{{ $href = $resource.RelPermalink }}
{{ $integrity = $resource.Data.Integrity }}
{{ end }}

View File

@@ -13,19 +13,16 @@
<link color="{{ $page.Param `paige.color` | default `#0d6efd` }}" href="{{ relLangURL `safari-pinned-tab.svg` | safeURL }}" rel="mask-icon">
<link href="{{ relLangURL `site.webmanifest` | safeURL }}" rel="manifest">
{{ partial "paige/link.html" (dict
"href" ($page.Param "paige.bootstrap.icons.link_href" | default "https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.3/font/bootstrap-icons.css")
"integrity" ($page.Param "paige.bootstrap.icons.link_integrity" | default "sha384-b6lVK+yci+bfDmaY1u0zE8YYJt0TZxLEAFyYSLHId4xoVvsrQu3INevFKo+Xir8e")
"raw" true
) }}
{{ partial "paige/link.html" (dict
"href" ($page.Param "paige.bootstrap.style.link_href" | default "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css")
"integrity" ($page.Param "paige.bootstrap.style.link_integrity" | default "sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD")
"raw" ($page.Param "paige.bootstrap.style.raw")
) }}
{{ partial "paige/link.html" (dict "href" "paige/bootstrap-icons/bootstrap-icons.css") }}
{{ if $page.Param "paige.color" }}
{{ partial "paige/link.html" (dict "href" "paige/bootstrap/custom.scss" "page" $page "sass" true) }}
{{ else }}
{{ partial "paige/link.html" (dict "href" "paige/bootstrap/bootstrap.css") }}
{{ end }}
{{ if or ($page.Param "paige.math") (and ($page.Param "paige.list.content.show") (where $page.Pages "Params.paige.math" "eq" true)) }}
{{ partial "paige/link.html" (dict "href" "paige/katex/katex.min.css") }}
{{ partial "paige/link.html" (dict "href" "paige/katex/katex.css") }}
{{ end }}
{{ if .AlternativeOutputFormats }}

View File

@@ -41,14 +41,10 @@ addEventListener("resize", paigeResize);
});
{{ end }}
</script>
{{ partial "paige/script.html" (dict
"integrity" ($page.Param "paige.bootstrap.script.script_integrity" | default "sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN")
"raw" ($page.Param "paige.bootstrap.script.raw")
"src" ($page.Param "paige.bootstrap.script.script_src" | default "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js")
) }}
{{ partial "paige/script.html" (dict "src" "paige/bootstrap/bootstrap.bundle.js") }}
{{ if or ($page.Param "paige.math") (and ($page.Param "paige.list.content.show") (where $page.Pages "Params.paige.math" "eq" true)) }}
{{ partial "paige/script.html" (dict "src" "paige/katex/katex.min.js") }}
{{ partial "paige/script.html" (dict "onload" "renderMathInElement(document.body);" "src" "paige/katex/auto-render.min.js") }}
{{ partial "paige/script.html" (dict "src" "paige/katex/katex.js") }}
{{ partial "paige/script.html" (dict "onload" "renderMathInElement(document.body);" "src" "paige/katex/auto-render.js") }}
{{ end }}
{{ partial "paige/analytics.html" $page }}
<noscript>{{ i18n "paige_noscript" }}</noscript>