A lib for writing reusable and testable views templates (HTML, SVG, Forms) in plain Crystal.
Example:
class Alert
include Blueprint::HTML
private def blueprint
div class: "alert alert-success" do
h4(class: "alert-heading") { "Well done!" }
p { "Hello Word" }
end
end
end
Alert.new.to_s
Output:
<div class="alert alert-success">
<h4 class="alert-heading">Well done!</h4>
<p>Hello World</p>
</div>
For full documentation, visit https://stephannv.github.io/blueprint-docs/.
- Fork it (https://github.com/stephannv/blueprint/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request