amethyst-framework / amethyst

Amethyst is a Rails inspired web-framework for Crystal language
https://github.com/amethyst-framework
MIT License
648 stars 46 forks source link

add simple layout support #47

Closed drujensen closed 8 years ago

drujensen commented 8 years ago

added a layout macro and render_with_layout macro. In order to pass the view to the layout, I added a @view instance variable that holds the rendered view and then placed that rendered view in the layout ECR by spitting out the @view instance variable.

I couldn't figure out how to use <%= yield %> inside the ECR and pass a block of the view to be rendered. That would be great to solve.