Fork me on GitHub
#devcards
<
2018-04-06
>
kingcode11:04:25

Is it possible to create a lexicon using devcards? I am thinking about something with a search box, which would pull material from a DB and build cards on the fly, one for each search result item:

(def db {"h1" {:hiccup [:h1 "This is an h1 tag example"]
                         :source '(....)
                         :tags ["html" "h"]}
                "div" {:hiccup [:div "div example"]
                          :tags ["html" "div"...}})
;; view
(doseq [[result-key {:keys [hiccup source tags]}] (@app-state :search-results)]
    (card result-key (sablono/html hiccup ...)))
The crux of it is that one or more cards would be created dynamically. Thanks for any comment