558 lines
16 KiB
HTML
558 lines
16 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Portail Applicatif — Santinova Soft</title>
|
|
<style>
|
|
/* ===== RESET & BASE ===== */
|
|
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
body {
|
|
font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
|
|
background: #0f1117;
|
|
color: #e8eaf0;
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* ===== HEADER ===== */
|
|
header {
|
|
background: linear-gradient(135deg, #1a1d2e 0%, #252840 100%);
|
|
border-bottom: 1px solid rgba(255,255,255,0.08);
|
|
padding: 28px 48px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
box-shadow: 0 4px 24px rgba(0,0,0,0.4);
|
|
}
|
|
|
|
.header-brand {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
}
|
|
|
|
.header-logo-placeholder {
|
|
width: 48px;
|
|
height: 48px;
|
|
background: linear-gradient(135deg, #6366f1, #8b5cf6);
|
|
border-radius: 12px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 22px;
|
|
font-weight: 800;
|
|
color: white;
|
|
letter-spacing: -1px;
|
|
box-shadow: 0 4px 16px rgba(99,102,241,0.4);
|
|
}
|
|
|
|
.header-title {
|
|
font-size: 1.5rem;
|
|
font-weight: 700;
|
|
color: #ffffff;
|
|
letter-spacing: -0.3px;
|
|
}
|
|
|
|
.header-subtitle {
|
|
font-size: 0.8rem;
|
|
color: #8b8fa8;
|
|
margin-top: 2px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
.header-badge {
|
|
background: rgba(99,102,241,0.15);
|
|
border: 1px solid rgba(99,102,241,0.3);
|
|
color: #a5b4fc;
|
|
padding: 6px 14px;
|
|
border-radius: 20px;
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
/* ===== TABS ===== */
|
|
.tabs-wrapper {
|
|
background: linear-gradient(135deg, #1a1d2e 0%, #252840 100%);
|
|
border-bottom: 1px solid rgba(255,255,255,0.08);
|
|
padding: 0 48px;
|
|
display: flex;
|
|
gap: 4px;
|
|
}
|
|
|
|
.tab-btn {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
padding: 18px 28px;
|
|
font-size: 0.95rem;
|
|
font-weight: 600;
|
|
color: #8b8fa8;
|
|
border-bottom: 3px solid transparent;
|
|
transition: color 0.2s ease, border-color 0.2s ease;
|
|
letter-spacing: 0.2px;
|
|
position: relative;
|
|
top: 1px;
|
|
}
|
|
|
|
.tab-btn:hover {
|
|
color: #c5c8d8;
|
|
}
|
|
|
|
.tab-btn.active {
|
|
color: #ffffff;
|
|
border-bottom: 3px solid #6366f1;
|
|
}
|
|
|
|
.tab-btn .tab-count {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: rgba(99,102,241,0.15);
|
|
border: 1px solid rgba(99,102,241,0.25);
|
|
color: #a5b4fc;
|
|
font-size: 0.7rem;
|
|
font-weight: 700;
|
|
width: 20px;
|
|
height: 20px;
|
|
border-radius: 50%;
|
|
margin-left: 8px;
|
|
}
|
|
|
|
.tab-btn.active .tab-count {
|
|
background: rgba(99,102,241,0.3);
|
|
border-color: rgba(99,102,241,0.5);
|
|
}
|
|
|
|
/* ===== MAIN CONTENT ===== */
|
|
main {
|
|
flex: 1;
|
|
padding: 60px 48px;
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
width: 100%;
|
|
}
|
|
|
|
.tab-panel {
|
|
display: none;
|
|
}
|
|
|
|
.tab-panel.active {
|
|
display: block;
|
|
animation: fadeIn 0.25s ease;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(8px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
.section-header {
|
|
margin-bottom: 48px;
|
|
text-align: center;
|
|
}
|
|
|
|
.section-header h2 {
|
|
font-size: 2rem;
|
|
font-weight: 700;
|
|
color: #ffffff;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.section-header p {
|
|
color: #8b8fa8;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
/* ===== GRID ===== */
|
|
.apps-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
|
gap: 28px;
|
|
justify-items: center;
|
|
}
|
|
|
|
/* ===== APP CARD ===== */
|
|
.app-card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
text-decoration: none;
|
|
width: 100%;
|
|
max-width: 260px;
|
|
cursor: pointer;
|
|
transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
}
|
|
|
|
.app-card:hover {
|
|
transform: translateY(-8px) scale(1.03);
|
|
}
|
|
|
|
.app-card:hover .card-image-wrapper {
|
|
box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
|
|
}
|
|
|
|
.app-card:hover .card-name {
|
|
color: #ffffff;
|
|
}
|
|
|
|
.card-image-wrapper {
|
|
width: 180px;
|
|
height: 180px;
|
|
border-radius: 36px;
|
|
overflow: hidden;
|
|
box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.06);
|
|
transition: box-shadow 0.25s ease;
|
|
position: relative;
|
|
}
|
|
|
|
.card-image-wrapper::after {
|
|
content: '';
|
|
position: absolute;
|
|
inset: 0;
|
|
border-radius: 36px;
|
|
border: 1px solid rgba(255,255,255,0.12);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.card-image-wrapper img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
display: block;
|
|
}
|
|
|
|
.card-name {
|
|
margin-top: 16px;
|
|
font-size: 0.95rem;
|
|
font-weight: 600;
|
|
color: #c5c8d8;
|
|
text-align: center;
|
|
transition: color 0.2s ease;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.card-env-badge {
|
|
margin-top: 6px;
|
|
font-size: 0.7rem;
|
|
font-weight: 600;
|
|
color: #6366f1;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.8px;
|
|
background: rgba(99,102,241,0.1);
|
|
padding: 3px 10px;
|
|
border-radius: 10px;
|
|
border: 1px solid rgba(99,102,241,0.2);
|
|
}
|
|
|
|
/* ===== APP OFFLINE (grisage) ===== */
|
|
.app-card.offline {
|
|
opacity: 0.42;
|
|
pointer-events: none;
|
|
cursor: not-allowed;
|
|
filter: grayscale(80%);
|
|
}
|
|
|
|
.app-card.offline .card-image-wrapper {
|
|
box-shadow: none;
|
|
}
|
|
|
|
.card-status-badge {
|
|
display: none;
|
|
margin-top: 4px;
|
|
font-size: 0.68rem;
|
|
font-weight: 700;
|
|
color: #ef4444;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.8px;
|
|
background: rgba(239,68,68,0.12);
|
|
padding: 2px 9px;
|
|
border-radius: 10px;
|
|
border: 1px solid rgba(239,68,68,0.3);
|
|
}
|
|
|
|
.app-card.offline .card-status-badge {
|
|
display: inline-block;
|
|
}
|
|
|
|
/* ===== FOOTER ===== */
|
|
footer {
|
|
background: #0a0c14;
|
|
border-top: 1px solid rgba(255,255,255,0.06);
|
|
padding: 24px 48px;
|
|
text-align: center;
|
|
}
|
|
|
|
.footer-powered {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 10px;
|
|
color: #555870;
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.footer-powered span {
|
|
font-weight: 600;
|
|
color: #8b8fa8;
|
|
}
|
|
|
|
.footer-logo-placeholder {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
background: linear-gradient(135deg, #6366f1, #8b5cf6);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
background-clip: text;
|
|
font-weight: 800;
|
|
font-size: 0.95rem;
|
|
letter-spacing: -0.3px;
|
|
}
|
|
|
|
/* ===== RESPONSIVE ===== */
|
|
@media (max-width: 768px) {
|
|
header { padding: 20px 24px; }
|
|
.tabs-wrapper { padding: 0 24px; }
|
|
main { padding: 40px 24px; }
|
|
.apps-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
|
|
.card-image-wrapper { width: 140px; height: 140px; border-radius: 28px; }
|
|
.tab-btn { padding: 14px 16px; font-size: 0.85rem; }
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.apps-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
|
|
.card-image-wrapper { width: 120px; height: 120px; border-radius: 24px; }
|
|
.header-badge { display: none; }
|
|
.tab-btn { padding: 12px 12px; font-size: 0.8rem; }
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<!-- HEADER -->
|
|
<header>
|
|
<div class="header-brand">
|
|
<div class="header-logo-placeholder" style="background:none;padding:0;display:flex;align-items:center;justify-content:center;">
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="38" height="38" viewBox="0 0 24 24" fill="none" stroke="#4f46e5" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
|
<rect x="3" y="3" width="7" height="7" rx="1.5"/>
|
|
<rect x="14" y="3" width="7" height="7" rx="1.5"/>
|
|
<rect x="3" y="14" width="7" height="7" rx="1.5"/>
|
|
<rect x="14" y="14" width="7" height="7" rx="1.5"/>
|
|
</svg>
|
|
</div>
|
|
<div>
|
|
<div class="header-title">Portail Applicatif</div>
|
|
<div class="header-subtitle">Environnement de production</div>
|
|
</div>
|
|
</div>
|
|
<div class="header-badge">Production</div>
|
|
</header>
|
|
|
|
<!-- TABS NAV -->
|
|
<div class="tabs-wrapper">
|
|
<button class="tab-btn active" onclick="switchTab('itinova', this)">
|
|
Applications Itinova
|
|
<span class="tab-count">5</span>
|
|
</button>
|
|
<button class="tab-btn" onclick="switchTab('santinova', this)">
|
|
Applications Santinova
|
|
<span class="tab-count">3</span>
|
|
</button>
|
|
</div>
|
|
|
|
<!-- MAIN -->
|
|
<main>
|
|
|
|
<!-- ONGLET ITINOVA -->
|
|
<div id="panel-itinova" class="tab-panel active">
|
|
<div class="section-header">
|
|
<h2>Applications Itinova</h2>
|
|
<p>Cliquez sur une application pour l'ouvrir dans un nouvel onglet</p>
|
|
</div>
|
|
<div class="apps-grid">
|
|
<!-- Gestion des Formations -->
|
|
<a class="app-card" data-app-id="formation-manager-itinova" href="https://formations.santinova-soft.org" target="_blank" rel="noopener noreferrer">
|
|
<div class="card-image-wrapper">
|
|
<img src="images/formation-manager-itinova.png" alt="Gestion des Formations" />
|
|
</div>
|
|
<div class="card-name">Gestion des Formations</div>
|
|
<div class="card-env-badge">Production</div>
|
|
<div class="card-status-badge">Hors ligne</div>
|
|
</a>
|
|
|
|
<!-- Itinova Contacts -->
|
|
<a class="app-card" data-app-id="itinova-contacts" href="https://contacts.santinova-soft.org" target="_blank" rel="noopener noreferrer">
|
|
<div class="card-image-wrapper">
|
|
<img src="images/itinova-contacts.png" alt="Itinova Contacts" />
|
|
</div>
|
|
<div class="card-name">Itinova Contacts</div>
|
|
<div class="card-env-badge">Production</div>
|
|
<div class="card-status-badge">Hors ligne</div>
|
|
</a>
|
|
|
|
<!-- Itinova Podcasts -->
|
|
<a class="app-card" data-app-id="itinova-podcasts" href="https://podcasts.santinova-soft.org" target="_blank" rel="noopener noreferrer">
|
|
<div class="card-image-wrapper">
|
|
<img src="images/itinova-podcasts.png" alt="Itinova Podcasts" />
|
|
</div>
|
|
<div class="card-name">Itinova Podcasts</div>
|
|
<div class="card-env-badge">Production</div>
|
|
<div class="card-status-badge">Hors ligne</div>
|
|
</a>
|
|
|
|
<!-- Veille Stratégique -->
|
|
<a class="app-card" data-app-id="veille-reglementaire" href="https://veille.santinova-soft.org" target="_blank" rel="noopener noreferrer">
|
|
<div class="card-image-wrapper">
|
|
<img src="images/veille-reglementaire.png" alt="Veille Stratégique" />
|
|
</div>
|
|
<div class="card-name">Veille Stratégique</div>
|
|
<div class="card-env-badge">Production</div>
|
|
<div class="card-status-badge">Hors ligne</div>
|
|
</a>
|
|
|
|
<!-- Itinova Gestion de Flotte -->
|
|
<a class="app-card" data-app-id="itinova-vehicle-exchange" href="https://flotte.santinova-soft.org" target="_blank" rel="noopener noreferrer">
|
|
<div class="card-image-wrapper">
|
|
<img src="images/itinova-flotte.png" alt="Itinova Gestion de Flotte" />
|
|
</div>
|
|
<div class="card-name">Itinova Gestion de Flotte</div>
|
|
<div class="card-env-badge">Production</div>
|
|
<div class="card-status-badge">Hors ligne</div>
|
|
</a>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<!-- ONGLET SANTINOVA -->
|
|
<div id="panel-santinova" class="tab-panel">
|
|
<div class="section-header">
|
|
<h2>Applications Santinova</h2>
|
|
<p>Cliquez sur une application pour l'ouvrir dans un nouvel onglet</p>
|
|
</div>
|
|
<div class="apps-grid">
|
|
|
|
<!-- Sonum -->
|
|
<a class="app-card" data-app-id="sonum" href="https://sonum.santinova-soft.org" target="_blank" rel="noopener noreferrer">
|
|
<div class="card-image-wrapper">
|
|
<img src="images/sonum.png" alt="Sonum" />
|
|
</div>
|
|
<div class="card-name">Sonum</div>
|
|
<div class="card-env-badge">Production</div>
|
|
<div class="card-status-badge">Hors ligne</div>
|
|
</a>
|
|
|
|
<!-- Facturation Santinova -->
|
|
<a class="app-card" data-app-id="facturation-santinova" href="https://facturation.santinova-soft.org" target="_blank" rel="noopener noreferrer">
|
|
<div class="card-image-wrapper">
|
|
<img src="images/facturation.png" alt="Facturation Santinova" />
|
|
</div>
|
|
<div class="card-name">Facturation Santinova</div>
|
|
<div class="card-env-badge">Production</div>
|
|
<div class="card-status-badge">Hors ligne</div>
|
|
</a>
|
|
|
|
|
|
<!-- Démat Facturation DSI -->
|
|
<a class="app-card" data-app-id="demat-facturation" href="https://demat-facturation.santinova-soft.org" target="_blank" rel="noopener noreferrer">
|
|
<div class="card-image-wrapper">
|
|
<img src="images/demat-facturation-dsi.jpg" alt="Démat Facturation DSI" />
|
|
</div>
|
|
<div class="card-name">Démat Facturation DSI</div>
|
|
<div class="card-env-badge">Production</div>
|
|
<div class="card-status-badge">Hors ligne</div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
</main>
|
|
|
|
<!-- FOOTER -->
|
|
<footer>
|
|
<div class="footer-powered" style="display:flex;align-items:center;gap:8px;">
|
|
powered by <img src="images/logo_santinova.webp" alt="Santinova" style="height:84px;vertical-align:middle;" />
|
|
</div>
|
|
</footer>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
// URL de l'API de statut du dashboard (même serveur, port 3001)
|
|
var DASHBOARD_STATUS_URL = 'https://dashboard.santinova-soft.org/api/public/status';
|
|
|
|
function updateTabCounts() {
|
|
document.querySelectorAll('.tab-btn').forEach(function(btn) {
|
|
var onclick = btn.getAttribute('onclick') || '';
|
|
var match = onclick.match(/switchTab\('(\w+)'/);
|
|
if (!match) return;
|
|
var panelId = 'panel-' + match[1];
|
|
var panel = document.getElementById(panelId);
|
|
if (!panel) return;
|
|
var count = panel.querySelectorAll('.app-card').length;
|
|
var badge = btn.querySelector('.tab-count');
|
|
if (badge) badge.textContent = count;
|
|
});
|
|
}
|
|
|
|
function switchTab(tabName, btn) {
|
|
document.querySelectorAll('.tab-btn').forEach(function(b) { b.classList.remove('active'); });
|
|
document.querySelectorAll('.tab-panel').forEach(function(p) { p.classList.remove('active'); });
|
|
btn.classList.add('active');
|
|
document.getElementById('panel-' + tabName).classList.add('active');
|
|
}
|
|
|
|
/**
|
|
* Met à jour l'état visuel des tuiles en fonction des statuts reçus du dashboard.
|
|
* Une tuile est grisée si son statut est 'offline' ou si le conteneur n'est pas en cours d'exécution.
|
|
*/
|
|
function applyStatuses(statuses) {
|
|
var cards = document.querySelectorAll('.app-card[data-app-id]');
|
|
cards.forEach(function(card) {
|
|
var appId = card.getAttribute('data-app-id');
|
|
var appStatus = statuses.find(function(s) { return s.id === appId; });
|
|
if (appStatus) {
|
|
var isOffline = appStatus.status === 'offline' || !appStatus.containerRunning;
|
|
if (isOffline) {
|
|
card.classList.add('offline');
|
|
} else {
|
|
card.classList.remove('offline');
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Interroge le dashboard pour obtenir les statuts et met à jour les tuiles.
|
|
*/
|
|
function fetchAndApplyStatuses() {
|
|
fetch(DASHBOARD_STATUS_URL, { cache: 'no-store' })
|
|
.then(function(response) {
|
|
if (!response.ok) throw new Error('HTTP ' + response.status);
|
|
return response.json();
|
|
})
|
|
.then(function(statuses) {
|
|
applyStatuses(statuses);
|
|
})
|
|
.catch(function(err) {
|
|
// En cas d'erreur (dashboard inaccessible), on ne grise rien
|
|
console.warn('[Portail] Impossible de récupérer les statuts:', err.message);
|
|
});
|
|
}
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
updateTabCounts();
|
|
// Premier appel immédiat
|
|
fetchAndApplyStatuses();
|
|
// Polling toutes les 30 secondes
|
|
setInterval(fetchAndApplyStatuses, 30000);
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|