From 49715f6df79b677481e4cb244a1ca835ee06028f Mon Sep 17 00:00:00 2001 From: unwox Date: Tue, 9 Sep 2025 13:32:16 +0600 Subject: small improvements --- pages/shop/_product/index.fnl | 21 +++++++++++---------- pages/shop/index.fnl | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) (limited to 'pages') diff --git a/pages/shop/_product/index.fnl b/pages/shop/_product/index.fnl index c10a7d8..c3c2968 100644 --- a/pages/shop/_product/index.fnl +++ b/pages/shop/_product/index.fnl @@ -49,19 +49,16 @@ [:div {:class "content"} [:div {:class "mb-1"} [:a {:href "/shop"} "⟵ Обратно к списку"]] - (let [link (.. "/static/files/" product.image1)] - (HTML [:a {:href link :target "_blank"} - [:img {:class "product-page-img-mobile mb-1-5" - :src (.. link "-thumbnail.jpg")}]])) [:div {:class "product-page-layout"} [:div {} - [:h2 {:class "product-page-title mb-1"} product.title] - [:section {:class "mb-2"} + [:h2 {:class "product-page-title"} + product.title (if authenticated? - (HTML [:div {:class "mb-0-5"} - [:a {:href (.. "/shop/" product.name "/edit")} - "✎ Редактировать"]]) - "") + (HTML [:a {:style "font-size: 1rem; margin-left: 0.75rem;" + :href (.. "/shop/" product.name "/edit")} + "% Редактировать"]) + "")] + [:section {:class "mb-2"} [:div {:class "mb-0-5" :style "font-style: italic;"} (or (dicts.label dicts.tea-type product.type) product.type) ", " (if (= product.packaging "piece") @@ -69,6 +66,10 @@ (HTML [:span {} [:strong {} (* 50 product.price-per) "₽ за 50 грамм "] "(" product.price-per "₽ за 1 грамм)"]))]] + (let [link (.. "/static/files/" product.image1)] + (HTML [:a {:href link :target "_blank"} + [:img {:class "product-page-img-mobile mb-2" + :src (.. link "-thumbnail.jpg")}]])) [:div {:class "mb-2"} "~~~"] [:NO-ESCAPE (text->html product.description)]] [:div {:class "product-page-imgs"} diff --git a/pages/shop/index.fnl b/pages/shop/index.fnl index 0e99bb9..08770d0 100644 --- a/pages/shop/index.fnl +++ b/pages/shop/index.fnl @@ -100,7 +100,7 @@ (HTML [:div {:class "content"} [:div {:class "mb-1"} [:a {:href "/"} "⟵ Обратно на главную"]] - [:h2 {:class "mb-1 product-page-title"} + [:h2 {:class "product-page-title mb-1"} "Магазин" (if authenticated? (HTML [:a {:style "font-size: 1rem; margin-left: 0.75rem;" -- cgit v1.2.3