From 4f77234854791178365fddeb71b9dca4b4c1adc2 Mon Sep 17 00:00:00 2001 From: Ryan Stafford Date: Fri, 30 Jun 2023 22:10:24 -0400 Subject: [PATCH] lazy loading, autofocus, cf ip --- routes.go | 22 ++++++++++++---------- state.go | 2 +- templates/menu.html | 2 +- templates/root.html | 2 +- templates/sidebar.html | 2 +- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/routes.go b/routes.go index c041a1c..a59d7c2 100644 --- a/routes.go +++ b/routes.go @@ -110,6 +110,7 @@ var funcMap = template.FuncMap{ panic(err) } converted := strings.Replace(buf.String(), `href="https://`+host, `href="/`+host, -1) + converted = strings.Replace(converted, `- all time {{ end }} - {{ if and (ne .SearchType "Communities") (not (and .Session (not .Posts) (not .Community) (and .Listing "Subscribed"))) }} + {{ if and (not .SearchType ) (not (and .Session (not .Posts) (not .Community) (and .Listing "Subscribed"))) }} popular in: Everywhere - diff --git a/templates/root.html b/templates/root.html index f111a90..749b411 100644 --- a/templates/root.html +++ b/templates/root.html @@ -12,7 +12,7 @@
diff --git a/templates/sidebar.html b/templates/sidebar.html index 41279c2..449fcf8 100644 --- a/templates/sidebar.html +++ b/templates/sidebar.html @@ -1,7 +1,7 @@ {{ $host := .Host }}
-{{ if eq .Query "" }} +{{ if not .SearchType }} {{ if .User }}