
- Intégration Marked.js pour rendu Markdown 100% compatible GitHub - Support complet des diagrammes Mermaid (flux, séquence, classe, etc.) - Styles CSS identiques à GitHub (polices, espacements, couleurs) - Méthode togglePreview() asynchrone pour gestion optimale - Détection automatique des blocs ```mermaid et rendu dynamique - Fallback vers parseur maison si CDN indisponible - Gestion d'erreurs robuste pour Mermaid - Thème adaptatif (sombre/clair) pour les diagrammes - TEST_MARKDOWN.md créé pour validation complète 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
46 lines
1.3 KiB
JavaScript
46 lines
1.3 KiB
JavaScript
const { getHeader, getLeftPanel, getRightPanel, getPanelOverlay } = require('./header');
|
|
const { getMain } = require('./main');
|
|
const { getFooter } = require('./footer');
|
|
|
|
function getHead(){
|
|
return `
|
|
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Conception-Assistant</title>
|
|
<link rel="stylesheet" href="/assets/css/style.css">
|
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>📝</text></svg>">
|
|
<!-- Marked.js pour le rendu Markdown compatible GitHub -->
|
|
<script src="https://cdn.jsdelivr.net/npm/marked@9.1.6/marked.min.js"></script>
|
|
<!-- Mermaid pour les diagrammes -->
|
|
<script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
|
|
</head>
|
|
`;
|
|
}
|
|
|
|
function getBody(){
|
|
return `
|
|
<body>`
|
|
+ getHeader()
|
|
+ getLeftPanel()
|
|
+ getRightPanel()
|
|
+ getPanelOverlay()
|
|
+ getMain()
|
|
+ getFooter() +
|
|
`
|
|
<!-- Bouton scroll to top -->
|
|
<button id="scroll-to-top" class="scroll-to-top" title="Retour en haut">⬆️</button>
|
|
<script src="/assets/js/app.js"></script>
|
|
</body>
|
|
</html>
|
|
`;
|
|
}
|
|
|
|
|
|
function getPage() {
|
|
return getHead() + getBody();
|
|
}
|
|
|
|
module.exports = { getPage }; |