2023-02-20 17:06:05 +00:00
|
|
|
<footer aria-label="{{ T "siteFooterAriaLabel" }}">
|
2020-11-06 22:16:12 +00:00
|
|
|
<!-- A convenient back to top link. -->
|
2023-02-20 17:06:05 +00:00
|
|
|
<p><a href="#top">{{ T "back_to_top" | default "Back to top" }}</a></p>
|
2020-11-06 22:16:12 +00:00
|
|
|
|
|
|
|
<!-- Linking to other languages' homepage. -->
|
|
|
|
{{ if $.Site.IsMultiLingual }}
|
2023-02-20 17:06:05 +00:00
|
|
|
<p>{{ T "multilingual" }}:
|
2020-11-06 22:16:12 +00:00
|
|
|
<span class="list site__languages">
|
|
|
|
{{ range $.Site.Languages }}
|
|
|
|
<a href="{{ . | relURL }}" hreflang="{{ .Lang }}">{{ with .LanguageName }}{{ . }}{{ else }}{{ .Lang }}{{ end }}</a>
|
|
|
|
{{ end }}
|
|
|
|
</span>
|
|
|
|
</p>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
|
|
<!-- List all of the social media links -->
|
|
|
|
{{ with (index $.Site.Data "more-contentful").contacts }}
|
|
|
|
<ul class="list site__socials">
|
|
|
|
{{ $useImage := index . "useImage" | default false }}
|
|
|
|
|
|
|
|
{{ $links := sort .links "id" "asc" }}
|
|
|
|
{{ $links = sort $links "weight" "asc" }}
|
|
|
|
{{- range $links -}}
|
|
|
|
<li>
|
|
|
|
<a {{ if $useImage }}class="site__social-icon"{{ end }} rel="me" href="{{ .url | absLangURL }}" aria-label="{{ with .name }}{{ . }}{{ else }}{{ .id }}{{ end }}">
|
|
|
|
{{- if $useImage }}
|
2023-04-03 15:36:32 +00:00
|
|
|
{{- partial "components/simple-icon.html" (dict "id" .id) }}
|
2020-11-06 22:16:12 +00:00
|
|
|
{{- else }}
|
|
|
|
{{- .name }}
|
|
|
|
{{- end }}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{- end -}}
|
|
|
|
</ul>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Copyright info. -->
|
2022-11-22 14:35:21 +00:00
|
|
|
{{- $markdownifyOpt := dict "display" "inline"
|
|
|
|
"markup" "markdown" -}}
|
|
|
|
<p>{{ with $.Site.Copyright }}{{ trim . " " | $.Page.RenderString $markdownifyOpt }}{{ else }}© {{ now.Year }} {{ with $.Site.Author.name }}{{ . }}{{ else }}{{ $.Site.Title }}{{ end }}{{ end }}</p>
|
2020-11-06 22:16:12 +00:00
|
|
|
|
|
|
|
{{- /* Extra notes */ -}}
|
|
|
|
{{- with $.Site.Params.extraNotes }}
|
2022-11-22 14:35:21 +00:00
|
|
|
<p>{{ trim . " " | $.Page.RenderString $markdownifyOpt }}</p>
|
2020-11-06 22:16:12 +00:00
|
|
|
{{- end }}
|
|
|
|
|
2020-11-17 00:32:04 +00:00
|
|
|
<p>
|
2023-02-20 17:06:05 +00:00
|
|
|
<small>{{ T "generatedOn" }} {{ now.Format "2006-01-02 15:04:05 -0700" }}</small></p>
|
2020-11-17 00:32:04 +00:00
|
|
|
|
2022-11-22 14:35:21 +00:00
|
|
|
{{ with (getenv "LAST_COMMIT_DATE") }}
|
2023-02-20 17:06:05 +00:00
|
|
|
<p>{{ T "lastUpdated" }}: {{ time . | dateFormat "2 Jan 2006" }}</p>
|
2022-11-22 14:35:21 +00:00
|
|
|
{{ end }}
|
|
|
|
|
2020-11-17 00:32:04 +00:00
|
|
|
{{ $logo := resources.Get "svg/logo.svg" }}
|
|
|
|
<div id="logo" data-tooltip="Hey there! :3">
|
|
|
|
{{ $logo.Content | safeHTML }}
|
|
|
|
</div>
|
2023-02-20 17:06:05 +00:00
|
|
|
|
|
|
|
<noscript>{{ T "siteFeaturesScriptingDisabled" }}</noscript>
|
2020-11-06 22:16:12 +00:00
|
|
|
</footer>
|
|
|
|
|
2023-02-20 17:06:05 +00:00
|
|
|
<!-- Have these scripts as a separate file. -->
|
|
|
|
<script>
|
|
|
|
var logo = document.querySelector("#logo");
|
|
|
|
var logoQuotes = [
|
|
|
|
"Hey there! :3",
|
|
|
|
"Just dancing in this void for at least 659 hours, how about you?",
|
|
|
|
"How's it going, man?",
|
|
|
|
"Having ourselves a party, yeh?",
|
|
|
|
"Why, hello there.",
|
|
|
|
"!!!",
|
|
|
|
"!?! That's an interrabang."
|
|
|
|
];
|
|
|
|
|
|
|
|
logo.addEventListener("mouseenter", (event) => {
|
|
|
|
const randomItem = Math.floor(Math.random() * logoQuotes.length)
|
|
|
|
event.target.dataset.tooltip = logoQuotes[randomItem];
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
var codeListings = document.querySelectorAll("main .listingblock > .content")
|
|
|
|
|
|
|
|
for (elem of codeListings) {
|
|
|
|
var parent = elem.parentElement;
|
|
|
|
|
|
|
|
var fullscreenButton = document.createElement("button");
|
|
|
|
fullscreenButton.classList.add("listingblock__fullscreen-btn");
|
|
|
|
fullscreenButton.ariaLabel = "{{ T "fullscreenButtonAriaLabel" }}";
|
|
|
|
fullscreenButton.title = "{{ T "fullscreenButtonLabel" }}";
|
|
|
|
fullscreenButton.ariaDescription = "{{ T "fullscreenButtonDescription" }}";
|
2023-04-03 15:36:32 +00:00
|
|
|
fullscreenButton.innerHTML = "{{ partial "components/heroicon.html" (dict "id" "arrows-pointing-out") }}";
|
2023-02-20 17:06:05 +00:00
|
|
|
|
|
|
|
fullscreenButton.addEventListener("click", (event) => {
|
|
|
|
const { target } = event;
|
|
|
|
const parent = target.closest(".listingblock");
|
|
|
|
if (!document.fullscreenElement) {
|
|
|
|
parent.requestFullscreen();
|
|
|
|
} else if (document.exitFullscreen) {
|
|
|
|
document.exitFullscreen();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
var copyButton = document.createElement("button");
|
|
|
|
copyButton.classList.add("listingblock__copy-btn");
|
|
|
|
copyButton.ariaLabel = "{{ T "copyButtonAriaLabel" }}";
|
|
|
|
copyButton.title = "{{ T "copyButtonLabel" }}";
|
|
|
|
copyButton.ariaDescription = "{{ T "copyButtonDescription" }}";
|
2023-04-03 15:36:32 +00:00
|
|
|
copyButton.innerHTML = "{{ partial "components/heroicon.html" (dict "id" "clipboard") }}";
|
2023-02-20 17:06:05 +00:00
|
|
|
|
|
|
|
copyButton.addEventListener("click", (event) => {
|
|
|
|
const { target } = event;
|
|
|
|
const parent = target.closest(".listingblock");
|
|
|
|
const codeListing = parent.querySelector(".content");
|
|
|
|
navigator.clipboard.writeText(codeListing.textContent.trim());
|
|
|
|
})
|
|
|
|
|
|
|
|
var buttonRow = document.createElement("div");
|
|
|
|
buttonRow.classList.add("listingblock__btn-row");
|
|
|
|
buttonRow.appendChild(copyButton);
|
|
|
|
buttonRow.appendChild(fullscreenButton);
|
|
|
|
parent.appendChild(buttonRow);
|
|
|
|
}
|
|
|
|
</script>
|