- Création de docs/app/ pour la documentation de l'application - Création de docs/data/ pour les données utilisées par l'application - Déplacement de la documentation technique vers docs/app/ - Déplacement des données métier vers docs/data/ - Mise à jour de tous les liens et références dans les fichiers - Mise à jour des scripts (extract-technologies.js, analyze-business-metrics.js) - Mise à jour des fichiers JavaScript (custom.js, strategie-link.js) - Création de README.md dans docs/, docs/app/ et docs/data/ - Mise à jour du Readme.md principal avec les nouveaux chemins
143 lines
5.0 KiB
JavaScript
143 lines
5.0 KiB
JavaScript
// Script pour ajouter un lien vers la stratégie et créer une page dynamique
|
|
(function() {
|
|
// Attendre que le DOM soit chargé
|
|
if (document.readyState === 'loading') {
|
|
document.addEventListener('DOMContentLoaded', initStrategyLinks);
|
|
} else {
|
|
initStrategyLinks();
|
|
}
|
|
|
|
function initStrategyLinks() {
|
|
addStrategyLinkToFooter();
|
|
addStrategyLinkToHeader();
|
|
handleStrategyRoute();
|
|
}
|
|
|
|
function handleStrategyRoute() {
|
|
// Vérifier si on est sur la route stratégie
|
|
if (window.location.pathname === '/strategie' || window.location.pathname === '/strategie.html') {
|
|
createStrategyPage();
|
|
}
|
|
}
|
|
|
|
function createStrategyPage() {
|
|
// Créer une page complète pour la stratégie
|
|
document.body.innerHTML = `
|
|
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Stratégie d'Évolution Technique - Laplank</title>
|
|
<style>
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
line-height: 1.6;
|
|
color: #333;
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
background: #f5f5f5;
|
|
}
|
|
.container {
|
|
background: white;
|
|
padding: 40px;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
}
|
|
h1 {
|
|
color: #1a4d3a;
|
|
border-bottom: 3px solid #2ecc71;
|
|
padding-bottom: 10px;
|
|
}
|
|
h2 {
|
|
color: #2ecc71;
|
|
margin-top: 30px;
|
|
}
|
|
h3 {
|
|
color: #3498db;
|
|
margin-top: 20px;
|
|
}
|
|
.back-link {
|
|
display: inline-block;
|
|
margin-bottom: 20px;
|
|
color: #2ecc71;
|
|
text-decoration: none;
|
|
font-weight: bold;
|
|
}
|
|
.back-link:hover {
|
|
text-decoration: underline;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<a href="/" class="back-link">← Retour au Radar</a>
|
|
<h1>Stratégie d'Évolution Technique - Laplank</h1>
|
|
<p><strong>Date de mise à jour</strong> : 02/12/2025</p>
|
|
<p>Cette page est en cours de chargement...</p>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
`;
|
|
|
|
// Charger le contenu depuis le fichier Markdown ou l'afficher directement
|
|
loadStrategyContent();
|
|
}
|
|
|
|
function loadStrategyContent() {
|
|
// Pour l'instant, afficher un message et rediriger vers le fichier Markdown dans le repo
|
|
const container = document.querySelector('.container');
|
|
if (container) {
|
|
container.innerHTML = `
|
|
<a href="/" class="back-link">← Retour au Radar</a>
|
|
<h1>Stratégie d'Évolution Technique - Laplank</h1>
|
|
<p><strong>Date de mise à jour</strong> : 02/12/2025</p>
|
|
<p>La stratégie complète est disponible dans le dépôt Git :</p>
|
|
<p><a href="https://git.open.us.org/AJR/TechradarDev/-/blob/dev-biz/docs/data/strategie-evolution-technique.md" target="_blank">Voir la stratégie sur GitLab</a></p>
|
|
<p>Ou consultez le fichier local : <code>docs/data/strategie-evolution-technique.md</code></p>
|
|
`;
|
|
}
|
|
}
|
|
|
|
function addStrategyLinkToFooter() {
|
|
// Chercher le footer
|
|
const footer = document.querySelector('footer') || document.querySelector('.footer') || document.querySelector('[class*="footer"]');
|
|
|
|
if (footer) {
|
|
// Créer le lien vers la stratégie
|
|
const strategyLink = document.createElement('a');
|
|
strategyLink.href = '/strategie';
|
|
strategyLink.textContent = '📋 Voir la Stratégie';
|
|
strategyLink.style.marginLeft = '10px';
|
|
strategyLink.style.color = '#2ecc71';
|
|
strategyLink.style.textDecoration = 'none';
|
|
strategyLink.style.fontWeight = 'bold';
|
|
strategyLink.style.display = 'inline-block';
|
|
|
|
// Ajouter le lien au footer
|
|
footer.appendChild(strategyLink);
|
|
} else {
|
|
// Si le footer n'est pas trouvé, réessayer
|
|
setTimeout(addStrategyLinkToFooter, 1000);
|
|
}
|
|
}
|
|
|
|
function addStrategyLinkToHeader() {
|
|
// Chercher le header ou la navigation
|
|
const header = document.querySelector('header') || document.querySelector('nav') || document.querySelector('[class*="header"]') || document.querySelector('[class*="nav"]');
|
|
|
|
if (header) {
|
|
const strategyLink = document.createElement('a');
|
|
strategyLink.href = '/strategie';
|
|
strategyLink.textContent = 'Stratégie';
|
|
strategyLink.style.marginLeft = '15px';
|
|
strategyLink.style.color = '#2ecc71';
|
|
strategyLink.style.textDecoration = 'none';
|
|
strategyLink.style.fontWeight = 'bold';
|
|
|
|
header.appendChild(strategyLink);
|
|
}
|
|
}
|
|
})();
|