Need help with crate?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

ibdknox
214 Stars 28 Forks 42 Commits 5 Opened issues

Description

A ClojureScript implementation of Hiccup

Services available

!
?

Need anything else?

Contributors list

# 13,493
Clojure
CSS
Clojure...
eve
20 commits
# 95,915
Clojure
Shell
rust-la...
identif...
8 commits
# 126,805
Clojure
Shell
Python
HTTP
6 commits
# 337,078
Clojure
JavaScr...
Clojure...
reagent
1 commit

crate

Crate is a ClojureScript implementation of the awesome Hiccup html templating library.

Usage

(ns myapp
 (:use-macros [crate.def-macros :only [defpartial]])
 (:require [crate.core :as crate]))

(crate/html [:p.woot {:id "blah"} "Hey!"]) =>

Hey!

(defpartial header [] [:header [:h1 "My app!"]])

(header) =>

My app!

Differences from Hiccup

  • The crate.core/html returns dom nodes instead of strings of html
  • You can use dom nodes in element bodies like this:
(crate/html [:div (crate/raw "foobar")])
=> 
foobar

License

Copyright (C) 2011 Chris Granger

Distributed under the Eclipse Public License, the same as Clojure.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.