workout template: widescreen side-by-side layout + TV scaling + screen lock fallback
This commit is contained in:
@@ -17,6 +17,31 @@
|
||||
padding: 40px 20px;
|
||||
}
|
||||
.container { max-width: 1200px; width: 100%; }
|
||||
/* TV / Widescreen Layout: side-by-side */
|
||||
@media (min-width: 1600px) {
|
||||
.container {
|
||||
max-width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: 1.4fr 1fr;
|
||||
grid-template-rows: auto auto auto 1fr auto;
|
||||
gap: 40px;
|
||||
align-items: start;
|
||||
}
|
||||
.breadcrumb { grid-column: 1 / -1; }
|
||||
h1 { grid-column: 1 / -1; font-size: 3.5rem; }
|
||||
.date-header { grid-column: 1 / -1; font-size: 1.6rem; }
|
||||
.day-badge { grid-column: 1 / -1; font-size: 1.3rem; }
|
||||
.workout-column { grid-column: 1; }
|
||||
.anatomy-column {
|
||||
grid-column: 2;
|
||||
grid-row: 4 / span 2;
|
||||
position: sticky;
|
||||
top: 40px;
|
||||
}
|
||||
.back-link { grid-column: 1 / -1; }
|
||||
.anatomy-diagrams { grid-template-columns: 1fr; }
|
||||
.diagram-container img { max-height: 45vh; }
|
||||
}
|
||||
h1 { font-size: 1.8rem; margin-bottom: 4px; color: #f97316; }
|
||||
.breadcrumb { color: #666; margin-bottom: 24px; font-size: 0.85rem; }
|
||||
.breadcrumb a { color: #888; text-decoration: none; }
|
||||
@@ -185,6 +210,29 @@
|
||||
.note { padding: 20px 24px; font-size: 1.1rem; }
|
||||
.section { margin-bottom: 48px; }
|
||||
}
|
||||
/* TV Mode: very large text, full use of widescreen */
|
||||
@media (min-width: 1600px) {
|
||||
body { padding: 40px 60px; }
|
||||
.container { max-width: 100%; gap: 50px; }
|
||||
h1 { font-size: 4rem; margin-bottom: 8px; }
|
||||
h2 { font-size: 2.4rem; margin-bottom: 20px; }
|
||||
.date-header { font-size: 1.8rem; }
|
||||
.day-badge { font-size: 1.4rem; padding: 8px 24px; border-radius: 24px; }
|
||||
.table th { padding: 20px 28px; font-size: 1.4rem; }
|
||||
.table td { padding: 20px 28px; font-size: 1.6rem; }
|
||||
.exercise-name { font-size: 1.7rem; }
|
||||
.reps, .weight { font-size: 1.4rem; }
|
||||
.video-link { font-size: 1.3rem; }
|
||||
.form-note { font-size: 1.3rem; }
|
||||
.note { padding: 24px 28px; font-size: 1.3rem; margin-top: 24px; }
|
||||
.section { margin-bottom: 40px; }
|
||||
.breadcrumb { font-size: 1.1rem; margin-bottom: 32px; }
|
||||
.back-link { font-size: 1.2rem; margin-top: 40px; }
|
||||
.anatomy-title { font-size: 1.5rem; }
|
||||
.anatomy-hint { font-size: 1.1rem; }
|
||||
.muscle-tag { font-size: 1rem; padding: 6px 14px; }
|
||||
.muscle-label { font-size: 1rem; }
|
||||
}
|
||||
@keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }
|
||||
.wake-locked { position: fixed; bottom: 20px; right: 20px; background: rgba(249, 115, 22, 0.9); color: white; padding: 8px 16px; border-radius: 20px; font-size: 0.85rem; animation: pulse 2s infinite; display: none; }
|
||||
</style>
|
||||
@@ -196,6 +244,10 @@
|
||||
<div class="date-header">Wednesday, April 22, 2026</div>
|
||||
<div class="day-badge">Day B — Full-Body Circuit</div>
|
||||
|
||||
</div> <!-- /workout-column -->
|
||||
|
||||
<!-- Anatomy column: sticks on the right on widescreen -->
|
||||
<div class="anatomy-column">
|
||||
<!-- Anatomy Reference Section -->
|
||||
<div class="section anatomy-section">
|
||||
<div class="anatomy-header">
|
||||
@@ -215,9 +267,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- /anatomy-column -->
|
||||
|
||||
<a href="index.html" class="back-link">← Back to workout list</a>
|
||||
</div>
|
||||
|
||||
<div class="note" style="margin-bottom:24px;"><strong>🎉 New gear:</strong> BowFlex SelectTech 840 adjustable KB (up to 40 lbs) arrived. Current workout uses fixed weights — feel free to dial up on the KB moves.</div>
|
||||
|
||||
<!-- Workout columns wrapper for widescreen -->
|
||||
<div class="workout-column">
|
||||
<!-- Main workout table -->
|
||||
<div class="section">
|
||||
<h2>Main Workout</h2>
|
||||
|
||||
+140
-26
@@ -17,7 +17,7 @@
|
||||
justify-content: center;
|
||||
padding: 40px 20px;
|
||||
}
|
||||
.container { max-width: 800px; width: 100%; }
|
||||
.container { max-width: 1200px; width: 100%; }
|
||||
h1 { font-size: 1.8rem; margin-bottom: 4px; color: #f97316; }
|
||||
.breadcrumb { color: #666; margin-bottom: 24px; font-size: 0.85rem; }
|
||||
.breadcrumb a { color: #888; text-decoration: none; }
|
||||
@@ -44,9 +44,78 @@
|
||||
.note { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 16px; margin-top: 16px; color: #888; font-size: 0.85rem; }
|
||||
.back-link { display: inline-block; color: #f97316; text-decoration: none; font-size: 0.85rem; margin-top: 32px; }
|
||||
.back-link:hover { color: #ff8c42; }
|
||||
|
||||
/* Anatomy Section */
|
||||
.anatomy-section {
|
||||
background: rgba(255,255,255,0.04);
|
||||
border: 1px solid rgba(255,255,255,0.08);
|
||||
border-radius: 12px;
|
||||
padding: 20px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.anatomy-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
|
||||
.anatomy-title { font-size: 1rem; color: #f97316; font-weight: 600; }
|
||||
.anatomy-hint { font-size: 0.8rem; color: #666; }
|
||||
.anatomy-diagrams { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
|
||||
.diagram-container { background: #ffffff; border-radius: 8px; padding: 12px; text-align: center; border: 2px solid transparent; transition: all 0.3s ease; }
|
||||
.diagram-container h3 { font-size: 0.85rem; color: #888; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
|
||||
.diagram-container img { width: auto; max-width: 100%; height: auto; max-height: 550px; object-fit: contain; display: block; margin: 0 auto; }
|
||||
.diagram-container.highlighted { box-shadow: 0 0 25px rgba(249, 115, 22, 0.6); border-color: rgba(249, 115, 22, 0.8); transform: scale(1.02); }
|
||||
.muscle-label { font-size: 0.75rem; color: #aaa; margin-top: 8px; font-style: italic; }
|
||||
|
||||
/* Muscle tags */
|
||||
.exercise-muscles { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
|
||||
.muscle-tag { font-size: 0.7rem; padding: 3px 10px; border-radius: 12px; font-weight: 500; cursor: pointer; transition: all 0.2s; border: 2px solid transparent; user-select: none; }
|
||||
.muscle-tag:hover { transform: scale(1.08); filter: brightness(1.2); }
|
||||
.muscle-tag.active { border-color: currentColor; box-shadow: 0 0 12px currentColor; transform: scale(1.1); }
|
||||
.muscle-tag.deltoid { background: rgba(100, 181, 246, 0.25); color: #64b5f6; }
|
||||
.muscle-tag.pectoralis { background: rgba(229, 115, 115, 0.25); color: #e57373; }
|
||||
.muscle-tag.trapezius { background: rgba(129, 199, 132, 0.25); color: #81c784; }
|
||||
.muscle-tag.latissimus { background: rgba(129, 199, 132, 0.25); color: #81c784; }
|
||||
.muscle-tag.triceps { background: rgba(255, 183, 77, 0.25); color: #ffb74d; }
|
||||
.muscle-tag.biceps { background: rgba(255, 183, 77, 0.25); color: #ffb74d; }
|
||||
.muscle-tag.rectus-abdominis { background: rgba(161, 136, 127, 0.25); color: #a1887f; }
|
||||
.muscle-tag.obliques { background: rgba(161, 136, 127, 0.25); color: #a1887f; }
|
||||
.muscle-tag.quadriceps { background: rgba(144, 164, 174, 0.25); color: #90a4ae; }
|
||||
.muscle-tag.hamstrings { background: rgba(144, 164, 174, 0.25); color: #90a4ae; }
|
||||
.muscle-tag.glutes { background: rgba(144, 164, 174, 0.25); color: #90a4ae; }
|
||||
.muscle-tag.gastrocnemius { background: rgba(144, 164, 174, 0.25); color: #90a4ae; }
|
||||
.muscle-tag.serratus { background: rgba(229, 115, 115, 0.25); color: #e57373; }
|
||||
.muscle-tag.rhomboids { background: rgba(129, 199, 132, 0.25); color: #81c784; }
|
||||
.muscle-tag.erector-spinae { background: rgba(161, 136, 127, 0.25); color: #a1887f; }
|
||||
.muscle-tag.core { background: rgba(186, 104, 200, 0.25); color: #ba68c8; }
|
||||
.muscle-tag.shoulders { background: rgba(100, 181, 246, 0.25); color: #64b5f6; }
|
||||
.muscle-tag.forearms { background: rgba(255, 183, 77, 0.25); color: #ffb74d; }
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.anatomy-diagrams { grid-template-columns: 1fr; }
|
||||
}
|
||||
|
||||
/* === WIDESCREEN: side-by-side layout === */
|
||||
@media (min-width: 1400px) {
|
||||
.container {
|
||||
max-width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: 1.5fr 1fr;
|
||||
grid-template-rows: auto auto auto 1fr auto;
|
||||
gap: 40px;
|
||||
align-items: start;
|
||||
}
|
||||
.breadcrumb { grid-column: 1 / -1; }
|
||||
h1 { grid-column: 1 / -1; }
|
||||
.date-header { grid-column: 1 / -1; }
|
||||
.day-badge { grid-column: 1 / -1; }
|
||||
.workout-column { grid-column: 1; grid-row: 4; }
|
||||
.anatomy-column { grid-column: 2; grid-row: 4; position: sticky; top: 40px; }
|
||||
.back-link { grid-column: 1 / -1; }
|
||||
.anatomy-diagrams { grid-template-columns: 1fr; gap: 16px; }
|
||||
.diagram-container img { max-height: 38vh; }
|
||||
}
|
||||
|
||||
/* === TABLET / SMALL DESKTOP === */
|
||||
@media (min-width: 1200px) {
|
||||
body { padding: 60px 40px; }
|
||||
.container { max-width: 1100px; }
|
||||
.container { max-width: 1400px; }
|
||||
h1 { font-size: 2.8rem; }
|
||||
h2 { font-size: 1.8rem; }
|
||||
.date-header { font-size: 1.2rem; margin-bottom: 20px; }
|
||||
@@ -61,6 +130,31 @@
|
||||
.note { padding: 20px 24px; font-size: 1.1rem; }
|
||||
.section { margin-bottom: 48px; }
|
||||
}
|
||||
|
||||
/* === TV MODE: very large text === */
|
||||
@media (min-width: 1600px) {
|
||||
body { padding: 50px 60px; }
|
||||
.container { gap: 60px; }
|
||||
h1 { font-size: 3.5rem; margin-bottom: 8px; }
|
||||
h2 { font-size: 2.2rem; margin-bottom: 20px; }
|
||||
.date-header { font-size: 1.6rem; }
|
||||
.day-badge { font-size: 1.3rem; padding: 8px 20px; border-radius: 20px; }
|
||||
.table th { padding: 18px 24px; font-size: 1.3rem; }
|
||||
.table td { padding: 18px 24px; font-size: 1.5rem; }
|
||||
.exercise-name { font-size: 1.6rem; }
|
||||
.reps, .weight { font-size: 1.3rem; }
|
||||
.video-link { font-size: 1.2rem; }
|
||||
.form-note { font-size: 1.2rem; }
|
||||
.note { padding: 22px 26px; font-size: 1.2rem; margin-top: 20px; }
|
||||
.section { margin-bottom: 40px; }
|
||||
.breadcrumb { font-size: 1rem; margin-bottom: 28px; }
|
||||
.back-link { font-size: 1.1rem; margin-top: 36px; }
|
||||
.anatomy-title { font-size: 1.4rem; }
|
||||
.anatomy-hint { font-size: 1rem; }
|
||||
.muscle-tag { font-size: 0.95rem; padding: 5px 12px; }
|
||||
.muscle-label { font-size: 0.95rem; }
|
||||
}
|
||||
|
||||
@keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }
|
||||
.wake-locked { position: fixed; bottom: 20px; right: 20px; background: rgba(249, 115, 22, 0.9); color: white; padding: 8px 16px; border-radius: 20px; font-size: 0.85rem; animation: pulse 2s infinite; display: none; }
|
||||
</style>
|
||||
@@ -72,29 +166,37 @@
|
||||
<div class="date-header">DATE_HERE</div>
|
||||
<div class="day-badge">Day X — DESCRIPTION</div>
|
||||
|
||||
<!-- Main workout table -->
|
||||
<div class="section">
|
||||
<h2>Main Workout</h2>
|
||||
<div class="table">
|
||||
<table>
|
||||
<thead><tr><th>#</th><th>Exercise</th><th>Reps</th><th>Weight</th><th>Form Video</th></tr></thead>
|
||||
<tbody>
|
||||
<!-- Fill in exercises from workout-program.org -->
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- WORKOUT COLUMN -->
|
||||
<div class="workout-column">
|
||||
<!-- Main workout table -->
|
||||
<div class="section">
|
||||
<h2>Main Workout</h2>
|
||||
<div class="table">
|
||||
<table>
|
||||
<thead><tr><th>#</th><th>Exercise</th><th>Reps</th><th>Weight</th><th>Form Video</th></tr></thead>
|
||||
<tbody>
|
||||
<!-- Fill in exercises from workout-program.org -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="note"><strong>Structure:</strong> 3 rounds, 60-90s rest</div>
|
||||
</div>
|
||||
<div class="note"><strong>Structure:</strong> 3 rounds, 60-90s rest</div>
|
||||
|
||||
<!-- Core finisher (if present in program) -->
|
||||
</div> <!-- /workout-column -->
|
||||
|
||||
<!-- ANATOMY COLUMN (sticky on widescreen) -->
|
||||
<div class="anatomy-column">
|
||||
<!-- Anatomy diagrams go here on generated pages -->
|
||||
</div>
|
||||
|
||||
<!-- Core finisher (if present in program) -->
|
||||
|
||||
<a href="index.html" class="back-link">← Back to workout list</a>
|
||||
</div>
|
||||
|
||||
<div class="wake-locked" id="wakeLockStatus">Screen locked for workout</div>
|
||||
|
||||
<script>
|
||||
// Wake Lock API — MUST use navigator.wakeLock, NOT window.WakeLock
|
||||
// Wake Lock API — works on mobile, not most TVs
|
||||
let wakeLock = null;
|
||||
async function requestWakeLock() {
|
||||
try {
|
||||
@@ -110,16 +212,28 @@
|
||||
status.style.background = 'rgba(100, 100, 100, 0.9)';
|
||||
}
|
||||
}
|
||||
if ('wakeLock' in navigator) {
|
||||
const btn = document.createElement('button');
|
||||
btn.textContent = '🔒 Lock Screen';
|
||||
btn.style.cssText = 'position:fixed;bottom:20px;left:20px;background:#f97316;color:white;border:none;padding:8px 16px;border-radius:20px;font-size:0.85rem;cursor:pointer;z-index:1000;';
|
||||
btn.addEventListener('click', requestWakeLock);
|
||||
document.body.appendChild(btn);
|
||||
document.addEventListener('visibilitychange', async () => {
|
||||
if (wakeLock !== null && document.visibilityState === 'visible') await requestWakeLock();
|
||||
});
|
||||
}
|
||||
|
||||
// Always show the lock button, even if wakeLock isn't supported (TVs often block it)
|
||||
const btn = document.createElement('button');
|
||||
btn.textContent = '🔒 Lock Screen';
|
||||
btn.style.cssText = 'position:fixed;bottom:20px;left:20px;background:#f97316;color:white;border:none;padding:10px 20px;border-radius:24px;font-size:1rem;cursor:pointer;z-index:1000;';
|
||||
btn.addEventListener('click', () => {
|
||||
if ('wakeLock' in navigator) {
|
||||
requestWakeLock();
|
||||
} else {
|
||||
// Fallback for TVs: go fullscreen + show a persistent overlay
|
||||
const status = document.getElementById('wakeLockStatus');
|
||||
status.style.display = 'block';
|
||||
status.textContent = '🔒 Screen locked (fullscreen)';
|
||||
status.style.background = 'rgba(249, 115, 22, 0.9)';
|
||||
document.documentElement.requestFullscreen?.();
|
||||
}
|
||||
});
|
||||
document.body.appendChild(btn);
|
||||
|
||||
document.addEventListener('visibilitychange', async () => {
|
||||
if (wakeLock !== null && document.visibilityState === 'visible') await requestWakeLock();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user