diff --git a/resen/snark/script.js b/resen/snark/script.js
index 7fbf9d3..74a536e 100644
--- a/resen/snark/script.js
+++ b/resen/snark/script.js
@@ -19,7 +19,13 @@ function get_play(event) {
const notes_array = notes[svg.id].split(' ')
const seq = new Tone.Sequence((time, note) => synth.triggerAttackRelease(note, duration_sec, time), path.map(i => notes_array[i]), delay_sec).start('+.05') // Reduce pops noise and avoid skipping first note. See: https://github.com/Tonejs/Tone.js/wiki/Performance#scheduling-in-advance and https://github.com/Tonejs/Tone.js/issues/403#issuecomment-447663104
seq.loop = false
- circle.addEventListener('mouseleave', () => seq.mute = true) // Will also fire when clicking outside for touch interaction
+ function mute() {
+ seq.mute = true;
+ circle.removeEventListener('click', mute)
+ circle.removeEventListener('mouseleave', mute)
+ }
+ circle.addEventListener('click', mute)
+ circle.addEventListener('mouseleave', mute) // Will also fire when clicking outside for touch interaction
Tone.Transport.start()
}
return [svg, cls]
@@ -28,4 +34,20 @@ function get_play(event) {
function click(event) {
const [svg, cls] = get_play(event)
svg.dataset.selected = cls
-}
\ No newline at end of file
+}
+
+document.addEventListener('keydown', event => {
+ if (event.altKey || event.ctrlKey || event.metaKey || !event.key.match(/[אבגדהוזחטיכלמנסעפצקרשת]/) && event.key != 'Backspace' && event.key != 'CapsLock')
+ return
+ const svg = document.querySelector('svg')
+ svg.style.setProperty('--delay', 0)
+ svg.classList.remove('keyboard')
+ setTimeout(() => {
+ if (event.key == 'CapsLock')
+ document.querySelectorAll('div[oncontextmenu*=toggle_fullscreen]').forEach((e, i) => e.appendChild(document.querySelectorAll('svg')[1 - i]))
+ else if (event.key != 'Backspace') {
+ svg.classList.add('keyboard')
+ ;[...svg.querySelectorAll('circle')].find(c => c.nextElementSibling.textContent == event.key).dispatchEvent(new MouseEvent('click', {bubbles: true}))
+ }
+ })
+})
\ No newline at end of file
diff --git a/resen/snark/style.css b/resen/snark/style.css
index c5c97d3..183a4ad 100644
--- a/resen/snark/style.css
+++ b/resen/snark/style.css
@@ -79,6 +79,37 @@ svg {
}
}
+.keyboard :is(
+ [data-selected=m21] :is(.m21, .n21),
+ [data-selected=m20] :is(.m20, .n20),
+ [data-selected=m19] :is(.m19, .n19),
+ [data-selected=m18] :is(.m18, .n18),
+ [data-selected=m17] :is(.m17, .n17),
+ [data-selected=m16] :is(.m16, .n16),
+ [data-selected=m15] :is(.m15, .n15),
+ [data-selected=m14] :is(.m14, .n14),
+ [data-selected=m13] :is(.m13, .n13),
+ [data-selected=m12] :is(.m12, .n12),
+ [data-selected=m11] :is(.m11, .n11),
+ [data-selected=m10] :is(.m10, .n10),
+ [data-selected=m9] :is(.m9, .n9),
+ [data-selected=m8] :is(.m8, .n8),
+ [data-selected=m7] :is(.m7, .n7),
+ [data-selected=m6] :is(.m6, .n6),
+ [data-selected=m5] :is(.m5, .n5),
+ [data-selected=m4] :is(.m4, .n4),
+ [data-selected=m3] :is(.m3, .n3),
+ [data-selected=m2] :is(.m2, .n2),
+ [data-selected=m1] :is(.m1, .n1),
+ [data-selected=m0] :is(.m0, .n0)) {
+ --delay: var(--active_delay_sec);
+ filter: drop-shadow(0 0 1px var(--fg));
+ fill: var(--fg_highlight);
+ stroke-width: .65;
+ transition-duration: var(--active_transition_sec);
+}
+
+
circle {
fill: var(--fg);
r: 2.2px;
diff --git a/resen/style.css b/resen/style.css
index 17fbcdb..66b8c7a 100644
--- a/resen/style.css
+++ b/resen/style.css
@@ -873,6 +873,16 @@ nav[dir=ltr] ~ * .preface_he {
content: '>';
}
+.ref {
+ font-family: var(--font);
+ font-size: .7rem;
+ vertical-align: text-top;
+}
+
+.ref::after {
+ content: attr(href);
+}
+
.refs {
margin-top: 6ex;
}
@@ -903,8 +913,18 @@ nav[dir=rtl] ~ :nth-last-child(1 of .refs):not([data-title]) {
}
.refs > blockquote {
- direction: ltr;
font-size: initial;
+ position: relative;
+}
+
+.refs:not([dir=rtl]) > blockquote {
+ direction: ltr;
+}
+
+.refs > blockquote[id]::before {
+ content: attr(id);
+ margin-inline-start: -2em;
+ position: absolute;
}
.refs > blockquote a {
diff --git a/resen/taase/style.css b/resen/taase/style.css
index c401cbf..9831163 100644
--- a/resen/taase/style.css
+++ b/resen/taase/style.css
@@ -1,4 +1,4 @@
-div[oncontextmenu*="toggle_fullscreen"] {
+div[oncontextmenu*=toggle_fullscreen] {
align-content: center;
display: grid;
margin-bottom: 4.5rem;
diff --git a/resen/umbilical/script.js b/resen/umbilical/script.js
index 22e0b22..bfa937e 100644
--- a/resen/umbilical/script.js
+++ b/resen/umbilical/script.js
@@ -385,7 +385,6 @@ function addX() {
}
addCharacter()
- setTimeout(reset3, 36000)
}
function addX_right(delay) {
@@ -399,6 +398,8 @@ function addX_right(delay) {
delay = Math.max(minDelay, delay * accelerationFactor);
setTimeout(addCharacter, delay)
}
+ else
+ setTimeout(reset3, 6000)
}
addCharacter()