album/templates/page_base.rs.html

35 lines
961 B
HTML
Raw Normal View History

2016-12-19 10:19:26 +04:00
@use ::Link;
@use nickel::Request;
2017-09-25 01:32:33 +04:00
@use nickel_jwt_session::SessionRequestExtensions;
2016-09-26 01:45:13 +03:00
@use templates::head;
2017-09-25 01:32:33 +04:00
@use templates::statics::{photos_css, admin_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() {
<script language="javascript" src="/static/@admin_js.name"
type="text/javascript" async onload="rpadmin()">
</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
@env!("CARGO_PKG_VERSION"), which is open source</a>.</p>
2017-02-11 15:20:48 +04:00
</footer>
2016-09-26 01:45:13 +03:00
</body>
</html>