aboutsummaryrefslogtreecommitdiffstats
path: root/src/Pages/Errors/Index.cshtml
blob: 5db7b59b8aa95344bc7b38b9278c07dfe7eb0e27 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
@page "{code}"
@using System.Net
@model VSH.Pages.Errors.Index
@{
    ViewData["Title"] = Model.ErrorStatusCode switch {
            HttpStatusCode.NotFound => "Fant ikkje sida",
            var _ => "Uventa feil"
            };
}
<section class="container py-3 py-lg-5">
    @switch (Model.ErrorStatusCode) {
        case HttpStatusCode.NotFound:
            <div class="text-component text-center margin-bottom-lg">
                <h1>Fant ikkje siden</h1>
                <p>Beklagar, sida du prøvar å nå finnes ikkje.</p>
                <p><a href="/">Gå til forsida</a> eller <a href="/kontakt">kontakt oss</a>.</p>
            </div>
            break;
        case HttpStatusCode.InternalServerError:
            <div class="text-component text-center margin-bottom-lg">
                <h1>Her gjekk noko gale</h1>
                <p>Vi jobbar med å løysa problemet, ver vennleg og prøv igjen seinare.</p>
            </div>
            break;
        default:
            <div class="text-component text-center margin-bottom-lg">
                <h1>Heisann, her gjekk ikkje alt etter planen</h1>
                <p>Ver vennleg og prøv igjen snart.</p>
                <p><a href="/">Gå til forsida</a> eller <a href="/kontakt">kontakt oss</a>.</p>
            </div>
            break;
    }
</section>