From e3b39158d923cf0d7e67e5bc53d53346e5d0d383 Mon Sep 17 00:00:00 2001 From: unwox Date: Thu, 31 Oct 2024 14:08:07 +0600 Subject: mark outgoing links with ?from=everytea.ru --- bin/serve.fnl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/serve.fnl b/bin/serve.fnl index 82759b8..27cfae5 100644 --- a/bin/serve.fnl +++ b/bin/serve.fnl @@ -238,17 +238,18 @@ (fn site-name-template [name] (local module (require (.. "parser." name))) - [:a {:class "site-icon" :href module.url} + [:a {:class "site-icon" :href (.. module.url "?from=everytea.ru")} [:img {:src (.. "/static/" name ".png") :alt (.. "Логотип " module.title)}] module.title]) (fn item-template [product] + (local link (.. product.url "?from=everytea.ru")) [:div {:class "tile"} - [:a {:href product.url :class "img-link" :rel "nofollow"} + [:a {:href link :class "img-link" :rel "nofollow"} [:img {:class "img" :src product.image :title product.title :alt product.title} ""]] (site-name-template product.site) - [:a {:href product.url :style "text-decoration: none;" :rel "nofollow"} + [:a {:href link :style "text-decoration: none;" :rel "nofollow"} [:NO-ESCAPE (.. "

" (unescape product.title) "

")]] [:div {:class "price"} (if product.price (.. product.price "₽") "") -- cgit v1.2.3