47 lines
1.8 KiB
Twig
47 lines
1.8 KiB
Twig
<!DOCTYPE html>
|
|
<html data-bs-theme="light">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>
|
|
{% block title %}
|
|
{% endblock %}
|
|
</title>
|
|
<link rel="icon" href="{{ asset('favicon.ico') }}">
|
|
{% block stylesheets %}
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap" rel="stylesheet">
|
|
{% endblock %}
|
|
|
|
{% block javascripts %}
|
|
{% block importmap %}{{ importmap('app') }}{% endblock %}
|
|
<script>
|
|
const eventSource = new EventSource("{{ mercure('http://solutions-easy.moi/connect?userId='~ app.user.userIdentifier)|raw }}");
|
|
if (!sessionStorage.getItem('tabId')) {
|
|
sessionStorage.setItem('tabId', self.crypto.randomUUID ? self.crypto.randomUUID() : Math.random().toString(36).substr(2, 9));
|
|
}
|
|
const tabId = sessionStorage.getItem('tabId');
|
|
console.log('Tab ID:', tabId);
|
|
|
|
fetch('/register-tab', {
|
|
method: 'POST',
|
|
headers: {'Content-Type': 'application/json'},
|
|
body: JSON.stringify({ tabId: tabId })
|
|
});
|
|
|
|
</script>
|
|
{% endblock %}
|
|
</head>
|
|
<body>
|
|
<div class="container-scroller container-fluid">
|
|
{{ include('elements/navbar.html.twig')}}
|
|
|
|
{% block body %}
|
|
|
|
{% endblock %}
|
|
|
|
<div>
|
|
</body>
|
|
</html>
|