Razor Templates
This commit is contained in:
44
WGneu/Documents/Document.cshtml
Normal file
44
WGneu/Documents/Document.cshtml
Normal file
@ -0,0 +1,44 @@
|
||||
@using RazorLight
|
||||
@inherits TemplatePage<WGneu.Documents.Document>
|
||||
@model WGneu.Documents.Document
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de-AT">
|
||||
<head>
|
||||
<title>@Model.Title</title>
|
||||
<meta charset="UTF-8"/>
|
||||
<script>
|
||||
window.finished = false;
|
||||
window.PagedConfig = { auto: navigator.webdriver };
|
||||
if (!navigator.webdriver) {
|
||||
window.addEventListener("beforeprint", async () => {
|
||||
await window.PagedPolyfill.preview();
|
||||
window.finished = true;
|
||||
});
|
||||
window.addEventListener("afterprint", () => {
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<!-- TODO store paged.js locally to avoid using the internet -->
|
||||
<script src="https://unpkg.com/pagedjs/dist/paged.polyfill.js"></script>
|
||||
<link rel="stylesheet" href="style.css" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="m1"></div>
|
||||
<div class="m2"></div>
|
||||
<div class="m3"></div>
|
||||
<header>@Model.Header</header>
|
||||
<div class="footer-wrapper">
|
||||
<div class="pre-footer">
|
||||
<span class="date">@Model.FullDateString</span>
|
||||
<span class="page"></span>
|
||||
</div>
|
||||
<footer>@Model.Footer</footer>
|
||||
</div>
|
||||
<div class="spacing"></div>
|
||||
<div class="main-wrapper">
|
||||
@RenderBody()
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user