Use FileSystemProject in RazorLight
This commit is contained in:
@ -14,8 +14,8 @@
|
||||
window.addEventListener("afterprint", () => { location.reload(); });
|
||||
}
|
||||
</script>
|
||||
<script src="C:\ProgramData\Elwig\resources\paged.polyfill.js"></script>
|
||||
<link rel="stylesheet" href="C:\ProgramData\Elwig\resources\style.css"/>
|
||||
<script src="@Raw(Model.DataPath)\resources\paged.polyfill.js"></script>
|
||||
<link rel="stylesheet" href="@Raw(Model.DataPath)\resources\style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="m1"></div>
|
||||
|
@ -9,6 +9,7 @@ namespace Elwig.Documents {
|
||||
private TempFile? PdfFile = null;
|
||||
|
||||
public Document(string title) {
|
||||
DataPath = App.DataPath;
|
||||
Title = title;
|
||||
Header = "<h1>Winzergenossenschaft Matzen</h1>";
|
||||
Footer = "Winzergenossenschaft für Matzen und Umgebung reg. Gen.m.b.H.";
|
||||
@ -24,6 +25,8 @@ namespace Elwig.Documents {
|
||||
PdfFile = null;
|
||||
}
|
||||
|
||||
public string DataPath { get; set; }
|
||||
|
||||
public string Title { get; set; }
|
||||
|
||||
public string Header { get; set; }
|
||||
|
@ -10,7 +10,7 @@ namespace Elwig.Documents {
|
||||
|
||||
public static async Task Init(Action evtHandler) {
|
||||
var e = new RazorLightEngineBuilder()
|
||||
.UseEmbeddedResourcesProject(typeof(App).Assembly, "Elwig.Documents")
|
||||
.UseFileSystemProject(App.DataPath + "resources")
|
||||
.UseMemoryCachingProvider()
|
||||
.Build();
|
||||
|
||||
|
Reference in New Issue
Block a user