update layouts
This commit is contained in:
+32
-19
@@ -2,15 +2,17 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<meta http-equiv="Accept-CH" content="DPR, Viewport-Width, Width">
|
||||
|
||||
<link rel="icon" href={{ .Site.Params.favicon | default "/fav.png" }} type="image/gif">
|
||||
<link rel="apple-touch-icon" href="/fav.png">
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="preload"
|
||||
<!-- <link rel="preload"
|
||||
as="style"
|
||||
href="https://fonts.googleapis.com/css2?family=Alata&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
|
||||
>
|
||||
> -->
|
||||
<link rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css2?family=Alata&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
|
||||
media="print" onload="this.media='all'" />
|
||||
@@ -20,31 +22,45 @@
|
||||
rel="stylesheet">
|
||||
</noscript>
|
||||
|
||||
<!-- font configuration -->
|
||||
<link rel="stylesheet" href="{{ .Site.Params.staticPath }}/css/font.css" media="all">
|
||||
|
||||
<!-- Internal templates -->
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
|
||||
<!-- stylesheets -->
|
||||
{{- if (or (eq .Site.Params.UseBootstrapCDN true) (eq .Site.Params.UseBootstrapCDN "css")) -}}
|
||||
<!-- {{- if (or (eq .Site.Params.UseBootstrapCDN true) (eq .Site.Params.UseBootstrapCDN "css")) -}}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
|
||||
{{- else -}}
|
||||
<link rel="stylesheet" href="{{ .Site.Params.staticPath }}/bootstrap-5/css/bootstrap.min.css" media="all">
|
||||
{{- end -}}
|
||||
<link rel="stylesheet" href="{{ .Site.Params.staticPath }}/css/header.css" media="all">
|
||||
<link rel="stylesheet" href="{{ .Site.Params.staticPath }}/css/footer.css" media="all">
|
||||
{{- else -}} -->
|
||||
<!-- <link rel="stylesheet" href="{{ .Site.Params.staticPath }}/bootstrap-5/css/bootstrap.min.css" media="all"> -->
|
||||
<!-- {{- end -}} -->
|
||||
|
||||
<!-- theme -->
|
||||
<link rel="stylesheet" href="{{ .Site.Params.staticPath }}/css/theme.css" media="all">
|
||||
{{ $sass := resources.Get "scss/main.scss" }}
|
||||
{{ $bootstrapCSS := $sass | toCSS }}
|
||||
{{ $otherCSS := resources.Match "css/**.css" }}
|
||||
{{ $allCSS := slice $bootstrapCSS | append $otherCSS }}
|
||||
{{ $finalCSS := $allCSS | resources.Concat "css/style.css" | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $finalCSS.RelPermalink }}" integrity="{{ $finalCSS.Data.Integrity }}">
|
||||
|
||||
|
||||
{{ $JS := resources.Match "js/**.js" }}
|
||||
{{ $ConcatenatedJS := $JS | resources.Concat "js/scripts.js" }}
|
||||
{{ $scriptJS := $ConcatenatedJS | js.Build (dict "minify" true "sourcemap" "external" "target" "es2015" "keepNames" true) | resources.Fingerprint }}
|
||||
<script src="{{ $scriptJS.Permalink }}" integrity="{{ $scriptJS.Data.Integrity }}" async></script>
|
||||
|
||||
{{ partial "lazyimg-setup" }}
|
||||
|
||||
{{ if .Params.image }}
|
||||
{{ $img := .Resources.GetMatch .Params.image }}
|
||||
<link rel="preload"
|
||||
href="{{ $img.RelPermalink }}"
|
||||
as="image"
|
||||
fetchpriority="high">
|
||||
{{ end }}
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--text-color: {{ .Site.Params.color.textColor | default "#343a40" }};
|
||||
--text-secondary-color: {{ .Site.Params.color.secondaryTextColor | default "#6c757d" }};
|
||||
--text-link-color: {{ .Site.Params.color.textLinkColor | default (.Site.Params.color.primaryColor | default "#007bff") }};
|
||||
--background-color: {{ .Site.Params.color.backgroundColor | default "#eaedf0" }};
|
||||
--secondary-background-color: {{ .Site.Params.color.secondaryBackgroundColor | default "#64ffda1a" }};
|
||||
--primary-color: {{ .Site.Params.color.primaryColor | default "#007bff" }};
|
||||
@@ -53,7 +69,6 @@
|
||||
/* dark mode colors */
|
||||
--text-color-dark: {{ .Site.Params.color.darkmode.textColor | default "#e4e6eb" }};
|
||||
--text-secondary-color-dark: {{ .Site.Params.color.darkmode.secondaryTextColor | default "#b0b3b8" }};
|
||||
--text-link-color-dark: {{ .Site.Params.color.darkmode.textLinkColor | default (.Site.Params.color.darkmode.primaryColor | default "#ffffff") }};
|
||||
--background-color-dark: {{ .Site.Params.color.darkmode.backgroundColor | default "#18191a" }};
|
||||
--secondary-background-color-dark: {{ .Site.Params.color.darkmode.secondaryBackgroundColor | default "#212529" }};
|
||||
--primary-color-dark: {{ .Site.Params.color.darkmode.primaryColor | default "#ffffff" }};
|
||||
@@ -75,11 +90,11 @@
|
||||
width: 8px;
|
||||
background-color: var(--background-color);
|
||||
}
|
||||
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 1rem;
|
||||
background: #b0b0b0;
|
||||
@@ -92,5 +107,3 @@
|
||||
background-color: var(--background-color);
|
||||
}
|
||||
</style>
|
||||
|
||||
{{ partial "head/extensions.html" . }}
|
||||
|
||||
Reference in New Issue
Block a user