diff options
| author | unwox <me@unwox.com> | 2025-09-09 13:32:16 +0600 |
|---|---|---|
| committer | unwox <me@unwox.com> | 2025-09-09 16:43:04 +0600 |
| commit | 49715f6df79b677481e4cb244a1ca835ee06028f (patch) | |
| tree | 20c60d4ce6fc89146b9a5892c51915ee53520f01 /pages/shop | |
| parent | b809cfaec9f369b8ef1e7762476b7e4216815d3d (diff) | |
small improvements
Diffstat (limited to 'pages/shop')
| -rw-r--r-- | pages/shop/_product/index.fnl | 21 | ||||
| -rw-r--r-- | pages/shop/index.fnl | 2 |
2 files changed, 12 insertions, 11 deletions
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;" |
