summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2022-11-16 17:48:52 +0100
committerivarlovlie <git@ivarlovlie.no>2022-11-16 17:48:52 +0100
commit49cb5a82e7a31f65d0c86ca24dd5f4eb825e6803 (patch)
tree791e77df73862f8fc97e3478f025f1375f78df5c
parentcccd441e132b687db374b0f04018774298747d7c (diff)
downloadlettnytt-49cb5a82e7a31f65d0c86ca24dd5f4eb825e6803.tar.xz
lettnytt-49cb5a82e7a31f65d0c86ca24dd5f4eb825e6803.zip
feat: Add /om
-rw-r--r--src/Pages/About.cshtml15
-rw-r--r--src/Pages/About.cshtml.cs10
-rw-r--r--src/Pages/Shared/_Layout.cshtml20
3 files changed, 41 insertions, 4 deletions
diff --git a/src/Pages/About.cshtml b/src/Pages/About.cshtml
new file mode 100644
index 0000000..766c2a4
--- /dev/null
+++ b/src/Pages/About.cshtml
@@ -0,0 +1,15 @@
+@page "/om"
+@model I2R.LightNews.Pages.About
+
+@{
+ ViewData["Title"] = "Om";
+}
+
+<p>Lettnytt viser deg forenklet versjon av norske nettaviser.</p>
+<p>Noen artikler kan også leses forenklet.</p>
+<p>Her er en ikke-komplett liste over inngrep:</p>
+<ul>
+ <li>Fjerner bilder, videoer og svakt relevante lenker (reklame) til andre artikler.</li>
+ <li>For nrk.no: Fjerner lenker til /mat, /radio og /tv</li>
+</ul>
+<p>E-postadresse: lettnytt@oiee.no</p> \ No newline at end of file
diff --git a/src/Pages/About.cshtml.cs b/src/Pages/About.cshtml.cs
new file mode 100644
index 0000000..b30cd51
--- /dev/null
+++ b/src/Pages/About.cshtml.cs
@@ -0,0 +1,10 @@
+using Microsoft.AspNetCore.Mvc.RazorPages;
+
+namespace I2R.LightNews.Pages;
+
+public class About : PageModel
+{
+ public void OnGet() {
+
+ }
+} \ No newline at end of file
diff --git a/src/Pages/Shared/_Layout.cshtml b/src/Pages/Shared/_Layout.cshtml
index 09babeb..c3ca817 100644
--- a/src/Pages/Shared/_Layout.cshtml
+++ b/src/Pages/Shared/_Layout.cshtml
@@ -4,17 +4,29 @@
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="/index.css">
+ @await RenderSectionAsync("head", false)
<title>@ViewData["Title"] - Lettnytt</title>
</head>
<body>
-<header>
- <nav style="display: flex; flex-direction: row; gap: 0 15px">
- <a href="/nrk" style="color: @(Path.StartsWith("/nrk") ? "black" : "blue")">NRK</a>
- <a href="/dagbladet" style="color: @(Path.StartsWith("/dagbladet") ? "black" : "blue")">Dagbladet</a>
+<header id="top-bar">
+ <nav>
+ <div class="left">
+ <a href="/nrk" class="@(Context.Request.Path.StartsWithSegments("/nrk") ? "active" : "")">NRK</a>
+ <a href="/dagbladet" class="@(Context.Request.Path.StartsWithSegments("/dagbladet") ? "active" : "")">Dagbladet</a>
+ <a href="/aftenposten" class="@(Context.Request.Path.StartsWithSegments("/aftenposten") ? "active" : "")">Aftenposten</a>
+ <a href="/vg" class="@(Context.Request.Path.StartsWithSegments("/vg") ? "active" : "")">VG</a>
+ <a href="/dn" class="@(Context.Request.Path.StartsWithSegments("/dn") ? "active" : "")">DN</a>
+ <a href="/e24" class="@(Context.Request.Path.StartsWithSegments("/e24") ? "active" : "")">E24</a>
+ <a href="/kode24" class="@(Context.Request.Path.StartsWithSegments("/kode24") ? "active" : "")">Kode 24</a>
+ </div>
+ <div class="right">
+ <a href="/om" class="@(Context.Request.Path.StartsWithSegments("/om") ? "active" : "")">Om lettnytt</a>
+ </div>
</nav>
</header>
<main>
@RenderBody()
</main>
+@await RenderSectionAsync("scripts", false)
</body>
</html> \ No newline at end of file