album/templates/page_base.rs.html

36 lines
991 B
HTML
Raw Normal View History

@use nickel::Request;
2017-09-25 01:32:33 +04:00
@use nickel_jwt_session::SessionRequestExtensions;
2018-03-03 17:39:33 +04:00
@use server::Link;
2016-09-26 01:45:13 +03:00
@use templates::head;
@use templates::statics::{photos_css, admin_js, ux_js};
2016-09-26 01:45:13 +03:00
@(req: &Request, title: &str, lpath: &[Link], content: Content)
2016-09-26 01:45:13 +03:00
<!doctype html>
<html>
<head>
<title>@title</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
2017-02-16 16:59:52 +04:00
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="/static/@photos_css.name" type="text/css"/>
2017-09-25 01:32:33 +04:00
@if req.authorized_user().is_some() {
2017-12-12 02:11:36 +04:00
<script src="/static/@admin_js.name" type="text/javascript" defer>
2017-09-25 01:32:33 +04:00
</script>
}
<script src="/static/@ux_js.name" type="text/javascript" defer>
</script>
2016-09-26 01:45:13 +03:00
</head>
<body>
@:head(req, lpath)
2017-02-11 15:20:48 +04:00
<main>
<h1>@title</h1>
@:content()
</main>
<footer>
<p>Managed by
<a href="https://github.com/kaj/rphotos">rphotos
2018-03-05 21:34:21 +04:00
@env!("CARGO_PKG_VERSION")</a>.</p>
2017-02-11 15:20:48 +04:00
</footer>
2016-09-26 01:45:13 +03:00
</body>
</html>