aboutsummaryrefslogtreecommitdiff
path: root/ui/src/error.rs
blob: ddf05bb6a9a7fde9ed161f24c2b9de9d8c7d4ea1 (plain)
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
/*
    This file is part of jellything (https://codeberg.org/metamuffin/jellything)
    which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
    Copyright (C) 2025 metamuffin <metamuffin.org>
*/

use crate::Page;
use jellycommon::routes::u_account_login;

impl Page for ErrorPage {
    fn title(&self) -> String {
        "Error".to_string()
    }
    fn to_render(&self) -> markup::DynRender {
        markup::new!(@self)
    }
}

markup::define! {
    ErrorPage(status: String) {
        h2 { "Error" }
        p { @status }
        // @if status == Status::NotFound {
            p { "You might need to " a[href=u_account_login()] { "log in" } ", to see this page" }
        // }
    }
}