Skip to content

Commit dddf503

Browse files
feat: screenshot carousel with arrows and dot navigation
Single screenshot display with prev/next arrows, clickable dots, and 5-second auto-advance. Replaces cluttered horizontal scroll. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 93cff2c commit dddf503

2 files changed

Lines changed: 53 additions & 8 deletions

File tree

docs/link.html

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,16 +181,28 @@ <h1><span class="accent">Red Grid</span> Link</h1>
181181
</div>
182182
</section>
183183

184-
<!-- SCREENSHOTS -->
184+
<!-- SCREENSHOTS CAROUSEL -->
185185
<section class="section" aria-label="App screenshots" style="padding-top: 40px; padding-bottom: 40px;">
186186
<div class="container">
187-
<div style="display: flex; gap: 16px; justify-content: center; align-items: center; overflow-x: auto; padding: 16px 0; -webkit-overflow-scrolling: touch;">
188-
<img src="images/appstore_1_map_team.png" alt="Red Grid Link map view with team members tracked in real time over Bluetooth" style="height: 360px; width: auto; border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,0.4); flex-shrink: 0;">
189-
<img src="images/appstore_3_field_link.png" alt="Field Link session with encrypted peer connections and position sharing" style="height: 360px; width: auto; border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,0.4); flex-shrink: 0;">
190-
<img src="images/appstore_2_grid_view.png" alt="MGRS grid overlay on offline topographic map" style="height: 360px; width: auto; border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,0.4); flex-shrink: 0;">
191-
<img src="images/appstore_4_tools.png" alt="11 tactical tools including dead reckoning, resection, and pace count" style="height: 360px; width: auto; border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,0.4); flex-shrink: 0;">
192-
<img src="images/appstore_5_themes.png" alt="Four operational themes including Red Light for night operations" style="height: 360px; width: auto; border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,0.4); flex-shrink: 0;">
193-
<img src="images/appstore_6_ghost_markers.png" alt="Ghost markers showing last-known teammate positions with time-decay opacity" style="height: 360px; width: auto; border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,0.4); flex-shrink: 0;">
187+
<div class="carousel" style="position: relative; display: flex; align-items: center; justify-content: center; gap: 24px; max-width: 500px; margin: 0 auto;">
188+
<button class="carousel-prev" aria-label="Previous screenshot" style="background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-primary); width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.2s;">&larr;</button>
189+
<div class="carousel-track" style="position: relative; width: 280px; height: 500px; flex-shrink: 0;">
190+
<img src="images/appstore_1_map_team.png" alt="Red Grid Link map view with team positions" class="carousel-slide active" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 16px; transition: opacity 0.4s ease; opacity: 1;">
191+
<img src="images/appstore_3_field_link.png" alt="Field Link encrypted team sync session" class="carousel-slide" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 16px; transition: opacity 0.4s ease; opacity: 0;">
192+
<img src="images/appstore_2_grid_view.png" alt="MGRS grid coordinate view" class="carousel-slide" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 16px; transition: opacity 0.4s ease; opacity: 0;">
193+
<img src="images/appstore_4_tools.png" alt="11 tactical tools" class="carousel-slide" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 16px; transition: opacity 0.4s ease; opacity: 0;">
194+
<img src="images/appstore_5_themes.png" alt="Four display themes" class="carousel-slide" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 16px; transition: opacity 0.4s ease; opacity: 0;">
195+
<img src="images/appstore_6_ghost_markers.png" alt="Ghost markers with time-decay" class="carousel-slide" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 16px; transition: opacity 0.4s ease; opacity: 0;">
196+
</div>
197+
<button class="carousel-next" aria-label="Next screenshot" style="background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-primary); width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.2s;">&rarr;</button>
198+
</div>
199+
<div class="carousel-dots" style="display: flex; justify-content: center; gap: 8px; margin-top: 16px;">
200+
<span class="carousel-dot active" style="width: 8px; height: 8px; border-radius: 50%; background: var(--accent); cursor: pointer; transition: background 0.2s;"></span>
201+
<span class="carousel-dot" style="width: 8px; height: 8px; border-radius: 50%; background: var(--border); cursor: pointer; transition: background 0.2s;"></span>
202+
<span class="carousel-dot" style="width: 8px; height: 8px; border-radius: 50%; background: var(--border); cursor: pointer; transition: background 0.2s;"></span>
203+
<span class="carousel-dot" style="width: 8px; height: 8px; border-radius: 50%; background: var(--border); cursor: pointer; transition: background 0.2s;"></span>
204+
<span class="carousel-dot" style="width: 8px; height: 8px; border-radius: 50%; background: var(--border); cursor: pointer; transition: background 0.2s;"></span>
205+
<span class="carousel-dot" style="width: 8px; height: 8px; border-radius: 50%; background: var(--border); cursor: pointer; transition: background 0.2s;"></span>
194206
</div>
195207
</div>
196208
</section>

docs/script.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,39 @@ document.addEventListener('DOMContentLoaded', () => {
176176
history.pushState(null, '', targetId);
177177
});
178178

179+
// ─── Screenshot Carousel ───────────────────────────────────────
180+
const carousel = document.querySelector('.carousel');
181+
if (carousel) {
182+
const slides = carousel.querySelectorAll('.carousel-slide');
183+
const dots = document.querySelectorAll('.carousel-dot');
184+
const prevBtn = carousel.querySelector('.carousel-prev');
185+
const nextBtn = carousel.querySelector('.carousel-next');
186+
let current = 0;
187+
188+
function showSlide(index) {
189+
slides.forEach((s, i) => { s.style.opacity = i === index ? '1' : '0'; });
190+
dots.forEach((d, i) => { d.style.background = i === index ? 'var(--accent)' : 'var(--border)'; });
191+
current = index;
192+
}
193+
194+
if (prevBtn) prevBtn.addEventListener('click', () => {
195+
showSlide(current === 0 ? slides.length - 1 : current - 1);
196+
});
197+
198+
if (nextBtn) nextBtn.addEventListener('click', () => {
199+
showSlide(current === slides.length - 1 ? 0 : current + 1);
200+
});
201+
202+
dots.forEach((dot, i) => {
203+
dot.addEventListener('click', () => showSlide(i));
204+
});
205+
206+
// Auto-advance every 5 seconds
207+
setInterval(() => {
208+
showSlide(current === slides.length - 1 ? 0 : current + 1);
209+
}, 5000);
210+
}
211+
179212
// ─── Roadmap Tab Toggle ─────────────────────────────────────────
180213
const tabContainer = document.querySelector('.roadmap-tabs');
181214

0 commit comments

Comments
 (0)