Skip to content

Commit 3399503

Browse files
Fix mobile responsiveness: workbench layout, ticker banner, touch targets
- Workbench: remove sidebar-first reorder on mobile (input panel shows first) - Workbench: reduce container/panel padding on mobile (2rem→1rem, 1.5rem→1rem) - Workbench: add 44px min touch target on Copy button - Ticker: enable scrolling marquee animation on mobile (<600px) - Ticker: clone items for seamless loop, remove on resize above 600px - Global: tighten grid gap on mobile workbench (1.5rem→1rem)
1 parent 9c4be0b commit 3399503

3 files changed

Lines changed: 26 additions & 6 deletions

File tree

css/museum.css

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -545,9 +545,9 @@ pre,.output-box,.wb-output-area{overflow-x:auto;max-width:100%}
545545

546546
/* ── Ticker fix ── */
547547
@media(max-width:600px){
548-
.ticker-strip{padding:.6rem 0}
548+
.ticker-strip{padding:.6rem 0;overflow:hidden}
549549
.ticker-item{font-size:.7rem;letter-spacing:.1em;gap:.4rem;min-height:40px}
550-
.ticker-track{gap:2rem}
550+
.ticker-track{flex-wrap:nowrap;justify-content:flex-start;gap:2rem;max-width:none;width:max-content;animation:ticker 30s linear infinite;padding:0 1rem}
551551
}
552552

553553
/* ── Page hero: tighter on mobile ── */
@@ -623,15 +623,17 @@ pre,.output-box,.wb-output-area{overflow-x:auto;max-width:100%}
623623

624624
/* ── Workbench layout: stack ── */
625625
@media(max-width:768px){
626-
.wb-layout{grid-template-columns:1fr !important}
627-
.wb-sidebar{order:-1}
626+
.wb-main-wrap{padding:0 1rem 3rem}
627+
.wb-layout{grid-template-columns:1fr !important;gap:1rem}
628+
.wb-panel{padding:1rem}
628629
.wb-textarea{min-height:100px;font-size:.78rem}
629630
.wb-row{flex-direction:column}
630631
.wb-row>div{min-width:0}
631632
.wb-actions{flex-wrap:wrap}
632633
.wb-btn{min-height:44px;flex:1;min-width:0;font-size:.72rem;padding:.6rem .8rem}
633634
.wb-label{font-size:.62rem}
634635
.wb-select,.wb-input{font-size:.82rem;padding:.6rem .75rem;min-height:44px}
636+
.wb-copy{min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center}
635637
.freq-bar-wrap{height:70px}
636638
.freq-labels span{font-size:.45rem}
637639
}

index.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,5 +381,23 @@ <h3 class="era-card-title">Act III · Mathematics Wins</h3>
381381
</script>
382382
<script src="js/nav.js" defer></script>
383383
<script src="js/lightbox.js"></script>
384+
<script>
385+
(function(){
386+
var mq=window.matchMedia('(max-width:600px)');
387+
function initTicker(e){
388+
var track=document.querySelector('.ticker-track');
389+
if(!track)return;
390+
var duped=track.querySelector('[data-ticker-clone]');
391+
if(e.matches&&!duped){
392+
var items=track.querySelectorAll('.ticker-item');
393+
items.forEach(function(el){var c=el.cloneNode(true);c.setAttribute('data-ticker-clone','');c.setAttribute('aria-hidden','true');track.appendChild(c);});
394+
}else if(!e.matches&&duped){
395+
track.querySelectorAll('[data-ticker-clone]').forEach(function(el){el.remove();});
396+
}
397+
}
398+
mq.addEventListener('change',initTicker);
399+
initTicker(mq);
400+
})();
401+
</script>
384402
</body>
385403
</html>

lab/workbench.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<meta name="description" content="A unified cryptanalysis interface: encrypt, decrypt, and analyze ciphertext with live frequency analysis and multiple cipher engines.">
88
<link rel="stylesheet" href="../css/museum.css">
99
<style>
10+
.wb-main-wrap{max-width:1200px;margin:0 auto;padding:0 2rem 4rem}
1011
.wb-layout{display:grid;grid-template-columns:1fr 320px;gap:1.5rem;margin-top:2rem}
1112
.wb-main{display:flex;flex-direction:column;gap:1.5rem}
1213
.wb-sidebar{display:flex;flex-direction:column;gap:1.5rem}
@@ -36,7 +37,6 @@
3637
.wb-output-area{background:var(--s1);border:1px solid var(--s5);border-radius:var(--r);padding:.85rem;font-family:var(--fm);font-size:.82rem;color:var(--tx);min-height:80px;white-space:pre-wrap;word-break:break-all;line-height:1.6}
3738
.wb-copy{position:absolute;top:.5rem;right:.5rem;background:var(--s3);border:1px solid var(--s5);border-radius:var(--r);color:var(--tx3);font-family:var(--fm);font-size:.55rem;letter-spacing:.1em;padding:.3rem .6rem;cursor:pointer}
3839
.wb-copy:hover{color:var(--gold);border-color:var(--gold-b)}
39-
@media(max-width:768px){.wb-layout{grid-template-columns:1fr}.wb-sidebar{order:-1}}
4040
</style>
4141
</head>
4242
<body>
@@ -56,7 +56,7 @@ <h1>Codebreaker's Workbench</h1>
5656
<p class="hero-intro">Encrypt, decrypt, and analyze text with 33 cipher engines. Watch frequency distributions shift in real time.</p>
5757
</section>
5858

59-
<main style="max-width:1200px;margin:0 auto;padding:0 2rem 4rem">
59+
<main class="wb-main-wrap">
6060

6161
<div class="wb-layout">
6262
<!-- ─── Main Panel ─── -->

0 commit comments

Comments
 (0)