blueprint

Write reusable and testable HTML templates in plain Crystal dsl html oop hacktoberfest
0.6.0 released

Blueprint logo

A framework for writing reusable and testable HTML templates in plain Crystal.

Tests Weekly CI


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_html

Output:

<div class="alert alert-success">
  <h4 class="alert-heading">Well done!</h4>
  <p>Hello World</p>
</div>

Documentation

For full documentation, visit https://stephannv.github.io/blueprint-docs/.

Contributing

  1. Fork it (https://github.com/stephannv/blueprint/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request
blueprint:
  github: gunbolt/blueprint
  version: ~> 0.6.0
License MIT
Crystal ~> 1.9

Dependencies 0

Development Dependencies 1

  • ameba 1.6.1
    {'github' => 'crystal-ameba/ameba', 'version' => '1.6.1'}

Dependents 0

Last synced .
search fire star recently