File: index.amx

package info (click to toggle)
ruby-amrita 1.0.2-10
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 1,940 kB
  • sloc: ruby: 9,159; xml: 978; makefile: 78
file content (35 lines) | stat: -rw-r--r-- 845 bytes parent folder | download | duplicates (4)
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
27
28
29
30
31
32
33
34
35
<amx require ="amritadoc" class="AmritaDocumentTemplate">

  <template> 
    <html>
      <head>
        <title id="header_title" />
      </head>
      <body>
        <span id="navigations" />
        <hr />
        <div id="sections">
          <h1 id="title" />
          <span id="paragraphs" />
          <div id="sections">
             <h2 id="title" />
             <span id="paragraphs" />
             <div id="sections">
               <h3 id="title" />
               <span id="paragraphs" />
             </div>
             <hr />
          </div>
        </div>
      </body>
    </html>
  </template>

  <method id="navigations">
    <method_body>
       doc_root.elements.to_a('head/navigation/link').collect do |x|
         e(:a, :href=>x.attributes['url']) { x.get_text } + "/"
       end
    </method_body>
  </method>
</amx>