Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="referrer" content="strict-origin-when-cross-origin">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' https://fonts.bunny.net; font-src https://fonts.bunny.net; img-src 'self' data:; frame-src https://open.spotify.com; connect-src 'self'; object-src 'none'; base-uri 'self'; form-action 'self'">

<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Space+Mono:wght@400&display=swap"
<link href="https://fonts.bunny.net/css2?family=Inter:wght@400;600&family=Space+Mono:wght@400&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="/assets/style.css">

Expand Down Expand Up @@ -63,9 +65,8 @@
{% endunless %}
</nav>

<script>
for (const a of document.querySelectorAll('.🗺 a')) if (location.href === a.href) a.classList.add('current')
</script>
<script src="/assets/nav-current.js" defer></script>
<script src="/assets/local-time.js" defer></script>


{% if page.show_header %}
Expand All @@ -90,10 +91,10 @@ <h1 class="⭐️">
<footer>
<ul class="🔗">
<li>
Header image – <a href="https://back7.co/home/raspberry-pi-recovery-kit">The Raspberry Pi Recovery Kit</a>
Header image – <a href="https://back7.co/home/raspberry-pi-recovery-kit" rel="noopener noreferrer">The Raspberry Pi Recovery Kit</a>
</li>
<li>
Site hosted with <a href="https://github.com">Github</a>. {% if site.github %}View the <a href="{{ site.github.repository_url }}">source repository</a>.{% endif %}
Site hosted with <a href="https://github.com" rel="noopener noreferrer">Github</a>. {% if site.github %}View the <a href="{{ site.github.repository_url }}" rel="noopener noreferrer">source repository</a>.{% endif %}
</li>
</ul>
</footer>
Expand Down
14 changes: 1 addition & 13 deletions _layouts/hack.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,7 @@ <h1>
{% if pagesize < 2 %}
{%- capture content -%}
{% assign start_time = page.date | slice:0,10 | append:"T08:30Z" %}
This hack is happening on <time style="font-weight: bold;" datetime="{{start_time}}">{{ start_time| date_to_long_string }}<span>
<script>
document.currentScript.replaceWith(
document.createTextNode(
new Intl.DateTimeFormat('default', {
hour: 'numeric',
minute: 'numeric',
timeZoneName: 'long'
})
.format(new Date("{{start_time}}"))
)
)
</script>
This hack is happening on <time style="font-weight: bold;" datetime="{{start_time}}">{{ start_time| date_to_long_string }}<span class="local-time">
<noscript>
{{ start_time | date: "%k:%M%P %Z" }}
</noscript>
Expand Down
13 changes: 13 additions & 0 deletions assets/local-time.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
document.querySelectorAll('time[datetime] .local-time').forEach(function (span) {
var timeEl = span.closest('time[datetime]');
if (!timeEl) return;
var dt = timeEl.getAttribute('datetime');
if (!dt) return;
try {
span.textContent = new Intl.DateTimeFormat('default', {
hour: 'numeric',
minute: 'numeric',
timeZoneName: 'long'
}).format(new Date(dt));
} catch (e) {}
});
3 changes: 3 additions & 0 deletions assets/nav-current.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
for (const a of document.querySelectorAll('.🗺 a')) {
if (location.href === a.href) a.classList.add('current');
}
14 changes: 1 addition & 13 deletions pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,7 @@ <h2>Next event</h2>
<time class="⏰" datetime="{{start_time}}">
{{ start_time | date_to_long_string }}

<span>
<script>
document.currentScript.replaceWith(
document.createTextNode(
new Intl.DateTimeFormat('default', {
hour: 'numeric',
minute: 'numeric',
timeZoneName: 'long'
})
.format(new Date("{{start_time}}"))
)
)
</script>
<span class="local-time">
<noscript>
{{ start_time | date: "%k:%M%P %Z" }}
</noscript>
Expand Down
2 changes: 1 addition & 1 deletion pages/podcast.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ _Or_, subscribe on Spotify:

You can hear the latest published episode here:

<iframe src="https://open.spotify.com/embed-podcast/show/2ppoyoTxxSv9IvRGGqLWP7" width="100%" height="232" frameborder="0" allowtransparency="true" allow="encrypted-media" title="Spotify Podcast player - Airquotes the Podcast Airquotes"></iframe>
<iframe src="https://open.spotify.com/embed-podcast/show/2ppoyoTxxSv9IvRGGqLWP7" width="100%" height="232" frameborder="0" allowtransparency="true" allow="encrypted-media" title="Spotify Podcast player - Airquotes the Podcast Airquotes" sandbox="allow-scripts allow-same-origin allow-presentation"></iframe>