2023-06-30 19:41:35 +00:00
|
|
|
<nav>
|
|
|
|
<div class="communities">
|
|
|
|
<a href="/{{.Host}}">home</a>
|
|
|
|
<span> - </span>
|
|
|
|
<a href="/{{.Host}}?listingType=All">all</a>
|
|
|
|
|
|
|
|
|
{{ $host := .Host }}
|
|
|
|
{{ range $i, $c := .TopCommunities}}
|
2023-07-05 18:50:52 +00:00
|
|
|
<a href="/{{$host}}/c/{{fullcname $c.Community}}">{{$c.Community.Name}}</a>
|
2023-07-01 02:42:45 +00:00
|
|
|
<span> - </span>
|
2023-06-30 19:41:35 +00:00
|
|
|
{{ end }}
|
|
|
|
<a href="/{{$host}}/search?searchtype=Communities" class="more">more »</a>
|
|
|
|
</div>
|
2023-07-02 21:29:35 +00:00
|
|
|
<div class="right">
|
|
|
|
{{ if .Session }}
|
|
|
|
<a href="/{{.Host}}/u/{{ .Session.UserName}}">{{ .Session.UserName }}</a>
|
|
|
|
|
|
|
|
|
<a href="/{{.Host}}/inbox" class="mailbox{{ if .UnreadCount }} orangered{{end}}">✉</a>
|
|
|
|
|
|
2023-07-10 15:53:15 +00:00
|
|
|
<a id="opensettings" href="/{{.Host}}/settings">settings</a>
|
2023-07-02 21:29:35 +00:00
|
|
|
|
|
|
|
|
<form method="POST"><input type="submit" name="op" value="logout"></form>
|
|
|
|
{{else}}
|
2023-07-06 15:20:35 +00:00
|
|
|
<a href="/{{.Host}}/login">log in</a> or <a href="/{{.Host}}/login">sign up</a>
|
2023-07-02 21:29:35 +00:00
|
|
|
|
|
2023-07-10 15:53:15 +00:00
|
|
|
<a id="opensettings" href="/{{.Host}}/settings">settings</a>
|
2023-07-02 21:29:35 +00:00
|
|
|
{{end}}
|
|
|
|
</div>
|
2023-07-10 15:53:15 +00:00
|
|
|
<div id="settingspopup"></div>
|
2023-06-30 19:41:35 +00:00
|
|
|
<div class="spacer">
|
|
|
|
<a href="/{{ .Host}}/">
|
|
|
|
<img class="icon" src="{{ if .Site }}{{ .Site.SiteView.Site.Icon.String }}{{else}}/{{ .Host}}/icon.jpg{{end}}">
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{{- if .Community }}
|
|
|
|
<a class="title" href="/{{ .Host}}//c/{{fullcname .Community.CommunityView.Community}}">{{fullcname .Community.CommunityView.Community}}</a>
|
|
|
|
{{ else if .User }}
|
|
|
|
<a class="title" href="/{{ .Host}}/u/{{fullname .User.PersonView.Person}}">{{fullname .User.PersonView.Person}}</a>
|
|
|
|
{{ else }}
|
2023-07-02 21:29:35 +00:00
|
|
|
<a class="title" href="/{{.Host}}">{{ host .Host}}</a>
|
2023-06-30 19:41:35 +00:00
|
|
|
{{- end -}}
|
|
|
|
{{- if eq .Op "create_post" "create_community" -}}
|
|
|
|
<span>: submit</span>
|
|
|
|
{{- else if eq .Op "edit_post" "edit_community" -}}
|
|
|
|
<span>: edit</span>
|
|
|
|
{{ else }}
|
|
|
|
{{- if ne .Query "" -}}
|
|
|
|
<span>: search</span>
|
|
|
|
{{ end }}
|
|
|
|
<ul>
|
|
|
|
{{ if .User }}
|
2023-07-06 15:20:35 +00:00
|
|
|
<li {{if eq .Op "" }}class="selected"{{end}}><a href="?">overview</a></li>
|
2023-07-05 18:27:49 +00:00
|
|
|
{{ if and .Session (eq .User.PersonView.Person.ID .Session.UserID) }}
|
2023-07-05 14:20:07 +00:00
|
|
|
<li {{if eq .Op "Saved"}}class="selected"{{end}}><a href="?view=Saved">saved</a></li>
|
|
|
|
{{ end }}
|
2023-06-30 19:41:35 +00:00
|
|
|
{{ else if .Comments -}}
|
|
|
|
<li class="selected"><a href="">comments</a></li>
|
|
|
|
{{ else if .Activities }}
|
|
|
|
<li class="selected"><a href="">mailbox</a></li>
|
|
|
|
{{ else }}
|
|
|
|
<li{{ if eq .Sort "Hot" }} class="selected"{{end}}><a href="{{ .SortBy "Hot" }}">hot</a></li>
|
|
|
|
<li{{ if eq .Sort "Active" }} class="selected"{{end}}><a href="{{ .SortBy "Active" }}">active</a></li>
|
|
|
|
<li{{ if eq .Sort "Old" }} class="selected"{{end}}><a href="{{ .SortBy "Old" }}">old</a></li>
|
|
|
|
<li{{ if eq .Sort "New" }} class="selected"{{end}}><a href="{{ .SortBy "New" }}">new</a></li>
|
|
|
|
<li{{ if eq .Sort "MostComments" }} class="selected"{{end}}><a href="{{ .SortBy "MostComments" }}">most comments</a></li>
|
|
|
|
<li{{ if eq .Sort "NewComments" }} class="selected"{{end}}><a href="{{ .SortBy "NewComments" }}">new comments</a></li>
|
|
|
|
<li{{ if contains .Sort "Top" }} class="selected"{{end}}><a href="{{ .SortBy "TopDay" }}">top</a></li>
|
2023-07-07 18:51:11 +00:00
|
|
|
{{ if .Posts }}
|
2023-07-10 15:53:15 +00:00
|
|
|
<li id="showimages"><a id="se" href="">show images</a></li>
|
2023-07-07 18:51:11 +00:00
|
|
|
{{ end }}
|
2023-06-30 19:41:35 +00:00
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
{{ end }}
|
|
|
|
</nav>
|