theme/layouts/partials/footer.html

82 lines
5.0 KiB
HTML

<footer class="footer">
<div class="container">
<div class="content has-text-centered">
<p>
Copyright &copy; {{ now.Year }} <a href="{{ .Site.Params.website }}">{{ .Site.Params.author }}</a>. All rights reserved. Made with <i class="fa fa-heart" aria-hidden="true"></i> and <a href="https://gohugo.io">Hugo</a>.
</p>
<p>
Sponsored by <a href="http://inblockchain.com">INBlockchain</a>, <a href="https://metal.equinix.com/">Equinix Metal</a>, <a href="https://www.twosigma.com">Two Sigma</a>, <a href="https://soebes.io/">SoEBeS</a>, <a href="https://www.allspice.io/">Allspice</a>, <a href="https://towhee.io/">Towhee</a>, <a href="https://hostea.org/blog/">Hostea</a>, Jeff Moe, and all of our backers on <a href="https://opencollective.com/gitea">Open Collective</a>.
</p>
<p>
{{ $lang := .Lang }}{{ $base := .Site.BaseURL }}{{ range .Site.Languages }}
<a class="nav-link" href="{{ $base }}{{ .Lang }}" hreflang="{{ .Lang }}">{{ .LanguageName }}</a>
{{ end }}
</p>
</div>
</div>
</footer>
<script>
document.addEventListener('DOMContentLoaded', function () {
// Get all "navbar-burger" elements
var $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
// Check if there are any navbar burgers
if ($navbarBurgers.length > 0) {
// Add a click event on each of them
$navbarBurgers.forEach(function ($el) {
$el.addEventListener('click', function () {
// Get the target from the "data-target" attribute
var target = $el.dataset.target;
var $target = document.getElementById(target);
// Toggle the class on both the "navbar-burger" and the "navbar-menu"
$el.classList.toggle('is-active');
$target.classList.toggle('is-active');
document.getElementById('navbar-background').classList.toggle('is-active');
});
});
}
// Add anchors to headers
// Gitea SVG from https://github.com/coreui/coreui-icons
let svg = ' <svg version="1.1" xmlns="http://www.w3.org/2000/svg" style="fill: currentColor; vertical-align: bottom;" width="24" height="24" viewBox="0 0 32 32"><title>gitea</title><path d="M5.583 7.229c-2.464-0.005-5.755 1.557-5.573 5.479 0.281 6.125 6.557 6.693 9.068 6.745 0.271 1.146 3.224 5.109 5.411 5.318h9.573c5.74-0.38 10.036-17.365 6.854-17.427-5.271 0.25-8.396 0.375-11.073 0.396v5.297l-0.839-0.365-0.005-4.932c-3.073 0-5.781-0.141-10.917-0.396-0.646-0.005-1.542-0.115-2.5-0.115zM5.927 9.396h0.297c0.349 3.141 0.917 4.974 2.068 7.781-2.938-0.349-5.432-1.198-5.891-4.38-0.24-1.646 0.563-3.365 3.526-3.401zM17.339 12.479c0.198 0.005 0.406 0.042 0.594 0.13l1 0.432-0.714 1.302c-0.109 0-0.219 0.016-0.323 0.052-0.464 0.151-0.708 0.604-0.542 1.021 0.036 0.083 0.089 0.161 0.151 0.229l-1.234 2.25c-0.099 0-0.203 0.016-0.297 0.052-0.464 0.146-0.708 0.604-0.542 1.016 0.172 0.417 0.682 0.63 1.151 0.479 0.464-0.146 0.703-0.604 0.536-1.021-0.047-0.109-0.115-0.208-0.208-0.292l1.203-2.188c0.13 0.010 0.26 0 0.391-0.042 0.104-0.031 0.198-0.083 0.281-0.151 0.464 0.198 0.844 0.354 1.12 0.49 0.406 0.203 0.552 0.339 0.599 0.49 0.042 0.146-0.005 0.427-0.24 0.922-0.172 0.37-0.458 0.896-0.797 1.51-0.115 0-0.229 0.016-0.333 0.052-0.469 0.151-0.708 0.604-0.542 1.021 0.167 0.411 0.682 0.625 1.146 0.479 0.469-0.151 0.708-0.604 0.542-1.021-0.042-0.099-0.104-0.193-0.182-0.271 0.333-0.609 0.62-1.135 0.807-1.526 0.25-0.536 0.38-0.938 0.266-1.323s-0.469-0.635-0.932-0.865c-0.307-0.151-0.693-0.313-1.146-0.505 0.005-0.109-0.010-0.214-0.052-0.318s-0.109-0.198-0.193-0.281l0.703-1.281 3.901 1.682c0.703 0.307 0.995 1.057 0.651 1.682l-2.682 4.906c-0.339 0.625-1.182 0.885-1.885 0.578l-5.516-2.38c-0.703-0.307-0.995-1.057-0.656-1.682l2.682-4.906c0.234-0.432 0.708-0.688 1.208-0.708h0.083z"></path></svg>';
let contents = document.getElementsByClassName("content");
if (contents.length > 0) {
let content = contents[0];
for (let level = 1; level <= 4; level++) {
let elems = content.getElementsByTagName("h" + level);
for (let i = 0; i < elems.length; i++) {
let elem = elems[i];
if (elem.id !== "undefined" && elem.id !== "") {
let anchorId = elem.id + "-anchor";
elem.addEventListener("mouseover", () => {
document.getElementById(anchorId).style.display = "initial";
});
elem.addEventListener("mouseout", () => {
document.getElementById(anchorId).style.display = "none";
});
let anchor = document.createElement("a");
anchor.id = anchorId;
anchor.href = "#" + elem.id;
anchor.innerHTML = svg;
anchor.style.display = "none";
elem.appendChild(anchor);
}
}
}
}
});
</script>
</body>
</html>