diff options
Diffstat (limited to 'pages/shop/_product/index.fnl')
| -rw-r--r-- | pages/shop/_product/index.fnl | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/pages/shop/_product/index.fnl b/pages/shop/_product/index.fnl index 722c952..2904b61 100644 --- a/pages/shop/_product/index.fnl +++ b/pages/shop/_product/index.fnl @@ -1,4 +1,4 @@ -(import-macros {:compile-html <>} :macros) +(import-macros {:compile-html HTML} :macros) (local templates (require :templates)) (local dicts (require :dicts)) (local lib (require :lib)) @@ -41,25 +41,25 @@ (for [i 1 5] (table.insert images (. product (.. "image" i)))) - [(<> + [(HTML [:div {:class "side"} (templates.header "/shop" authenticated?)]) - (<> + (HTML [:div {:class "content"} [:div {:class "mb-1"} [:a {:href "/shop"} "⟵ Обратно к списку"]] (let [link (.. "/static/files/" product.image1)] - (<> [:a {:href link :target "_blank"} - [:img {:class "product-page-img-mobile mb-1-5" - :src (.. link "-thumbnail.jpg")}]])) + (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"} (if authenticated? - (<> [:div {:class "mb-0-5"} - [:a {:href (.. "/shop/" product.name "/edit")} - "✎ Редактировать"]]) + (HTML [:div {:class "mb-0-5"} + [:a {:href (.. "/shop/" product.name "/edit")} + "✎ Редактировать"]]) "") [:div {:class "mb-0-5" :style "font-style: italic;"} (or (dicts.label dicts.tea-type product.type) product.type) ", " @@ -71,8 +71,8 @@ (table.concat (icollect [idx image (ipairs images)] (let [link (.. "/static/files/" image)] - (<> [:a {:href link :target "_blank"} - [:img {:class "product-page-img" :src (.. link "-thumbnail.jpg")}]]))))]]])]) + (HTML [:a {:href link :target "_blank"} + [:img {:class "product-page-img" :src (.. link "-thumbnail.jpg")}]]))))]]])]) (fn render [request db authenticated?] (let [product (find-product db request.params._product)] |
