diff --git a/resen/snark/script.js b/resen/snark/script.js index e9c3bf1..68c22c9 100644 --- a/resen/snark/script.js +++ b/resen/snark/script.js @@ -30,7 +30,7 @@ const keymap = {a: 'א', 'ץ': 'צ', q: 'ק', r: 'ר', - s: 'ש', + x: 'ש', t: 'ת'} const duration_sec = .125 @@ -73,18 +73,20 @@ const containers = document.querySelectorAll('div[oncontextmenu*=toggle_fullscre document.addEventListener('keydown', event => { if (event.altKey || event.ctrlKey || event.metaKey || !event.key.match(/^[א-תa-zA-Z]$/) && event.key != 'Backspace' && event.key != 'CapsLock') return + const index = containers[1].classList.contains('fullscreen') | 0 const svgs = document.querySelectorAll('svg') if (event.key == 'CapsLock') { - svgs[0].dataset.selected = '' + svgs[index].dataset.selected = '' containers.forEach((e, i) => e.appendChild(svgs[1 - i])) + svgs[index].dataset.selected = '' return } - containers[0].classList.remove('keyboard') + containers[index].classList.remove('keyboard') if (event.key != 'Backspace') setTimeout(() => { - //svgs[0].style.setProperty('--delay', 0) - containers[0].classList.add('keyboard') + svgs[index].style.setProperty('--delay', 0) + containers[index].classList.add('keyboard') const key = keymap[event.key.toLowerCase()] || event.key - ;[...svgs[0].querySelectorAll('circle')].find(c => c.nextElementSibling.textContent == key).dispatchEvent(new MouseEvent('click', {bubbles: true})) + ;[...svgs[index].querySelectorAll('circle')].find(c => c.nextElementSibling.textContent == key).dispatchEvent(new MouseEvent('click', {bubbles: true})) }, 1) }) \ No newline at end of file diff --git a/resen/style.css b/resen/style.css index da49d7e..552206d 100644 --- a/resen/style.css +++ b/resen/style.css @@ -556,7 +556,7 @@ nav[dir=rtl] ~ footer > div { } .fullscreen::backdrop { - background-color: var(--bg); + background-color: var(--fullscreen_bg, var(--bg)); } .fullscreen > :first-child { @@ -672,6 +672,10 @@ iframe, object { width: 100%; } +.images.fullscreen > img:first-child:last-child { + --max_media_height: 100%; +} + .images > img:not(:first-child:last-child) { --multi_image_height_factor: .9; /* Assumes difference between images aspect ratios is less than 10% */ height: calc(100% * var(--multi_image_height_factor)); diff --git a/resen/talismother/index.html b/resen/talismother/index.html index 1824b08..f5858d7 100644 --- a/resen/talismother/index.html +++ b/resen/talismother/index.html @@ -11,23 +11,10 @@ -
-