45 lines
1.3 KiB
HTML
45 lines
1.3 KiB
HTML
|
|
<!DOCTYPE html>
|
||
|
|
<html lang="fr">
|
||
|
|
<head>
|
||
|
|
<meta charset="utf-8">
|
||
|
|
<title>{{ .Title }}</title>
|
||
|
|
|
||
|
|
<!-- FONTS -->
|
||
|
|
<link href="/fonts/dsentient/stylesheet.css" rel="stylesheet" type="text/css">
|
||
|
|
|
||
|
|
<!-- Charge le CSS pour l'affichage écran -->
|
||
|
|
{{ $styleScreen := resources.Get "style-screen.css" }}
|
||
|
|
{{ if $styleScreen }}
|
||
|
|
<link id="style-screen" rel="stylesheet" type="text/css" href="{{ $styleScreen.RelPermalink }}">
|
||
|
|
{{ end }}
|
||
|
|
{{ $stylePrint := resources.Get "style-print.css" }}
|
||
|
|
{{ if $styleScreen }}
|
||
|
|
<link id="style-print" rel="stylesheet" type="text/css" href="{{ $stylePrint.RelPermalink }}" media="print">
|
||
|
|
{{ end }}
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<button id="btn-print"><a href="/?print=true">Print</a></button>
|
||
|
|
|
||
|
|
{{ block "main" . }}{{ end }}
|
||
|
|
|
||
|
|
|
||
|
|
<script>
|
||
|
|
// Charge le module csspageweaver si ?print=true
|
||
|
|
const urlParams = new URLSearchParams(window.location.search);
|
||
|
|
if (urlParams.get('print') === 'true') {
|
||
|
|
// Retire le CSS d'affichage écran
|
||
|
|
const styleScreen = document.getElementById('style-screen');
|
||
|
|
if (styleScreen) {
|
||
|
|
styleScreen.remove();
|
||
|
|
}
|
||
|
|
|
||
|
|
// Charge le script
|
||
|
|
const script = document.createElement('script');
|
||
|
|
script.src = '/csspageweaver/main.js';
|
||
|
|
script.type = 'module';
|
||
|
|
document.head.appendChild(script);
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
</body>
|
||
|
|
</html>
|