From 8e9f1309ce51c59c945d2ee9ae6bddf15f29f291 Mon Sep 17 00:00:00 2001 From: Kirill Fedoseev Date: Sun, 24 Oct 2021 11:56:34 +0300 Subject: [PATCH 1/2] Remove redundant banners and links --- handlers/api.go | 2 +- handlers/pageData.go | 2 +- templates/index/index.html | 2 +- templates/layout.html | 6 +++++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/handlers/api.go b/handlers/api.go index 57a77822b9..030c83977b 100644 --- a/handlers/api.go +++ b/handlers/api.go @@ -1136,7 +1136,7 @@ func GetUserPremiumByPackage(pkg string) PremiumUser { MaxNodes: 1, WidgetSupport: false, NotificationThresholds: false, - NoAds: false, + NoAds: true, } if pkg == "" || pkg == "standard" { diff --git a/handlers/pageData.go b/handlers/pageData.go index 206bf308d4..b8ed305b3f 100644 --- a/handlers/pageData.go +++ b/handlers/pageData.go @@ -67,7 +67,7 @@ func InitPageData(w http.ResponseWriter, r *http.Request, active, path, title st Lang: "en-US", DefaultCurrency: utils.Config.Frontend.Eth1Currency, DefaultCurrencyName: utils.Config.Frontend.Eth1CurrencyName, - NoAds: user.Authenticated && user.Subscription != "", + NoAds: true, Eth1Label: utils.Config.Frontend.Eth1Label, Eth2Label: utils.Config.Frontend.Eth2Label, } diff --git a/templates/index/index.html b/templates/index/index.html index 1a79cab993..802f1fe384 100644 --- a/templates/index/index.html +++ b/templates/index/index.html @@ -364,7 +364,7 @@ {{if and (and (not .ShowSyncingMessage) .Genesis) (not .GenesisPeriod)}} {{ template "participationWarning" .}} {{end}} - {{ template "hero" . }} + {{if not $.NoAds}} {{ template "hero" . }} {{end}} {{end}} {{if not .NoAds}} {{template "banner"}} {{end}} {{with .Data}} diff --git a/templates/layout.html b/templates/layout.html index d16fb4db35..55d7bb7590 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -446,10 +446,12 @@ Block Viz + {{if not .NoAds}} Nodes + {{end}}