2017-08-03 21:59:21 +04:00
|
|
|
@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;
|
2017-11-17 03:26:17 +04:00
|
|
|
@use templates::statics::{photos_css, admin_js, ux_js};
|
2016-09-26 01:45:13 +03:00
|
|
|
|
2017-08-03 21:59:21 +04: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"/>
|
2017-05-08 09:09:18 +04:00
|
|
|
<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>
|
|
|
|
}
|
2017-12-12 01:07:51 +04:00
|
|
|
<script src="/static/@ux_js.name" type="text/javascript" defer>
|
2017-11-17 03:26:17 +04:00
|
|
|
</script>
|
2016-09-26 01:45:13 +03:00
|
|
|
</head>
|
|
|
|
<body>
|
2017-08-03 21:59:21 +04:00
|
|
|
@:head(req, lpath)
|
2017-02-11 15:20:48 +04:00
|
|
|
<main>
|
|
|
|
<h1>@title</h1>
|
|
|
|
@:content()
|
|
|
|
</main>
|
|
|
|
<footer>
|
|
|
|
<p>Managed by
|
2017-08-01 03:40:42 +04:00
|
|
|
<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>
|