Mercurial > hg > decoupage
annotate decoupage/templates/inclusion.html @ 88:c382bdd01751
directory indicator
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 12 Jan 2014 19:20:16 -0800 |
parents | 5d34e9d14666 |
children |
rev | line source |
---|---|
65 | 1 <!DOCTYPE html |
2 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
4 <html xmlns="http://www.w3.org/1999/xhtml" | |
5 xmlns:py="http://genshi.edgewall.org/" | |
6 xmlns:xi="http://www.w3.org/2001/XInclude"> | |
7 <!-- include files as snippets --> | |
8 <head> | |
9 <xi:include href="head.html"/> | |
10 </head> | |
11 <body> | |
12 <xi:include py:if="include" href="${include}"/> | |
13 <h1 py:if="title">${title}</h1> | |
14 | |
66
5d34e9d14666
improvements to the inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
65
diff
changeset
|
15 <ul py:if="[i for i in files if i['type'] == 'directory']"> |
5d34e9d14666
improvements to the inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
65
diff
changeset
|
16 <li py:for="f in [d for d in files if d['type'] == 'directory']"> |
5d34e9d14666
improvements to the inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
65
diff
changeset
|
17 <a href="${f['path']}"> |
5d34e9d14666
improvements to the inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
65
diff
changeset
|
18 ${f.get('title', f['description']) or f['name']}</a><span py:if="'title' in f and f['description']">: ${f['description']}</span> |
5d34e9d14666
improvements to the inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
65
diff
changeset
|
19 <py:if test="'links' in f"> |
5d34e9d14666
improvements to the inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
65
diff
changeset
|
20 <span py:for="link in f['links']" class="link"> |
5d34e9d14666
improvements to the inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
65
diff
changeset
|
21 <a href="${link['link']}">${link['text']}</a> |
5d34e9d14666
improvements to the inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
65
diff
changeset
|
22 </span> |
5d34e9d14666
improvements to the inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
65
diff
changeset
|
23 </py:if> |
5d34e9d14666
improvements to the inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
65
diff
changeset
|
24 </li> |
5d34e9d14666
improvements to the inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
65
diff
changeset
|
25 </ul> |
5d34e9d14666
improvements to the inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
65
diff
changeset
|
26 |
65 | 27 <py:for each="index, f in enumerate([i for i in files if i['type'] == 'file'])"> |
28 <!-- separate with an hr --> | |
29 <hr py:if="index"/> | |
30 <a name="${f['name']}"></a> | |
66
5d34e9d14666
improvements to the inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
65
diff
changeset
|
31 <div class="inclusion">${file(filepath(f['name'])).read()}</div> |
5d34e9d14666
improvements to the inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
65
diff
changeset
|
32 <a href="${f['name']}">#</a> |
65 | 33 </py:for> |
34 </body> | |
35 </html> | |
36 |