summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJames Vasile <james@hackervisions.org>2011-02-22 13:32:45 -0500
committerJames Vasile <james@hackervisions.org>2011-02-22 13:32:45 -0500
commit35071d7212cec1fc23e8204bfd392a116a5313ed (patch)
tree1c75a525227769fc94f303b5c0233882d90ef2a8 /templates
...
Diffstat (limited to 'templates')
-rw-r--r--templates/Makefile15
-rw-r--r--templates/__init__.py0
-rw-r--r--templates/__init__.pycbin0 -> 132 bytes
-rw-r--r--templates/base.tmpl112
-rw-r--r--templates/err.tmpl23
-rw-r--r--templates/two_col.tmpl5
6 files changed, 155 insertions, 0 deletions
diff --git a/templates/Makefile b/templates/Makefile
new file mode 100644
index 0000000..d2d8ed2
--- /dev/null
+++ b/templates/Makefile
@@ -0,0 +1,15 @@
+CHEETAH=cheetah
+TEMPLATES=$(wildcard *.tmpl)
+TEMPLATE_PYFILES := $(patsubst %.tmpl,%.py,$(TEMPLATES))
+
+## Catch-all tagets
+default: $(TEMPLATE_PYFILES)
+
+%.py: %.tmpl
+ $(CHEETAH) c $<
+templates: $(TEMPLATE_PYFILES)
+template: templates
+
+clean:
+ rm -rf .\#* \#* *.pyz *.bak
+ @rm -f $(TEMPLATE_PYFILES)
diff --git a/templates/__init__.py b/templates/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/templates/__init__.py
diff --git a/templates/__init__.pyc b/templates/__init__.pyc
new file mode 100644
index 0000000..2b2bef4
--- /dev/null
+++ b/templates/__init__.pyc
Binary files differ
diff --git a/templates/base.tmpl b/templates/base.tmpl
new file mode 100644
index 0000000..eecea31
--- /dev/null
+++ b/templates/base.tmpl
@@ -0,0 +1,112 @@
+#def default($text, $default)
+#if $text
+ $text
+#else
+ $default
+#end if
+#end def
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB">
+<head>
+ <title>$default($title, "Plinth Front End to the Freedom Box")
+ </title>
+ <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
+ <meta name="description" content="Plint admin frontend for Freedom Box" />
+ <meta name="robots" content="noindex, nofollow" />
+ <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
+ <link rel="stylesheet" type="text/css" href="/static/theme/style.tiny.css" media="screen" />
+ $css
+ <script type="text/javascript" src="/static/theme/menu.js"></script>
+ <script type="text/javascript" src="/static/theme/plinth.js"></script>
+ $js
+ $main_menu_js
+ $sub_menu_js
+ <script LANGUAGE="JavaScript">
+ <!--
+ $onload
+ // -->
+ </script>
+</head>
+<body onLoad="javascript:onload_handler();">
+ <div id="header">
+ <div id="headerleft">
+ <a href="/"><img src="/static/theme/freedombox.png" /></a>
+ </div>
+ <div id="headerright">
+ <br /><br /><br />
+ <h1><a href="/">Freedom Box</a></h1>
+ <h2><a href="/">Plinth Administration Control Panel</a></h2>
+ <SCRIPT LANGUAGE="JavaScript">
+ <!--
+ main_menu(main_menu_items);
+ // -->
+ </SCRIPT>
+ </div>
+ #if $username
+ <p id="layoutdims">Logged in as $username. <a href="/auth/logout" title="Log out">Logout.</a></p>
+ #else
+ <p id="layoutdims">Not logged in. <a href="/auth/login" title="Log in">Log in.</a></p>
+ #end if
+
+ </div>
+<div class="colmask threecol">
+ <div class="colmid">
+ <div class="colleft">
+ <div class="col1">
+ <!-- Column 1 start -->
+ <h2>
+ #block title_block
+ $title
+ #end block title_block
+ </h2>
+ #block main_block
+ $main
+ #end block main_block
+ <!-- Column 1 end -->
+ </div>
+ <div class="col2">
+ <!-- Column 2 start -->
+ #block nav_block
+ $nav
+ #end block nav_block
+ #block sidebar_left_block
+ $sidebar_left
+ #end block sidebar_left_block
+ <!-- Column 2 end -->
+ </div>
+ <div class="col3">
+ <!-- Column 3 start -->
+ <div id="ads">
+ <!--<a href="http://matthewjamestaylor.com">
+ <img src="mjt-125x125.gif" width="125" border="0" height="125" alt="Art and Design by Matthew James Taylor" />
+ </a>
+ -->
+ </div>
+ #block sidebar_right_block
+ $sidebar_right
+ #end block sidebar_right_block
+ <!-- Column 3 end -->
+ </div>
+ </div>
+ </div>
+</div>
+<div id="footer">
+ #block footer_block
+ <p>
+ Plinth is copyright 2011 <a href="http://hackervisions.org">James Vasile</a>. It is
+ free software offered to you under the terms of
+ the <a href="http://www.gnu.org/licenses/agpl.html">GNU Affero General Public
+ License</a>, Version 3 or later.
+ </p>
+ <!--<p>Current page: $current_url</p>-->
+ <p>
+ This page uses
+ the <a href="http://matthewjamestaylor.com/blog/perfect-3-column.htm">Perfect
+ 'Holy Grail' 3 Column Liquid Layout</a>
+ by <a href="http://matthewjamestaylor.com">Matthew James Taylor</a>.
+ </p>
+ #end block footer_block
+</div>
+
+</body>
+</html>
diff --git a/templates/err.tmpl b/templates/err.tmpl
new file mode 100644
index 0000000..1d3f6e1
--- /dev/null
+++ b/templates/err.tmpl
@@ -0,0 +1,23 @@
+#extends templates.two_col
+
+#def title_block
+<span class="err">Error: $title</span>
+<br />
+<br />
+#end def
+
+#def sidebar_left_block
+$sidebar_left
+#end def
+
+#def main_block
+$main
+#end def
+
+#def sidebar_right_block
+$sidebar_right
+#end def
+
+#def nav_block
+$nav
+#end def
diff --git a/templates/two_col.tmpl b/templates/two_col.tmpl
new file mode 100644
index 0000000..0b559ad
--- /dev/null
+++ b/templates/two_col.tmpl
@@ -0,0 +1,5 @@
+#extends templates.base
+
+#def css
+<link rel="stylesheet" type="text/css" href="/static/theme/2col.tiny.css" media="screen" />
+#end def