summaryrefslogtreecommitdiff
path: root/example.html.rb
blob: db487993a235a5a58922338395213c53ba277864 (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"
    }
  }
}