Skip to content

stephannv/blueprint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7b3d1e8 · Feb 7, 2025
Sep 8, 2024
Jan 23, 2025
Feb 7, 2025
Feb 7, 2025
Mar 28, 2023
Mar 17, 2023
Mar 17, 2023
Jan 25, 2025
Mar 17, 2023
Jan 25, 2025
Jan 25, 2025

Repository files navigation

Blueprint logo

A lib for writing reusable and testable views templates (HTML, SVG, Forms) in plain Crystal.

Tests Weekly CI Zero dependencies


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>

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