2023-11-18 21:23:22 +03:00
|
|
|
//! A module that handles the view for the 404 page in the `websurfx` frontend.
|
2023-11-17 22:10:06 +03:00
|
|
|
|
|
|
|
use crate::templates::partials::{footer::footer, header::header};
|
|
|
|
use maud::{html, Markup};
|
|
|
|
|
2023-11-18 21:23:22 +03:00
|
|
|
/// A function that handles the html code for the 404 page view in the search engine frontend.
|
2023-11-17 22:10:06 +03:00
|
|
|
///
|
2023-11-18 21:23:22 +03:00
|
|
|
/// # Arguments
|
|
|
|
///
|
|
|
|
/// * `colorscheme` - It takes the colorscheme name as an argument.
|
|
|
|
/// * `theme` - It takes the theme name as an argument.
|
|
|
|
///
|
|
|
|
/// # Returns
|
|
|
|
///
|
|
|
|
/// It returns the compiled html markup code as a result.
|
2023-11-17 22:10:06 +03:00
|
|
|
pub fn not_found(colorscheme: &str, theme: &str) -> Markup {
|
|
|
|
html!(
|
|
|
|
(header(colorscheme, theme))
|
|
|
|
main class="error_container"{
|
|
|
|
img src="images/robot-404.svg" alt="Image of broken robot.";
|
2023-11-18 21:23:22 +03:00
|
|
|
.error_content{
|
2023-11-17 22:10:06 +03:00
|
|
|
h1{"Aw! snap"}
|
|
|
|
h2{"404 Page Not Found!"}
|
|
|
|
p{"Go to "{a href="/"{"search page"}}}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
(footer())
|
|
|
|
)
|
|
|
|
}
|