initial commit
This commit is contained in:
commit
21711bd5dd
253 changed files with 78415 additions and 0 deletions
44
layouts/_default/baseof.html
Normal file
44
layouts/_default/baseof.html
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<!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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue