default topcommunities more link to local when specified. fixes #70

This commit is contained in:
Ryan Stafford 2024-05-10 12:32:11 -04:00
parent 3284ad6f20
commit fb219c0f00

View file

@ -2,7 +2,7 @@
<nav> <nav>
<div class="communities"> <div class="communities">
{{ if .Session }} {{ if .Session }}
<a id="openmycommunities" href="/{{.Host}}/search?searchtype=Communities&listingType=Subscribed&sort=TopMonth&page=0">my communities ▼</a> <a id="openmycommunities" href="/{{.Host}}/search?searchtype=Communities&listingType=Subscribed&page=0">my communities ▼</a>
{{ end }} {{ end }}
<a href="/{{.Host}}">home</a> <a href="/{{.Host}}">home</a>
<span> - </span> <span> - </span>
@ -15,11 +15,11 @@
<span> - </span> <span> - </span>
{{ end }} {{ end }}
{{ end }} {{ end }}
<a href="/{{$host}}/search?searchtype=Communities&sort=TopMonth" class="more">more »</a> <a href="/{{$host}}/search?searchtype=Communities&sort=TopAll{{ if eq .Listing "Local" }}&listingType=Local{{end}}" class="more">more »</a>
</div> </div>
<div id="mycommunities"> <div id="mycommunities">
{{- if and .Session .Session.Communities }} {{- if and .Session .Session.Communities }}
<a href="/{{.Host}}/search?searchtype=Communities&listingType=Subscribed&sort=TopMonth&page=0">view all »</a> <a href="/{{.Host}}/search?searchtype=Communities&listingType=Subscribed&page=0">view all »</a>
{{ range .Session.Communities }} {{ range .Session.Communities }}
<a href="/{{ $state.Host}}/{{ if .Community.Local }}c/{{.Community.Name}}{{else}}{{ localize .Community.ActorID }}{{end}}">{{fullcname .Community }}</a> <a href="/{{ $state.Host}}/{{ if .Community.Local }}c/{{.Community.Name}}{{else}}{{ localize .Community.ActorID }}{{end}}">{{fullcname .Community }}</a>
{{ end }} {{ end }}