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>
<div class="communities">
{{ 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 }}
<a href="/{{.Host}}">home</a>
<span> - </span>
@ -15,11 +15,11 @@
<span> - </span>
{{ 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 id="mycommunities">
{{- 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 }}
<a href="/{{ $state.Host}}/{{ if .Community.Local }}c/{{.Community.Name}}{{else}}{{ localize .Community.ActorID }}{{end}}">{{fullcname .Community }}</a>
{{ end }}