[chore] add lines
This commit is contained in:
parent
d7bf2c3261
commit
19f75c8147
1 changed files with 5 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
(:require [reitit.frontend.easy :as rfe]
|
(:require [reitit.frontend.easy :as rfe]
|
||||||
[re-frame.core :refer [subscribe]]))
|
[re-frame.core :refer [subscribe]]))
|
||||||
|
|
||||||
|
|
||||||
(defn button
|
(defn button
|
||||||
[id]
|
[id]
|
||||||
[:div
|
[:div
|
||||||
|
@ -21,12 +22,14 @@
|
||||||
(button 24425284)
|
(button 24425284)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
(defn about-page []
|
(defn about-page []
|
||||||
[:div
|
[:div
|
||||||
[:h2 "About"]
|
[:h2 "About"]
|
||||||
[:ul
|
[:ul
|
||||||
[:li [:a {:href "stub"} "Source code"]]]])
|
[:li [:a {:href "stub"} "Source code"]]]])
|
||||||
|
|
||||||
|
|
||||||
(defn item-page []
|
(defn item-page []
|
||||||
(let [loading @(subscribe [:loading])
|
(let [loading @(subscribe [:loading])
|
||||||
post @(subscribe [:post])]
|
post @(subscribe [:post])]
|
||||||
|
@ -39,6 +42,7 @@
|
||||||
{:dangerouslySetInnerHTML
|
{:dangerouslySetInnerHTML
|
||||||
{:__html (:content post)}}]])))
|
{:__html (:content post)}}]])))
|
||||||
|
|
||||||
|
|
||||||
(defn nav [{:keys [current-route]}]
|
(defn nav [{:keys [current-route]}]
|
||||||
(let [active #(when (= % (-> current-route :data :name)) "> ")]
|
(let [active #(when (= % (-> current-route :data :name)) "> ")]
|
||||||
[:ul {:class "nav flex flex-col overflow-hidden"}
|
[:ul {:class "nav flex flex-col overflow-hidden"}
|
||||||
|
@ -47,6 +51,7 @@
|
||||||
[:li
|
[:li
|
||||||
[:a {:href (rfe/href :about)} (active :about) "About"]]]))
|
[:a {:href (rfe/href :about)} (active :about) "About"]]]))
|
||||||
|
|
||||||
|
|
||||||
(defn current-page []
|
(defn current-page []
|
||||||
(let [current-route @(subscribe [:current-route])]
|
(let [current-route @(subscribe [:current-route])]
|
||||||
[:div {:class "container p-2 mx-auto"}
|
[:div {:class "container p-2 mx-auto"}
|
||||||
|
|
Loading…
Reference in a new issue