diff options
author | Nathan Lasseter <Nathan Lasseter nathan@bytemark.co.uk> | 2015-01-21 18:57:31 +0000 |
---|---|---|
committer | Nathan Lasseter <Nathan Lasseter nathan@bytemark.co.uk> | 2015-01-21 18:57:31 +0000 |
commit | e1d758ddf72d7d8cd29bb0170abcf1397bd67f71 (patch) | |
tree | a0192b4dca3ebfdfb343fac5f4e969a5ffec7c2b /example.html.rb | |
parent | fd7ac7c1e6d143d74254c478d6a734da54e83b24 (diff) |
Added support for scoped tags
Diffstat (limited to 'example.html.rb')
-rw-r--r-- | example.html.rb | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/example.html.rb b/example.html.rb index ec1cd29..553ef0e 100644 --- a/example.html.rb +++ b/example.html.rb @@ -1,26 +1,33 @@ require './lib/virgil' -include Virgil +include Virgil::Tags -puts Tag.doctype { +puts doctype { "html" } -puts Tag.html { - Tag.head { - Tag.title { +puts comment { + "this is neat" +} + +puts html { + head { + title { "My Virgil site" } } + - Tag.body { - Tag.h1 { + body { + h1 { "My Virgil site" } + - Tag.p({:class => "italic"}) { + p({:class => "italic"}) { "some content" } + - Tag.img({:src => "img.jpg"}) + - Tag.a({"href" => "/"}) { + img({:src => "img.jpg"}) + + a({"href" => "/"}) { "A link home" + } + + map { + area {} } } } |