Skip to content

Instantly share code, notes, and snippets.

@hcliff
Last active December 17, 2015 14:28
Show Gist options
  • Save hcliff/5624156 to your computer and use it in GitHub Desktop.
Save hcliff/5624156 to your computer and use it in GitHub Desktop.
Demo usage of dommy-crate
(ns app.ui.views
(:require [crate.form :as form])
(:use-macros [dommy.macros :only [deftemplate]]))
(defpartial share-modal [content]
[:form#create-form.modal-body.form-horizontal
[:div.control-group
(form/label {:class "control-label"} "link" "download link")
[:div.controls
(form/text-field {:class "input-xlarge"} "link" (content :url))]]])
=> <form class="modal-body form-horizontal" id="create-form">
<div class="control-group">
<label class="control-label" for="link">download link</label>
<div class="controls">
<input class="input-xlarge" name="link" type="text" id="link" value="http://google.com">
</div>
</div>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment