You've already forked zblade.dev
feat(showcase): add click-to-expand modal for screenshot
This commit is contained in:
+33
-1
@@ -55,14 +55,46 @@ const version = pkg.version ?? "";
|
||||
<p>Native desktop app powered by Tauri v2. Clean, fast, and built for real development workflows. AI chat integrated seamlessly alongside your code.</p>
|
||||
<div class="feature-tag">LIVE PREVIEW</div>
|
||||
</div>
|
||||
<div class="showcase-image-box">
|
||||
<div class="showcase-image-box" onclick="openModal()">
|
||||
<img width="800" src="/screenshot-1.png" alt="Zaguán Blade editor interface" />
|
||||
<div class="showcase-overlay">
|
||||
<span>Click to expand</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Screenshot Modal -->
|
||||
<div id="screenshot-modal" class="modal" onclick="closeModal(event)">
|
||||
<div class="modal-content" onclick="event.stopPropagation()">
|
||||
<span class="modal-close" onclick="closeModal()">×</span>
|
||||
<img width="1200" src="/screenshot-1.png" alt="Zaguán Blade editor interface full size" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script is:inline>
|
||||
function openModal() {
|
||||
const modal = document.getElementById('screenshot-modal');
|
||||
modal.classList.add('active');
|
||||
document.body.style.overflow = 'hidden';
|
||||
}
|
||||
|
||||
function closeModal(event) {
|
||||
if (event && event.target !== event.currentTarget) return;
|
||||
const modal = document.getElementById('screenshot-modal');
|
||||
modal.classList.remove('active');
|
||||
document.body.style.overflow = '';
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
if (e.key === 'Escape') {
|
||||
closeModal();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- Features Section -->
|
||||
<section id="features" class="features">
|
||||
<div class="features-header">
|
||||
|
||||
Reference in New Issue
Block a user