update
This commit is contained in:
9
layouts/partials/common/footer.html
Normal file
9
layouts/partials/common/footer.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<footer>
|
||||
<ul class="footer_links">
|
||||
{{ range .Site.Menus.footer }}
|
||||
<li><a href="{{.URL}}" title="{{.Name}}">{{.Name}}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
<small class="copyright"> {{T "copyright" (dict "Year" now.Year)}} </small>
|
||||
</footer>
|
||||
@@ -1,16 +1,3 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>
|
||||
{{- if .IsHome -}} Home | {{ .Title }} {{- else if .Page.Title -}} {{
|
||||
.Page.Title }} | {{ .Site.Title }} {{- else -}} {{ .Site.Title }} {{- end
|
||||
-}}
|
||||
</title>
|
||||
|
||||
<!-- description -->
|
||||
{{- if .IsHome -}}
|
||||
<meta name="description" content="{{ .Site.Params.description }}" />
|
||||
{{- else -}}
|
||||
<meta name="description" content="{{ .Params.description }}" />
|
||||
{{- end }} {{ partial "common/links.html" . }}
|
||||
{{ partial "common/meta.html" . }} {{ partial "common/links.html" . }}
|
||||
</head>
|
||||
|
||||
56
layouts/partials/common/image.html
Normal file
56
layouts/partials/common/image.html
Normal file
@@ -0,0 +1,56 @@
|
||||
{{ $src := .src }} {{ $alt := .Text | default "image" }} {{ $title := .Title }}
|
||||
{{ $isRemote := strings.HasPrefix $src "http" }} {{ if $isRemote }} {{ with
|
||||
resources.GetRemote $src }} {{ if eq .MediaType.SubType "svg" }}
|
||||
<img
|
||||
src="{{ $src }}"
|
||||
alt="{{ $alt }}"
|
||||
{{
|
||||
if
|
||||
$title
|
||||
}}title="{{ $title }}"
|
||||
{{
|
||||
end
|
||||
}}
|
||||
loading="lazy"
|
||||
/>
|
||||
{{ else }} {{ $webp := .Resize "300x300 webp" | fingerprint }}
|
||||
<img
|
||||
src="{{ $webp.RelPermalink }}"
|
||||
alt="{{ $alt }}"
|
||||
{{
|
||||
if
|
||||
$title
|
||||
}}title="{{ $title }}"
|
||||
{{
|
||||
end
|
||||
}}
|
||||
loading="lazy"
|
||||
/>
|
||||
{{ end }} {{ end }} {{ else }} {{ with resources.Get $src }} {{ if eq
|
||||
.MediaType.SubType "svg" }}
|
||||
<img
|
||||
src="{{ $src }}"
|
||||
alt="{{ $alt }}"
|
||||
{{
|
||||
if
|
||||
$title
|
||||
}}title="{{ $title }}"
|
||||
{{
|
||||
end
|
||||
}}
|
||||
loading="lazy"
|
||||
/>
|
||||
{{ else }} {{ $resized := .Resize "300x300 webp" }}
|
||||
<img
|
||||
src="{{ $resized.RelPermalink }}"
|
||||
alt="{{ $alt }}"
|
||||
{{
|
||||
if
|
||||
$title
|
||||
}}title="{{ $title }}"
|
||||
{{
|
||||
end
|
||||
}}
|
||||
loading="lazy"
|
||||
/>
|
||||
{{ end }} {{ end }} {{ end }}
|
||||
@@ -1,9 +1,3 @@
|
||||
<link rel="stylesheet" href="/css/main.css" />
|
||||
<link href="/pagefind/pagefind-ui.css" rel="stylesheet" />
|
||||
<!-- <link
|
||||
rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css"
|
||||
integrity="sha512-Evv84Mr4kqVGRNSgIGL/F/aIDqQb7xQ2vcrdIwxfjThSH8CSR7PBEakCr51Ck+w+/U6swU2Im1vVX0SVk9ABhg=="
|
||||
crossorigin="anonymous"
|
||||
referrerpolicy="no-referrer"
|
||||
/> -->
|
||||
{{ $style := resources.Get "/css/main.css" | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}" />
|
||||
<!-- <link href="/pagefind/pagefind-ui.css" rel="stylesheet" /> -->
|
||||
|
||||
20
layouts/partials/common/meta.html
Normal file
20
layouts/partials/common/meta.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<!-- keywords -->
|
||||
{{ if .IsHome }} <meta name="keywords" content="{{ delimit .Site.Params.keywords
|
||||
", " " and " }}" /> {{ else if .Keywords }}
|
||||
# <meta name="keywords" content="{{delimit .Keywords ", "}}">
|
||||
{{ end }}
|
||||
<!-- title -->
|
||||
<title>
|
||||
{{- if .IsHome -}} Home | {{ .Site.Title }} {{- else if .Page.Title -}} {{
|
||||
.Page.Title }} | {{ .Site.Title }} {{- else -}} {{ .Site.Title }} {{- end -}}
|
||||
</title>
|
||||
|
||||
<!-- description -->
|
||||
{{- if .IsHome -}}
|
||||
<meta name="description" content="{{ .Site.Params.description }}" />
|
||||
{{- else -}}
|
||||
<meta name="description" content="{{ .Params.description }}" />
|
||||
{{- end }}
|
||||
@@ -1,5 +1,5 @@
|
||||
<script src="/pagefind/pagefind-ui.js"></script>
|
||||
<script src="/js/main.js"></script>
|
||||
<!-- <script src="/js/main.js"></script> -->
|
||||
<script>
|
||||
window.addEventListener("DOMContentLoaded", (event) => {
|
||||
new PagefindUI({ element: "#search", showSubResults: true,highlightParam: "highlight" });
|
||||
|
||||
Reference in New Issue
Block a user