Goondex/internal/web/static/css/gx/GX_Modal.js
Stu Leak 16fb407a3c v0.1.0-dev4: Add web frontend with UI component library
- Implement full web interface with Go html/template server
- Add GX component library (buttons, dialogs, tables, forms, etc.)
- Create scene/performer/studio/movie detail and listing pages
- Add Adult Empire scraper for additional metadata sources
- Implement movie support with database schema
- Add import and sync services for data management
- Include comprehensive API and frontend documentation
- Add custom color scheme and responsive layout

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 10:47:30 -05:00

33 lines
794 B
JavaScript

<script>
function openModal(id) {
const modal = document.getElementById(id);
if (!modal) return;
modal.classList.add("active");
const box = modal.querySelector(".gx-modal");
if (box) box.classList.add("active");
document.body.style.overflow = "hidden";
}
function closeModal(id) {
const modal = document.getElementById(id);
if (!modal) return;
modal.classList.remove("active");
const box = modal.querySelector(".gx-modal");
if (box) box.classList.remove("active");
document.body.style.overflow = "";
}
/* Close with ESC */
document.addEventListener("keydown", (e) => {
if (e.key === "Escape") {
document
.querySelectorAll(".gx-modal-backdrop.active")
.forEach(m => closeModal(m.id));
}
});
</script>