summaryrefslogtreecommitdiff
path: root/example.html.rb
blob: fb5d8186062400011865c96d2d32b2fe66f47276 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require './lib/virgil'
include Virgil

puts Tag.doctype {
  "html"
}

puts Tag.html {
  Tag.head {
    Tag.title {
      "My Virgil site"
    }
  }
  Tag.body {
    Tag.h1 {
      "My Virgil site"
    }
    Tag.p ({:class => "italic"}) {
      "some content"
    }
    Tag.img ({:src => "img.jpg"})
    Tag.a ({"href" => "/"}) {
      "A link home"
    }
  }
}