summaryrefslogtreecommitdiffstats
path: root/src/Pages/Read.cshtml
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2022-11-16 17:49:54 +0100
committerivarlovlie <git@ivarlovlie.no>2022-11-16 17:49:54 +0100
commitd949d7aa8b877c25dbd31f09ceb0ddd03e0d055d (patch)
treecd2d787b24805456576b566857e6084897b6d49f /src/Pages/Read.cshtml
parent9ba3cf736fa0c83e6a9850b31d43521cabe8a016 (diff)
downloadlettnytt-d949d7aa8b877c25dbd31f09ceb0ddd03e0d055d.tar.xz
lettnytt-d949d7aa8b877c25dbd31f09ceb0ddd03e0d055d.zip
refactor: Move reader into index page
Diffstat (limited to 'src/Pages/Read.cshtml')
-rw-r--r--src/Pages/Read.cshtml50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/Pages/Read.cshtml b/src/Pages/Read.cshtml
deleted file mode 100644
index 9cff853..0000000
--- a/src/Pages/Read.cshtml
+++ /dev/null
@@ -1,50 +0,0 @@
-@page "/les/{site}"
-@model ReadModel
-@{
- ViewData["Title"] = Model.Source.Title;
-}
-
-<div id="art-header" style="display: flex; justify-content: space-between">
- <div>
- <h1>@Model.Source.Title</h1>
- <p>@Model.Source.Subtitle</p>
- </div>
-</div>
-
-<article id="art-body">
- @Html.Raw(Model.Source.Content)
-</article>
-
-<footer>
- <p>
- <div style="display: flex; flex-direction: column; flex-wrap: nowrap;">
- <div style="flex-direction:column">
- @foreach (var author in Model.Source.Authors) {
- <small style="white-space: nowrap"><b>@author.Name</b>: @author.Title</small>
- <br/>
- }
- </div>
- <div style="flex-direction: column">
- @if (Model.Source.PublishedAt != default) {
- <small style="white-space: nowrap">Publisert: @Model.Source.PublishedAt.ToString("dd-MM-yyyy hh:mm:ss")</small>
- }
- @if (Model.Source.UpdatedAt != default) {
- <br/>
- <small style="white-space: nowrap">Oppdatert: @Model.Source.UpdatedAt.ToString("dd-MM-yyyy hh:mm:ss")</small>
- }
- <br/>
- <small>
- <a href="@Model.Source.Href" no-interception>Les på nrk.no</a>
- </small>
- </div>
- </div>
- </p>
-</footer>
-
-<script>
-document.addEventListener("DOMContentLoaded", () => {
- document.querySelectorAll("a:not([no-interception])").forEach(el => {
- if (el.href.indexOf("nrk.no") !== -1) el.href = "/les/nrk?url=" + el.href;
- });
-})
-</script> \ No newline at end of file