[hugo/refactor] use hiccup.page ns
This commit is contained in:
parent
640ae3546d
commit
075436487e
1 changed files with 20 additions and 21 deletions
|
@ -1,6 +1,6 @@
|
||||||
(ns backend.hugo.site
|
(ns backend.hugo.site
|
||||||
(:require [backend.handlers :as handlers]
|
(:require [backend.handlers :as handlers]
|
||||||
[hiccup2.core :as hiccup]))
|
[hiccup.page :as page]))
|
||||||
|
|
||||||
|
|
||||||
(defn build-hu-post
|
(defn build-hu-post
|
||||||
|
@ -8,13 +8,12 @@
|
||||||
(let [content (handlers/fetch-hu-post request {:hugo true})]
|
(let [content (handlers/fetch-hu-post request {:hugo true})]
|
||||||
{:status 200
|
{:status 200
|
||||||
:headers {"Content-Type" "text/html; charset=utf-8"}
|
:headers {"Content-Type" "text/html; charset=utf-8"}
|
||||||
:body (str
|
:body (page/html5 {:escape-strings? false}
|
||||||
(hiccup/html {:escape-strings? false}
|
|
||||||
[:html
|
[:html
|
||||||
[:head
|
[:head
|
||||||
[:meta {:name "viewport" :content "width=device-width, initial-scale=1.0"}]
|
[:meta {:name "viewport" :content "width=device-width, initial-scale=1.0"}]
|
||||||
[:meta {:name "referrer" :content "no-referrer"}]
|
[:meta {:name "referrer" :content "no-referrer"}]
|
||||||
[:link {:rel "stylesheet" :href "/css/app.css"}]]
|
(page/include-css "/css/app.css")]
|
||||||
[:body
|
[:body
|
||||||
[:div {:id "app"}
|
[:div {:id "app"}
|
||||||
[:div {:class "container p-2 mx-auto"}
|
[:div {:class "container p-2 mx-auto"}
|
||||||
|
@ -27,4 +26,4 @@
|
||||||
[:time (:time content)]
|
[:time (:time content)]
|
||||||
[:hr]
|
[:hr]
|
||||||
[:div
|
[:div
|
||||||
(:content content)]]]]]]]))}))
|
(:content content)]]]]]]])}))
|
||||||
|
|
Loading…
Reference in a new issue