app/demo/index.pom
require_relative 'helpers/indented_grid'
Voom::Presenters.define(:index) do
helpers Demo::Helpers::IndentedGrid
attach :top_nav
indented_grid do
headline 'COmmon PResenter Language (COPRL) Ruby Demo - AKA Presenters', id: :headline
subheading 'COPRL is to HTML what C is to assembly'
body ['A presenter describes a user interface using DSL.',
'The presenter is evaluated and a presenter object model (POM) is generated. The POM can be serialized as JSON.',
'A client that renders POM can display the given user interface.']
body 'To get started checkout the components and events.'
subheading 'For example this is the complete presenter DSL for this page:', level: 2
source = File.read(__FILE__)
body <<~HEREDOC
```
#{source}
```
HEREDOC
end
end