2016-09-20 08:32:22 +03:00
|
|
|
@use ::Link;
|
2017-08-03 21:59:21 +04:00
|
|
|
@use nickel::Request;
|
|
|
|
@use nickel_jwt_session::SessionRequestExtensions;
|
2016-09-20 08:32:22 +03:00
|
|
|
|
2017-08-03 21:59:21 +04:00
|
|
|
@(req: &Request, lpath: &[Link])
|
2016-09-20 08:32:22 +03:00
|
|
|
|
|
|
|
<header>
|
2017-07-30 21:47:54 +04:00
|
|
|
<span><a href="/">Images</a>
|
2016-09-23 23:03:04 +03:00
|
|
|
@for p in lpath { - <a href="@p.url">@p.name</a> }
|
2016-09-20 08:32:22 +03:00
|
|
|
</span>
|
2017-07-30 21:47:54 +04:00
|
|
|
<span>· <a href="/tag/">Tags</a></span>
|
|
|
|
<span>· <a href="/person/">People</a></span>
|
|
|
|
<span>· <a href="/place/">Places</a></span>
|
|
|
|
<span>· <a href="/thisday">On this day</a></span>
|
2017-11-08 02:36:09 +04:00
|
|
|
<span>· <a href="/random">Random pic</a></span>
|
2017-08-03 21:59:21 +04:00
|
|
|
@if let Some(ref u) = req.authorized_user() {<span class="user">@u (<a href="/logout">log out</a>)</span>}
|
|
|
|
else {<span class="user">(<a href="/login@if let Some(p) = req.path_without_query() {?next=@p}">log in</a>)</span>}
|
2016-09-20 08:32:22 +03:00
|
|
|
</header>
|