mirror of
https://github.com/rystaf/mlmym.git
synced 2024-11-25 06:25:46 +00:00
remove site icon from sidebar
This commit is contained in:
parent
b3741f467b
commit
b1f3517c71
12
routes.go
12
routes.go
|
@ -152,18 +152,6 @@ var funcMap = template.FuncMap{
|
||||||
}
|
}
|
||||||
return "/_/static/text.png"
|
return "/_/static/text.png"
|
||||||
},
|
},
|
||||||
"banner": func(site lemmy.Site) string {
|
|
||||||
bannerURL := ""
|
|
||||||
if site.Banner.IsValid() {
|
|
||||||
bannerURL = site.Banner.String()
|
|
||||||
} else if site.Icon.IsValid() {
|
|
||||||
bannerURL = site.Icon.String()
|
|
||||||
}
|
|
||||||
if pictrs.MatchString(bannerURL) {
|
|
||||||
return bannerURL + "?format=jpg&thumbnail=300"
|
|
||||||
}
|
|
||||||
return bannerURL
|
|
||||||
},
|
|
||||||
"cbanner": func(c lemmy.Community) string {
|
"cbanner": func(c lemmy.Community) string {
|
||||||
bannerURL := ""
|
bannerURL := ""
|
||||||
if c.Banner.IsValid() {
|
if c.Banner.IsValid() {
|
||||||
|
|
|
@ -65,8 +65,8 @@
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- if and .Site (not .Community) (not .User) }}
|
{{- if and .Site (not .Community) (not .User) }}
|
||||||
{{- if (or .Site.SiteView.Site.Banner.IsValid .Site.SiteView.Site.Icon.IsValid) }}
|
{{- if .Site.SiteView.Site.Banner.IsValid }}
|
||||||
<div class="banner" style="background-image: url({{ banner .Site.SiteView.Site }})"></div>
|
<div class="banner" style="background-image: url({{ .Site.SiteView.Site.Banner.String }})"></div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<h1>{{ .Site.SiteView.Site.Name }}</h1>
|
<h1>{{ .Site.SiteView.Site.Name }}</h1>
|
||||||
{{ printer .Site.SiteView.Counts.Users }} readers <br>
|
{{ printer .Site.SiteView.Counts.Users }} readers <br>
|
||||||
|
|
Loading…
Reference in a new issue