gonito/templates/default-layout.hamlet
2018-01-02 18:55:35 +01:00

39 lines
1.9 KiB
Plaintext

<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="@{HomeR}">Gonito.net
$maybe user <- maybeUser
<ul class="nav navbar-nav">
<li><a href="@{HomeR}">_{MsgHome}</a>
<li><a href="@{Presentation4RealR}">_{MsgAbout}</a>
<li><a href="@{ListChallengesR}">_{MsgListChallenges}</a>
<li><a href="@{TagsR}">_{MsgListTags}</a>
<li><a href="@{AchievementsR}">_{MsgAchievements}</a>
$if userIsAdmin $ entityVal user
<li><a href="@{CreateChallengeR}">_{MsgCreateChallenge}</a>
<li><a href="@{CreateResetLinkR}">_{MsgCreateResetLink}</a>
<li><a href="@{ExtraPointsR}">_{MsgAddExtraPoints}</a>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="@{AuthR LoginR}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">#{userIdent $ entityVal user}<span class="caret"></span>
<ul class="dropdown-menu">
<li><a href="@{YourAccountR}">_{MsgYourAccount}</a></li>
<li><a href="@{MyScoreR}">_{MsgYourScore}</a></li>
<li><a href="@{AuthR LogoutR}">_{MsgLogOut}</a></li>
$nothing
<ul class="nav navbar-nav">
<li><a href="@{HomeR}">_{MsgHome}</a>
<li><a href="@{Presentation4RealR}">_{MsgAbout}</a>
<li><a href="@{ListChallengesR}">_{MsgListChallenges}</a>
<li><a href="@{TagsR}">_{MsgListTags}</a>
<ul class="nav navbar-nav navbar-right">
<li><a href="@{AuthR LoginR}">log in</a>
$maybe msg <- mmsg
<div #message .alert .alert-warning><a href="#" class="close" data-dismiss="alert">&times;</a> #{msg}
^{widget}