album/templates/page_base.rs.html
2019-03-26 18:10:00 +01:00

37 lines
1018 B
HTML

@use nickel::Request;
@use nickel_jwt_session::SessionRequestExtensions;
@use crate::server::Link;
@use super::head;
@use super::statics::{photos_css, admin_js, ux_js};
@(req: &Request, title: &str, lpath: &[Link], meta: Content, content: Content)
<!doctype html>
<html>
<head>
<title>@title</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="/static/@photos_css.name" type="text/css"/>
@if req.authorized_user().is_some() {
<script src="/static/@admin_js.name" type="text/javascript" defer>
</script>
}
<script src="/static/@ux_js.name" type="text/javascript" defer>
</script>
@:meta()
</head>
<body>
@:head(req, lpath)
<main>
<h1>@title</h1>
@:content()
</main>
<footer>
<p>Managed by
<a href="https://github.com/kaj/rphotos">rphotos
@env!("CARGO_PKG_VERSION")</a>.</p>
</footer>
</body>
</html>