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
212 Stars 28 Forks 42 Commits 6 Opened issues

Description

A ClojureScript implementation of Hiccup

Services available

!
?

Need anything else?

Contributors list

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.