summaryrefslogtreecommitdiff
path: root/web/index.html
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-05 23:07:35 +0300
committerPaul Buetow <paul@buetow.org>2026-05-05 23:07:35 +0300
commit69a3a88b85ed0a56bf442af4fec420c871d337fa (patch)
treeb1c01a820454cb43fe5f9ecf8c3af1f250a1b534 /web/index.html
parentf96c13de4828a3d531f4dc62f63ba571542c3ece (diff)
Add fullscreen crop mode toggle (hotkey c)
- In fullscreen, press 'c' to toggle object-fit between contain (default) and fill (stretches to fill, no aspect ratio preservation). - Adds .player.crop-mode video { object-fit: fill; } in player.css. - Adds toggleCrop() in player.js that toggles a crop-mode class and a small UI indicator (✂️) in the controls, visible only in fullscreen. - Resets crop mode back to contain when exiting fullscreen (via Escape, minimize, or fullscreenchange event). - Wires the 'c' hotkey in keyboard.js and registers toggleCrop in app.js. - Adds crop-indicator to index.html and detach.html controls, and documents the shortcut in the help modal.
Diffstat (limited to 'web/index.html')
-rw-r--r--web/index.html2
1 files changed, 2 insertions, 0 deletions
diff --git a/web/index.html b/web/index.html
index f3e37a1..4b90f92 100644
--- a/web/index.html
+++ b/web/index.html
@@ -90,6 +90,7 @@
<input id="volume-slider" type="range" min="0" max="1" step="0.05" value="1" class="volume-slider" aria-label="Volume">
</div>
<button id="btn-fullscreen" class="icon-btn" aria-label="Fullscreen (f)">⛶</button>
+ <span id="crop-indicator" class="crop-indicator hidden" title="Crop mode active (c)">✂️</span>
</div>
<button id="btn-restore-player" class="player-restore" type="button" aria-label="Restore player">
<span id="player-restore-title">Player minimized</span>
@@ -133,6 +134,7 @@
<div class="help-row"><span><kbd>S</kbd></span><span>Share selected media</span></div>
<div class="help-row"><span><kbd>+</kbd> <kbd>−</kbd></span><span>Zoom in / out (image viewer)</span></div>
<div class="help-row"><span><kbd>Shift+S</kbd></span><span>Toggle slideshow (images)</span></div>
+ <div class="help-row"><span><kbd>c</kbd></span><span>Toggle crop mode (fullscreen)</span></div>
<div class="help-row"><span><kbd>L</kbd></span><span>My Shares</span></div>
<div class="help-row"><span><kbd>?</kbd></span><span>Show / hide help</span></div>
</div>