- Add /evenements public page with Meilisearch search, KnpPaginator (12/page), event cards grid
- Add /evenement/{orgaSlug}/{id}-{eventSlug} public route with slug redirect
- Add Event::getSlug() method
- Update homepage stats with real event count
- Update organizer detail page to list their public events
- Update navbar: link Evenements to /evenements with active state
- Add copy URL button on edit event page (visible only when online)
- Add initCopyUrl() in app.js with clipboard API
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
28 lines
840 B
JavaScript
28 lines
840 B
JavaScript
import "./app.scss"
|
|
import { initMobileMenu } from "./modules/mobile-menu.js"
|
|
import { initTabs } from "./modules/tabs.js"
|
|
import { registerEditor } from "./modules/editor.js"
|
|
import { initCookieConsent } from "./modules/cookie-consent.js"
|
|
|
|
function initCopyUrl() {
|
|
const btn = document.getElementById('copy-url-btn')
|
|
if (!btn) return
|
|
const url = document.getElementById('event-url')?.textContent?.trim()
|
|
if (!url) return
|
|
|
|
btn.addEventListener('click', () => {
|
|
globalThis.navigator.clipboard.writeText(url).then(() => {
|
|
btn.textContent = 'Copie !'
|
|
setTimeout(() => { btn.textContent = 'Copier le lien' }, 2000)
|
|
})
|
|
})
|
|
}
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
initMobileMenu()
|
|
initTabs()
|
|
registerEditor()
|
|
initCookieConsent()
|
|
initCopyUrl()
|
|
})
|