Permalink
Browse files

Switch to using TT WRAPPER directive.

  • Loading branch information...
1 parent 9e2f1c4 commit 0601ed7d3d067494fda99df869f1aad7e3a2f7b2 davorg committed Oct 4, 2005
View
@@ -7,16 +7,7 @@ use File::Path;
use File::Spec::Functions qw(splitpath);
use Template;
-my $tt_normal = Template->new({
- POST_CHOMP => 1,
- PRE_CHOMP => 1,
- TRIM => 1,
- EVAL_PERL => 1 ,
- INCLUDE_PATH => ['.', 'lib', 'src'],
- PROCESS => 'layout',
-});
-
-my $tt_plain = Template->new({
+my $tt = Template->new({
POST_CHOMP => 1,
PRE_CHOMP => 1,
TRIM => 1,
@@ -46,8 +37,6 @@ print STDERR $file, "\n";
if ($file =~ /\.png$/) {
copy($file, $destfile);
} else {
- my $tt = $tt_normal;
- $tt = $tt_plain if ($file =~ /\.css$/);
$tt->process($file, $parms, $destfile) || die $tt->error;
}
}
View
@@ -1,39 +1,32 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-transitional.dtd">
-<!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -->
-[%- MACRO relative_url(url) PROCESS relative -%]
-[%- MACRO link_to(url, text) BLOCK -%]
-<a href="[% PROCESS relative %]">[% text %]</a>[% END %]
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-transitional.dtd">
+[% MACRO relative_url(url) PROCESS relative %]
+[% MACRO link_to(url, text) BLOCK %]
+<a href="[% PROCESS relative %]">[% text %]</a>
+[% END %]
+
<html>
<head>
<meta name="description"
content="Perl Mongers organises local Perl user groups and meetings" />
<meta name="keywords"
content="Perl,Perl Mongers,Mongers,User Group,Meeting" />
<meta name="MsSmartTagsPreventParsing" content="TRUE" />
-[% title = template.title or "Perl Mongers" -%]
- <title>[% title %]</title>
+ <title>[% title or "Perl Mongers" %]</title>
<link rel="stylesheet" type="text/css"
href="[% relative_url("/graphics/basic.css") %]"
title="basic" />
</head>
-<body style="margin: 0" bgcolor="#ffffff" text="#000000" link="#000099">
+<body>
<table border="0" cellpadding="6" cellspacing="0" width="100%">
<tr>
- <td class="side" bgcolor="#0087d9" width="120" valign="top">
+ <td class="side" width="120" valign="top">
<table cellpadding="2" cellspacing="0" border="0">
<tr>
- <td bgcolor="#000000">
- <table align="center" cellpadding="6" cellspacing="0" border="0">
- <tr>
- <td class="venue" bgcolor="#ffffff" align="center">
- <a href="[% PROCESS relative url="/" %]"><img src="[% PROCESS relative url="/graphics/title.png" %]" width="150" height="65" border="0" alt="Perl Mongers" /></a>
- </td>
- </tr>
- </table>
- </td>
+ <td bgcolor="#000000"><a href="[% PROCESS relative url="/" %]"><img src="[% PROCESS relative url="/graphics/title.png" %]" width="150" height="65" border="0" alt="Perl Mongers" /></a></td>
</tr>
</table>
[%# <br> %]
@@ -77,11 +70,11 @@
"mod_perl" => "http://perl.apache.org/",
}
%]
-i</td>
+</td>
<td valign="top">
-[% INCLUDE heading title=template.title %]
+[% INCLUDE heading %]
-[% INCLUDE $template %]
+[% content %]
</td>
</tr>
@@ -1,4 +1,4 @@
-[% META title = "Perl Mongers: Contact Information" %]
+[% WRAPPER layout title = "Perl Mongers: Contact Information" %]
<p>Please use the email addresses below to contact Perl Mongers</p>
<h2>user_groups &lt;at&gt; pm.org</h2>
@@ -11,3 +11,4 @@ <h2>dns &lt;at&gt; pm.org</h2>
<p>Any queries about the DNS services provided by Perl Mongers.</p>
<h2>webmaster &lt;at&gt; pm.org</h2>
<p>Any comments or suggestions about the web site.</p>
+[% END %]
@@ -1,4 +1,4 @@
-[% META title = "Perl Mongers: Frequently Asked Questions" %]
+[% WRAPPER layout title = "Perl Mongers: Frequently Asked Questions" %]
<p>Please send any suggestions or corrections to user_groups@pm.org</p>
<h2>General Questions</h2>
@@ -84,4 +84,4 @@ <h3>Who created the logo?</h3>
<p>Smith &amp; Jones Advertising and Marketing developed the corporate image and
handles all of Perl Mongers logo placement needs. The camel image is used
with the permission of O'Reilly &amp; Associates.</p>
-
+[% END %]
@@ -10,34 +10,154 @@
* [% bodysize = "11" %]
*/
-body { font-family: [% fontlist %]; font-size: 100%; }
-h1 { font-family: [% fontlist %]; font-size: 150%; font-style: bold; }
-h2 { font-family: [% fontlist %]; font-size: 130%; font-style: bold; }
-h3 { font-family: [% fontlist %]; font-size: 120%; font-style: bold; }
-h4 { font-family: [% fontlist %]; font-size: 100%; font-style: bold; }
-li { font-family: [% fontlist %]; font-size: 100%; }
-ul { font-family: [% fontlist %]; font-size: 100%; }
-ol { font-family: [% fontlist %]; font-size: 100%; }
-p { font-family: [% fontlist %]; font-size: 100%; }
-div { font-family: [% fontlist %]; font-size: 100%; }
-p.moddate { font-family: [% fontlist %]; font-size: 75%; }
-blockquote { font-family: [% fontlist %]; font-size: 100%; }
-
-td { font-family: [% fontlist %]; font-size: 100%; }
-td.side { background-color: #0087d9; color: #ffffff; font-family: [% fontlist %]; font-size: 110%;
- vertical-align: text-top;}
-td.venue { background-color: #ffffff; color: #000000; font-family: [% fontlist %]; font-size: 120%;
- text-align: center; } /* venue announcement in side column */
-td.header { font-size: 140% } /* yapc logo header */
-
-a { color: #0000FF; text-decoration: underline; }
-a:visited { color: #FF00FF; text-decoration: underline; }
-a:hover { color: #0000FF; text-decoration: underline; }
-
-a.side { color: #ffffff; text-decoration: underline; font-family: [% fontlist %]; font-size: 100%; }
-a.side:visited { color: #ffffcc; text-decoration: underline; font-family: [% fontlist %]; font-size: 100%; }
-a.side:hover { color: #ffffff; text-decoration: underline; font-family: [% fontlist %]; font-size: 100%; }
-
-a.sidehead { color: #ffffff; text-decoration: underline; font-weight: bold; font-family: [% fontlist %]; font-size: 110%;}
-a.sidehead:visited { color: #ffccff; text-decoration: underline; font-weight: bold; font-family: [% fontlist %]; font-size: 110%;}
-a.sidehead:hover { color: #ffffff; text-decoration: underline; font-weight: bold; font-family: [% fontlist %]; font-size: 110%;}
+body {
+ font-family: [% fontlist %];
+ font-size: 100%;
+ margin: 0;
+ background-color: #fff;
+ color: #000;
+}
+
+h1 {
+ font-family: [% fontlist %];
+ font-size: 150%;
+ font-style: bold;
+}
+
+h2 {
+ font-family: [% fontlist %];
+ font-size: 130%;
+ font-style: bold;
+}
+
+h3 {
+ font-family: [% fontlist %];
+ font-size: 120%;
+ font-style: bold;
+}
+
+h4 {
+ font-family: [% fontlist %];
+ font-size: 100%;
+ font-style: bold;}
+
+li {
+ font-family: [% fontlist %];
+ font-size: 100%;
+}
+
+ul {
+ font-family: [% fontlist %];
+ font-size: 100%;
+}
+
+ol {
+ font-family: [% fontlist %];
+ font-size: 100%;
+}
+
+p {
+ font-family: [% fontlist %];
+ font-size: 100%;
+}
+
+div {
+ font-family: [% fontlist %];
+ font-size: 100%;
+}
+
+p.moddate {
+ font-family: [% fontlist %];
+ font-size: 75%;
+}
+
+blockquote {
+ font-family: [% fontlist %];
+ font-size: 100%;
+}
+
+td {
+ font-family: [% fontlist %];
+ font-size: 100%;
+}
+
+td.side {
+ background-color: #0087d9;
+ color: #ffffff;
+ font-family: [% fontlist %];
+ font-size: 110%;
+ vertical-align: text-top;
+}
+
+td.venue {
+ background-color: #ffffff;
+ color: #000000;
+ font-family: [% fontlist %];
+ font-size: 120%;
+ text-align: center;
+} /* venue announcement in side column */
+
+td.header {
+ font-size: 140% /* yapc logo header */
+}
+
+a {
+ color: #0000FF;
+ text-decoration: underline;
+}
+
+a:visited {
+ color: #FF00FF;
+ text-decoration: underline;
+}
+
+a:hover {
+ color: #0000FF;
+ text-decoration: underline;
+}
+
+a.side {
+ color: #ffffff;
+ text-decoration: underline;
+ font-family: [% fontlist %];
+ font-size: 100%;
+}
+
+a.side:visited {
+ color: #ffffcc;
+ text-decoration: underline;
+ font-family: [% fontlist %];
+ font-size: 100%;
+}
+
+a.side:hover {
+ color: #ffffff;
+ text-decoration: underline;
+ font-family: [% fontlist %];
+ font-size: 100%;
+}
+
+a.sidehead {
+ color: #ffffff;
+ text-decoration: underline;
+ font-weight: bold;
+ font-family: [% fontlist %];
+ font-size: 110%;
+}
+
+a.sidehead:visited {
+ color: #ffccff;
+ text-decoration: underline;
+ font-weight: bold;
+ font-family: [% fontlist %];
+ font-size: 110%;
+}
+
+a.sidehead:hover {
+ color: #ffffff;
+ text-decoration: underline;
+ font-weight: bold;
+ font-family: [% fontlist %];
+ font-size: 110%;
+}
+
@@ -1,4 +1,4 @@
-[% META title = "Perl Mongers: Continent" %]
+[% WRAPPER layout title = "Perl Mongers: Continent" %]
[% IF image %]
<img src="[% image %]" alt="Perl Monger World Map for [% continent %]"
@@ -33,3 +33,4 @@ <h3>[% state %]</h3>
<p>There are currently no groups in [% continent %].</p>
[% END %]
+[% END %]
@@ -1,4 +1,4 @@
-[% META title = "Perl Mongers: User group" %]
+[% WRAPPER layout title = "Perl Mongers: User group" %]
[% IF image %]
<img src="[% image %]"
@@ -14,6 +14,4 @@
[% tsar | html_entity %] &lt;[% tsaremail %]&gt;<br>
-
-
-
+[% END %]
@@ -1,4 +1,4 @@
-[% META title = "Perl Mongers: User groups" %]
+[% WRAPPER layout title = "Perl Mongers: User groups" %]
<img src="graphics/world.png" alt="Perl Mongers World Map"
@@ -26,3 +26,4 @@
[% link_to('/groups/perl_mongers.xml', 'XML file') %] with
[% link_to('/groups/perl_mongers.dtd', 'DTD') %].
+[% END %]
@@ -1,4 +1,4 @@
-[% META title = "Perl Mongers" %]
+[% WRAPPER layout title = "Perl Mongers" %]
<p>Perl Mongers is a loose association of international Perl User Groups.</p>
@@ -11,3 +11,4 @@
<a href="http://www.perl.org"><img src="http://www.perl.org/simages/onion/onion-160x160a.gif" border="0" alt="Perl Foundation Logo" /></a>
</p>
</center>
+[% END %]
@@ -1,4 +1,4 @@
-[% META title = "Perl Mongers: Contact Information" %]
+[% WRAPPER layout title = "Perl Mongers: Contact Information" %]
<h1>Inviting a Guru to Your Meeting</h1>
@@ -108,3 +108,4 @@ <h4>How To Get On This List</h4>
Include the details about how you would like to be contacted.
</small>
</p>
+[% END %]
@@ -1,6 +1,7 @@
-[% META title = "Perl Mongers: Start a group" %]
+[% WRAPPER layout title = "Perl Mongers: Start a group" %]
-So you've checked the [% link_to('/groups/', 'existing groups') %],
+<p>So you've checked the [% link_to('/groups/', 'existing groups') %],
read up on how to [% link_to('/successful/', 'run a successful group') %],
read the [% link_to('/faq/', 'Perl Mongers FAQ') %] and still want to start a group?
-See the [% link_to('http://groups.pm.org/faq.html', 'Group Hosting Service FAQ') %].
+See the [% link_to('http://groups.pm.org/faq.html', 'Group Hosting Service FAQ') %].</p>
+[% END %]
@@ -1,4 +1,4 @@
-[% META title = "Perl Mongers: How to run a successful group" %]
+[% WRAPPER layout title = "Perl Mongers: How to run a successful group" %]
<h2>Abstract</h2>
<p>Every Perl Mongers Group is slightly different. Some are purely social
@@ -195,3 +195,4 @@ <h2>Over To You</h2>
anything that <i>didn't</i> work? Please let me know by emailing me at
user_groups@pm.org. I'll publish any good advice I get in an update
to this article.</p>
+[% END %]

0 comments on commit 0601ed7

Please sign in to comment.