Skip to content

Commit 1f9ca72

Browse files
committed
lambda
1 parent 6432d3e commit 1f9ca72

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

Gemfile.lock

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ GEM
6464
racc (~> 1.4)
6565
nokogiri (1.16.7-x64-mingw-ucrt)
6666
racc (~> 1.4)
67-
nokogiri (1.18.8-x86_64-linux-gnu)
67+
nokogiri (1.16.7-x86_64-linux)
6868
racc (~> 1.4)
6969
pathutil (0.16.2)
7070
forwardable-extended (~> 2.6)
@@ -86,6 +86,7 @@ GEM
8686
tzinfo-data (1.2024.1)
8787
tzinfo (>= 1.0.0)
8888
unicode-display_width (2.5.0)
89+
wdm (0.1.1)
8990
webrick (1.8.2)
9091

9192
PLATFORMS
@@ -102,6 +103,7 @@ DEPENDENCIES
102103
minima
103104
nokogiri
104105
tzinfo-data
106+
wdm (~> 0.1.0)
105107
webrick
106108

107109
BUNDLED WITH

_includes/header.html

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,32 @@
44
{%- assign default_paths = site.pages | map: "path" -%}
55
{%- assign page_paths = site.header_pages | default: default_paths -%}
66
{%- assign titles_size = site.pages | map: 'title' | join: '' | size -%}
7-
<a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
7+
8+
<!-- Lambda icon and site title aligned left in a flex container -->
9+
<div style="display: flex; align-items: center;">
10+
<button id="play-theme-song" style="background:none;border:none;cursor:pointer;vertical-align:middle;margin-right:2px;" title="Play theme song">
11+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24" style="vertical-align:middle;">
12+
<text x="4" y="20" font-size="20" font-family="serif">λ</text>
13+
</svg>
14+
</button>
15+
<a class="site-title" rel="author" href="{{ "/" | relative_url }}" style="margin:0;">{{ site.title | escape }}</a>
16+
</div>
817
<script src="{{ "/assets/js/hide_solutions.js" | relative_url }}" defer></script>
18+
<audio id="theme-song" src="{{ "/assets/themesong.mp3" | relative_url }}"></audio>
19+
<script>
20+
document.addEventListener('DOMContentLoaded', function() {
21+
var btn = document.getElementById('play-theme-song');
22+
var audio = document.getElementById('theme-song');
23+
btn.addEventListener('click', function() {
24+
if (audio.paused) {
25+
audio.play();
26+
} else {
27+
audio.pause();
28+
audio.currentTime = 0;
29+
}
30+
});
31+
});
32+
</script>
933

1034
{%- if titles_size > 0 -%}
1135
<nav class="site-nav">

assets/themesong.mp3

847 KB
Binary file not shown.

0 commit comments

Comments
 (0)