summaryrefslogtreecommitdiff
path: root/GroLUG/root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'GroLUG/root/lib')
-rw-r--r--GroLUG/root/lib/config/col21
-rw-r--r--GroLUG/root/lib/config/main27
-rw-r--r--GroLUG/root/lib/config/url8
-rw-r--r--GroLUG/root/lib/site/footer3
-rw-r--r--GroLUG/root/lib/site/header3
-rw-r--r--GroLUG/root/lib/site/html12
-rw-r--r--GroLUG/root/lib/site/layout7
-rw-r--r--GroLUG/root/lib/site/wrapper8
8 files changed, 89 insertions, 0 deletions
diff --git a/GroLUG/root/lib/config/col b/GroLUG/root/lib/config/col
new file mode 100644
index 0000000..811f0af
--- /dev/null
+++ b/GroLUG/root/lib/config/col
@@ -0,0 +1,21 @@
+[% site.rgb = {
+ black = '#000000'
+ white = '#ffffff'
+ grey1 = '#46494c'
+ grey2 = '#c6c9cc'
+ grey3 = '#e3e6ea'
+ red = '#CC4444'
+ green = '#66AA66'
+ blue = '#89b8df'
+ orange = '#f08900'
+ };
+
+ site.col = {
+ page = site.rgb.white
+ text = site.rgb.grey1
+ head = site.rgb.grey3
+ line = site.rgb.orange
+ message = site.rgb.green
+ error = site.rgb.red
+ };
+%]
diff --git a/GroLUG/root/lib/config/main b/GroLUG/root/lib/config/main
new file mode 100644
index 0000000..89de4ae
--- /dev/null
+++ b/GroLUG/root/lib/config/main
@@ -0,0 +1,27 @@
+[% # config/main
+ #
+ # This is the main configuration template which is processed before
+ # any other page, by virtue of it being defined as a PRE_PROCESS
+ # template. This is the place to define any extra template variables,
+ # macros, load plugins, and perform any other template setup.
+
+ IF Catalyst.debug;
+ # define a debug() macro directed to Catalyst's log
+ MACRO debug(message) CALL Catalyst.log.debug(message);
+ END;
+
+ # define a data structure to hold sitewide data
+ site = {
+ title => 'Catalyst::View::TTSite Example Page',
+ copyright => '2006 Your Name Here',
+ };
+
+ # load up any other configuration items
+ PROCESS config/col
+ + config/url;
+
+ # set defaults for variables, etc.
+ DEFAULT
+ message = 'There is no message';
+
+-%]
diff --git a/GroLUG/root/lib/config/url b/GroLUG/root/lib/config/url
new file mode 100644
index 0000000..f6c036f
--- /dev/null
+++ b/GroLUG/root/lib/config/url
@@ -0,0 +1,8 @@
+[% base = Catalyst.req.base;
+
+ site.url = {
+ base = base
+ home = "${base}welcome"
+ message = "${base}message"
+ }
+-%]
diff --git a/GroLUG/root/lib/site/footer b/GroLUG/root/lib/site/footer
new file mode 100644
index 0000000..d16739b
--- /dev/null
+++ b/GroLUG/root/lib/site/footer
@@ -0,0 +1,3 @@
+<!-- BEGIN site/footer -->
+<div id="copyright">&copy; [% site.copyright %]</div>
+<!-- END site/footer -->
diff --git a/GroLUG/root/lib/site/header b/GroLUG/root/lib/site/header
new file mode 100644
index 0000000..35159db
--- /dev/null
+++ b/GroLUG/root/lib/site/header
@@ -0,0 +1,3 @@
+<!-- BEGIN site/header -->
+<h1 class="title">[% template.title or site.title %]</h1>
+<!-- END site/header -->
diff --git a/GroLUG/root/lib/site/html b/GroLUG/root/lib/site/html
new file mode 100644
index 0000000..0bf8c27
--- /dev/null
+++ b/GroLUG/root/lib/site/html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <title>[% template.title or site.title %]</title>
+ <style type="text/css">
+[% PROCESS ttsite.css %]
+ </style>
+ </head>
+ <body>
+[% content %]
+ </body>
+</html>
diff --git a/GroLUG/root/lib/site/layout b/GroLUG/root/lib/site/layout
new file mode 100644
index 0000000..6024fe3
--- /dev/null
+++ b/GroLUG/root/lib/site/layout
@@ -0,0 +1,7 @@
+<div id="header">[% PROCESS site/header %]</div>
+
+<div id="content">
+[% content %]
+</div>
+
+<div id="footer">[% PROCESS site/footer %]</div>
diff --git a/GroLUG/root/lib/site/wrapper b/GroLUG/root/lib/site/wrapper
new file mode 100644
index 0000000..3e55955
--- /dev/null
+++ b/GroLUG/root/lib/site/wrapper
@@ -0,0 +1,8 @@
+[% 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 site/html + site/layout;
+ END;
+-%]