Preparing for a single error page template

This commit is contained in:
Veloman Yunkan 2022-01-23 23:01:16 +04:00 committed by Matthieu Gautier
parent f4059f3faf
commit d8a60db739
2 changed files with 7 additions and 3 deletions

View File

@ -106,7 +106,11 @@ HTTP404HtmlResponse::HTTP404HtmlResponse(const InternalServer& server,
RESOURCE::templates::_404_html) RESOURCE::templates::_404_html)
{ {
kainjow::mustache::list emptyList; kainjow::mustache::list emptyList;
this->m_data = kainjow::mustache::object{{"details", emptyList}}; this->m_data = kainjow::mustache::object{
{"PAGE_TITLE", "Content not found"},
{"PAGE_HEADING", "Not Found"},
{"details", emptyList}
};
} }
HTTP404HtmlResponse& HTTP404HtmlResponse::operator+(UrlNotFoundMsg /*unused*/) HTTP404HtmlResponse& HTTP404HtmlResponse::operator+(UrlNotFoundMsg /*unused*/)

View File

@ -2,10 +2,10 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta content="text/html;charset=UTF-8" http-equiv="content-type" /> <meta content="text/html;charset=UTF-8" http-equiv="content-type" />
<title>Content not found</title> <title>{{PAGE_TITLE}}</title>
</head> </head>
<body> <body>
<h1>Not Found</h1> <h1>{{PAGE_HEADING}}</h1>
{{#details}} {{#details}}
<p> <p>
{{{p}}} {{{p}}}