diff options
| author | unwox <me@unwox.com> | 2024-10-31 14:08:07 +0600 |
|---|---|---|
| committer | unwox <me@unwox.com> | 2024-10-31 14:08:07 +0600 |
| commit | e3b39158d923cf0d7e67e5bc53d53346e5d0d383 (patch) | |
| tree | 371beca9723dae62f1ed505f3989926f30c056df /bin/serve.fnl | |
| parent | 47c844524b126e79e0679eda8c9501742c5374d3 (diff) | |
mark outgoing links with ?from=everytea.ru
Diffstat (limited to 'bin/serve.fnl')
| -rw-r--r-- | bin/serve.fnl | 7 |
1 files changed, 4 insertions, 3 deletions
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 (.. "<h2>" (unescape product.title) "</h2>")]] [:div {:class "price"} (if product.price (.. product.price "₽") "") |
