Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2022-05-07. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
nyaa-pantsu/templates/layouts/partials/helpers/badgemenu.jet.html
kilo d51eb1ba60 Fixed width for text in refine, make smaller header apply at 500px wide devices & under (#1368)
* Fixed width for text in refine

* make smaller header apply at 500px & under

* remove useless line

* hide notification count if no new notification
2017-08-14 15:37:37 +10:00

37 lignes
1,4 Kio
HTML

{{ import "csrf" }}
{{block badge_user()}}
<div class="h-user">
{{if User.ID > 0 }}
<button href="#" class="nav-btn">
<div class="user-avatar small">
<img src="https://www.gravatar.com/avatar/{{ User.MD5 }}?s=50"/>
</div>
<span class="user-info" title="{{ User.Username}}">
<span class="hide-md">{{User.Username}}</span>
</span>
</button>
<div class="user-menu">
<a class="nav-btn" href="/user/{{ User.ID }}/{{ User.Username }}">{{ T("profile")}}</a>
<a class="nav-btn notif" href="/notifications">
{{ T("my_notifications")}}
{{if User.GetUnreadNotifications() > 0}}<span class="badge">({{ User.GetUnreadNotifications() }})</span>{{end}}
</a>
<a class="nav-btn" href="/user/{{ User.ID }}/{{ User.Username }}/edit">
{{ T("settings")}}
</a>
{{if User.HasAdmin()}}
<a class="nav-btn" href="/mod">{{ T("moderation")}}</a>
{{end}}
<form action="/logout" method="POST">
{{ yield csrf_field() }}
<input type="hidden" value="{{ URL.String() }}" name="redirectTo"/>
<input class="nav-btn" type="submit" name="logout" value="{{ T("sign_out")}}"/>
</form>
</div>
{{ else }}
<a href="/login?redirectTo={{ URL.String() }}" class="nav-btn log-in" style="width:auto;" title="{{ T("signin") }}">
<div class="icon-user"></div>
<span>{{ T("signin") }}</span>
</a> {{end}}
</div>
{{end}}