File tree Expand file tree Collapse file tree 1 file changed +3
-21
lines changed Expand file tree Collapse file tree 1 file changed +3
-21
lines changed Original file line number Diff line number Diff line change 4444 [snippets-dir output-file]
4545 (spit output-file (parse-everything snippets-dir)))
4646
47- (defn render-snip
48- [{:keys [name key group filename]}]
49- (when name
50- [:ul
51- (filter some?
52- [[:li {:class " field" } " name: " name]
53- (when key [:li {:class " field" } " key: " key])
54- (when group [:li {:class " field" } " group: " group])
55- (when filename [:li {:class " field" } " filename: " filename])])]))
56-
57- (defn edn->hiccup
58- " Transform the data structure containing all the modes described
59- into an hiccup data structure"
60- [modes]
61- (for [[m snips] (sort-by first modes)]
62- (into [:div.mode (str " Mode: " m)]
63- (for [s snips]
64- (render-snip s)))))
65-
6647(def header [:name :key :group :filename ])
6748
6849(defn table
6950 [header rows]
70- [:table.table
51+ [:table.table.is-striped
7152 [:thead (into [:tr.tr ]
7253 (for [h header]
7354 [:td.td (name h)]))]
9273 :href " https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.4/css/bulma.css"
9374 :crossorigin " anonymous" }]]
9475 [:body
95- [:div m
76+ [:div.hero
77+ [:h2 m]
9678 (table header snips)]]])]
9779 (spit
9880 " hello.html"
You can’t perform that action at this time.
0 commit comments