1
ewpratten.com/_includes/footer.html

167 lines
5.7 KiB
HTML

<br><br>
<div class="foot-info center">
Made with ♥ by Evan Pratten | <a href="/feed.xml">RSS</a> | <a href="https://status.retrylife.ca">API Status</a>
</div>
<!-- Bootstrap -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
{% if page.uses contains "masonry" %}
<!-- Masonry for card grids -->
<script src="https://unpkg.com/masonry-layout@4/dist/masonry.pkgd.min.js"></script>
{% endif %}
{% if page.uses contains "qrcodes" %}
<!-- QR Codes -->
<script src="/assets/js/qrcode.min.js"></script>
<script type="text/javascript">
new QRCode(document.getElementById("btcqr"), "bitcoin://{{site.btc_address}}");
new QRCode(document.getElementById("stlrqr"), "web+stellar:pay?destination={{site.stellar_address}}");
</script>
{% endif %}
{% if page.uses contains "katex" %}
<!-- Load KaTeX -->
<script src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.js" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/auto-render.min.js" crossorigin="anonymous"
onload="renderMathInElement(document.body);"></script>
<!-- Parse the Latex divs with Katex-->
<script type="text/javascript">
$("script[type='math/tex']").replaceWith(
function () {
var tex = $(this).text();
return katex.renderToString(tex, { displayMode: false });
});
$("script[type='math/tex; mode=display']").replaceWith(
function () {
var tex = $(this).text();
return katex.renderToString(tex.replace(/%.*/g, ''), { displayMode: true });
});
</script>
{% endif %}
{% if page.uses contains "pdf" %}
<!-- Inline PDF files -->
<script src="https://unpkg.com/browse/pdfjs-dist@2.4.456/web/pdf_viewer.js"></script>
{% endif %}
{% if page.uses contains "tikz" %}
<!-- TikZJax loader -->
<script src="https://tikzjax.com/v1/tikzjax.js"></script>
{% endif %}
<!-- Tracking API -->
<script src="https://api.retrylife.ca/tracking/external/retrylife.ca" async="true"></script>
<!-- Offsets for links -->
<script>
(function ($, window) {
var adjustAnchor = function () {
var $anchor = $(':target'),
fixedElementHeight = 100;
if ($anchor.length > 0) {
window.scrollTo(0, $anchor.offset().top - fixedElementHeight);
}
};
$(window).on('hashchange load', function () {
adjustAnchor();
});
})(jQuery, window);
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{site.ga_analytics}}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', '{{site.ga_analytics}}');
</script>
{% if page.uses contains "twitter" %}
<!-- Twitter embeds -->
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
{% endif %}
{% if page.uses contains "graphs" %}
<!-- Roughviz -->
<script src="https://unpkg.com/rough-viz@1.0.5"></script>
{% endif %}
{% if page.uses contains "github-cards" and false %}
<!-- GH user card library -->
<script src="//cdn.jsdelivr.net/github-cards/latest/widget.js"></script>
<!-- Modal containing GitHub account card -->
<div class="modal fade" id="GitHub-account-card" tabindex="-1" role="dialog" aria-labelledby="GitHub-account-card-title"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="GitHub-account-card-title">Username</h5><a href=""
id="GitHub-account-card-url"><button type="button" class="btn btn-outline-secondary">View
account</button></a>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<!-- <div class="modal-body" id="GitHub-account-card-body">
...
</div> -->
<!-- <div class="modal-footer">
</div> -->
</div>
</div>
</div>
<script>
function renderGitHubUserAccount(name, url) {
// Set the inner HTML to be the card
//document.getElementById("GitHub-account-card-body").innerHTML = '<div class="github-card" data-github="' + name + '" data-width="400" data-height="158" data-theme="default"></div>'
document.getElementById("GitHub-account-card-title").innerText = name.replace("@", "");
// Show the modal
$("#GitHub-account-card").modal("show");
}
// Edit every github user link
var github_accounts = document.getElementsByClassName("user-mention");
[...github_accounts].forEach((element) => {
// Get the user's name and URL
var name = element.innerText;
var url = `${element.href}`;
// Clear the button href
element.href = "#";
// Add an onclick()
element.onclick = () => {
renderGitHubUserAccount(name, url);
}
})
</script>
{% endif %}