Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stephannv/blueprint
Write HTML in plain Crystal
https://github.com/stephannv/blueprint
crystal dsl hacktoberfest html oop
Last synced: 9 days ago
JSON representation
Write HTML in plain Crystal
- Host: GitHub
- URL: https://github.com/stephannv/blueprint
- Owner: stephannv
- License: mit
- Created: 2023-03-17T23:47:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-04T23:59:41.000Z (about 1 year ago)
- Last Synced: 2024-05-19T05:31:56.152Z (6 months ago)
- Topics: crystal, dsl, hacktoberfest, html, oop
- Language: Crystal
- Homepage: https://stephannv.github.io/blueprint-docs/
- Size: 79.1 KB
- Stars: 38
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
A lib for writing reusable and testable views templates (HTML, SVG, Forms) in plain Crystal.------
Example:
```crystal
class Alert
include Blueprint::HTMLprivate def blueprint
div class: "alert alert-success" do
h4(class: "alert-heading") { "Well done!" }
p { "Hello Word" }
end
end
endAlert.new.to_s
```Output:
```html
Well done!
Hello World
```## Documentation
For full documentation, visit .
## Contributing
1. Fork it ()
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