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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
65
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
1 <!DOCTYPE html
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
2 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
4 <html xmlns="http://www.w3.org/1999/xhtml"
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
5 xmlns:py="http://genshi.edgewall.org/"
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
6 xmlns:xi="http://www.w3.org/2001/XInclude">
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
7 <!-- include files as snippets -->
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
8 <head>
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
9 <xi:include href="head.html"/>
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
10 </head>
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
11 <body>
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
12 <xi:include py:if="include" href="${include}"/>
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
13 <h1 py:if="title">${title}</h1>
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
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
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
27 <py:for each="index, f in enumerate([i for i in files if i['type'] == 'file'])">
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
28 <!-- separate with an hr -->
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
29 <hr py:if="index"/>
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
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
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
33 </py:for>
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
34 </body>
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
35 </html>
ac1dc088e37e add inclusion template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
36