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/_badgemenu.html

24 lignes
1,2 Kio
HTML
Brut Vue normale Historique

{{define "badge_user"}}
{{with .User}}
2017-05-08 15:37:50 +02:00
<ul class="nav navbar-nav navbar-right badgemenu">
<li class="dropdown">
{{if gt .Id 0}}
<a href="{{ genRoute "user_profile" "id" (print .Id) "username" .Username }}" class="dropdown-toggle profile-image" data-toggle="dropdown">
<img src="https://www.gravatar.com/avatar/{{ .Md5 }}?s=50" class="img-circle special-img"> {{ .Username }} <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="{{ genRoute "user_profile" "id" (print .Id) "username" .Username }}"><i class="fa fa-cog"></i> Profile</a></li>
<li class="divider"></li>
2017-05-09 03:53:31 +02:00
<li><a href="{{ genRoute "user_logout" }}"><i class="fa fa-sign-out"></i> {{ T "sign_out"}}</a></li>
</ul>
{{ else }}
2017-05-09 03:53:31 +02:00
<a href="#" class="dropdown-toggle profile-image" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ T "member" }}<span class="caret"></span></a>
2017-05-08 09:13:20 +02:00
<ul class="dropdown-menu">
2017-05-09 03:53:31 +02:00
<li><a href="{{ genRoute "user_login" }}"><i class="fa fa-sign-out"></i> {{ T "sign_in"}}</a></li>
<li><a href="{{ genRoute "user_register" }}"><i class="fa fa-cog"></i> {{ T "sign_up"}}</a></li>
2017-05-08 09:13:20 +02:00
</ul>
{{end}}
</li>
2017-05-08 15:37:50 +02:00
</ul>
{{end}}
{{end}}