aboutsummaryrefslogtreecommitdiffstats
path: root/root/template
diff options
context:
space:
mode:
authorBuchan Milne <buchan@mageia.org>2010-11-02 20:29:21 +0000
committerBuchan Milne <buchan@mageia.org>2010-11-02 20:29:21 +0000
commit7fa312026a6caba28550339fc29edfd790e78fda (patch)
treec054f6b854a3c6f6cba566b02b3fdd95b91a124c /root/template
parent11665d7a97e320fb38fd076da3ad7c62f36a1362 (diff)
downloadidentity-7fa312026a6caba28550339fc29edfd790e78fda.tar
identity-7fa312026a6caba28550339fc29edfd790e78fda.tar.gz
identity-7fa312026a6caba28550339fc29edfd790e78fda.tar.bz2
identity-7fa312026a6caba28550339fc29edfd790e78fda.tar.xz
identity-7fa312026a6caba28550339fc29edfd790e78fda.zip
Add some CSS themeing, and refactor some template stuff using preprocess
Add missing tempaltes
Diffstat (limited to 'root/template')
-rw-r--r--root/template/footer3
-rw-r--r--root/template/header16
-rw-r--r--root/template/html13
-rw-r--r--root/template/layout40
-rw-r--r--root/template/pre3
-rw-r--r--root/template/wrapper11
6 files changed, 86 insertions, 0 deletions
diff --git a/root/template/footer b/root/template/footer
new file mode 100644
index 0000000..78203d5
--- /dev/null
+++ b/root/template/footer
@@ -0,0 +1,3 @@
+<!-- BEGIN site/footer -->
+<!-- div id="copyright">&copy; [% c.config.organisation %] 2010</div -->
+<!-- END site/footer -->
diff --git a/root/template/header b/root/template/header
new file mode 100644
index 0000000..11ca573
--- /dev/null
+++ b/root/template/header
@@ -0,0 +1,16 @@
+<!-- BEGIN template/header -->
+<div class="masthead">
+<h1>[% c.config.apptitle %]</h1>
+</div>
+<div class="hnav">
+<!--div class="hnav" -->
+<ul class="hnav">
+[% FOREACH page IN pages %]
+<li><a href="[% c.uri_for(page.page) %]">[% page.title %]</a></li>
+[% END %]
+[% IF c.user.username %]
+<li>[ <a href="[% c.uri_for("/user") %]">[% c.user.username %]</a> ]<a href="/user/logout">Log out</a></li>
+[% END %]
+</ul>
+</div>
+<!-- END template/header -->
diff --git a/root/template/html b/root/template/html
new file mode 100644
index 0000000..c23fcfb
--- /dev/null
+++ b/root/template/html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <title>[% template.title or site.title %]</title>
+ <link rel="Stylesheet" href="/ttsite.css">
+ <!-- style type="text/css" -->
+ <!--% PROCESS ttsite.css %-->
+ <!-- /style -->
+ </head>
+ <body>
+[% content %]
+ </body>
+</html>
diff --git a/root/template/layout b/root/template/layout
new file mode 100644
index 0000000..8a6b601
--- /dev/null
+++ b/root/template/layout
@@ -0,0 +1,40 @@
+<!-- BEGIN template/header -->
+<div id="header">[% PROCESS template/header %]</div>
+<!-- END template/header -->
+
+<div id="outerColumnContainer">
+ <div id="leftColumn">
+ <div class="inside">
+ <div class="vnav">
+ <ul>
+ [% FOREACH subpage IN subpages %]
+ <li><a href="[% c.uri_for(subpage.page) %]">[% subpage.title %]</a></li>
+ [% END %]
+ </ul>
+ </div>
+ </div>
+ </div>
+
+ <div id="innerColumnContainer">
+ <!-- div id="SOWrap" -->
+ <div id="middleColumn">
+ <div class="inside">
+ [% IF errros %]
+ <span class="error">
+ [% FOREACH error IN errors %]
+ [% error %]<br/>
+ [% END %]
+ </span>
+ [% END %]
+ <div id="content">
+ [% content %]
+ </div>
+ </div>
+ <div class="clear"></div>
+ </div>
+ <div class="clear"></div>
+ </div>
+ <!-- /div -->
+ </div>
+</div>
+<!-- div id="footer">[% PROCESS template/footer %]</div -->
diff --git a/root/template/pre b/root/template/pre
new file mode 100644
index 0000000..581baf7
--- /dev/null
+++ b/root/template/pre
@@ -0,0 +1,3 @@
+[% MACRO l(text, args) BLOCK;
+ c.localize(text, args);
+END; %]
diff --git a/root/template/wrapper b/root/template/wrapper
new file mode 100644
index 0000000..8bfee46
--- /dev/null
+++ b/root/template/wrapper
@@ -0,0 +1,11 @@
+[% MACRO l(text, args) BLOCK;
+ c.localize(text, args);
+END; %]
+[% IF template.name.match('\.(css|js|txt)');
+ debug("Passing page through as text: $template.name");
+ content;
+ ELSE;
+ debug("Applying HTML page layout wrappers to $template.name\n");
+ content WRAPPER template/html + template/layout;
+ END;
+-%]