Prechádzať zdrojové kódy

80% there, should just be tweaks and content import at this point

George S. Baugh 5 rokov pred
rodič
commit
f67da25f0e

+ 79 - 0
routes.pm

@@ -0,0 +1,79 @@
+package Theme;
+
+use strict;
+use warnings;
+
+no warnings 'experimental';
+use feature qw{signatures};
+
+use File::Basename qw{basename};
+
+use lib 'lib';
+use Trog::Routes::HTML;
+
+our $default_title = 'Houston Perl Mongers';
+
+our %routes = (
+    '/about.html' => {
+        method   => 'GET',
+        callback => sub {Trog::Routes::HTML::redirect_permanent('/about') },
+    },
+    '/meetings.html' => {
+        method   => 'GET',
+        callback => \&Trog::Routes::HTML::posts,
+        data     => { tag => ['meetings'] },
+    },
+    '/announce_meeting.html' => {
+        method   => 'GET',
+        callback => \&Trog::Routes::HTML::posts,
+        data     => { tag => ['meetings'], limit => 1 },
+    },
+    '/sponsors.html' => {
+        method   => 'GET',
+        callback => \&sponsors,
+    },
+    '/faqs.html' => {
+        method   => 'GET',
+        callback => \&faq,
+    },
+    '/projects/index.html' => {
+        method   => 'GET',
+        callback => \&Trog::Routes::HTML::posts,
+        data     => { tag => ['project'] },
+    },
+    '/mostrecent.html' => {
+        method   => 'GET',
+        callback => \&Trog::Routes::HTML::posts,
+        data     => { tag => ['presentations'], limit => 1 },
+    },
+    '/talks/index.html' => {
+        method   => 'GET',
+        callback => \&Trog::Routes::HTML::posts,
+        data     => { tag => ['presentations'] },
+    },
+);
+
+my $processor = Text::Xslate->new(
+    path => 'www/themes/houston.pm/templates',
+);
+
+my %paths = (
+    '/meetings.html'         => 'Past & Upcoming Meetings',
+    '/announce_meeting.html' => 'Latest Meeting', 
+);
+
+sub path_to_tile ($path) {
+    return $paths{$path} ? $paths{$path} : $path;
+}
+
+sub sponsors ($args, $render_cb) {
+    my $out = $processor->render('sponsors.tx');
+    return Trog::Routes::HTML::index($args,$render_cb, $out);
+}
+
+sub faq ($args, $render_cb) {
+    my $out = $processor->render('faq.tx');
+    return Trog::Routes::HTML::index($args,$render_cb, $out);
+}
+
+1;

+ 14 - 0
styles/screen.css

@@ -1,3 +1,17 @@
+.faq {
+    margin-top: 1em;
+}
+
+.faq .question {
+    padding: 0.5em 1em;
+    background-color: #ccf;
+    margin-bottom: 0.5em;
+}
+
+.faq .answer {
+    padding-left: 2em;
+}
+
 .menu {
     list-style: none;
     padding: 0;

+ 1 - 1
styles/structure.css

@@ -1,5 +1,6 @@
 #leftbar {
     width:14rem;
+    padding-top:6rem;
     margin-left:1rem;
 }
 
@@ -17,7 +18,6 @@
 
 #kontainer {
     padding-bottom: 5rem;
-    padding-top: 2rem;
     font-family: arial, helvetica, sans-serif;
 }
 

+ 34 - 0
templates/faq.tx

@@ -0,0 +1,34 @@
+<h1 class="subhead">Houston Perl Mongers FAQ</h1>
+
+<p>There are many questions that come up regularly in the meetings and on the mailing
+  list that would qualify for FAQ status. Here are some of them. Sometimes the answer will
+  be a link to a site with a better answer than we could produce.</p>
+
+<div class="faq">
+  <div class="question">How can I learn to program in Perl?</div>
+  <div class="answer">See <a href="http://www.perl.com/pub/a/2000/10/begperl1.html">Beginner's
+    Introduction to Perl</a> from Perl.com. The best book for learning Perl is
+    <a href="http://www.oreilly.com/catalog/learnperl4/index.html">Learning Perl</a>.
+  </div>
+</div>
+
+<div class="faq">
+  <div class="question">How do I install the xxxxx Perl Module? (Unix/Linux)</div>
+  <div class="answer">See <a href="http://www.perlmonks.org/?node_id=128077">A Guide to
+    Installing Modules</a>
+  </div>
+</div>
+
+<div class="faq">
+  <div class="question">How do I install the xxxxx Perl Module? (Windows)</div>
+  <div class="answer">See <a href="http://www.perlmonks.org/?node_id=434813">A guide to
+     installing modules for Win32</a>
+  </div>
+</div>
+
+<div class="faq">
+  <div class="question">How do I install a Perl Module on my web server?</div>
+  <div class="answer">See <a href="http://www.perlmonks.org/?node_id=216644">Installing
+    Modules on a Web Server</a>
+  </div>
+</div>

+ 1 - 1
templates/footbar.tx

@@ -1,5 +1,5 @@
 <div style="display:inline; vertical-align:top"> 
-<a rel="license" href="http://creativecommons.org/licenses/by/2.5/">
+<a rel="license" style="text-decoration:none" href="http://creativecommons.org/licenses/by/2.5/">
     <img alt="Creative Commons License" border="0" src="http://creativecommons.org/images/public/somerights20.gif" />
 </a>
 </div>

+ 3 - 3
templates/leftbar.tx

@@ -1,6 +1,6 @@
 <ul class="menu" id="mainmenu">
-    <li class="curr"><a href="/index.html">Home</a></li>
-    <li><a href="http://houston.pm.org/mailman/listinfo/houston_houston.pm.org">Join Mailing List</a></li>
+    <li class="curr"><a href="/">Home</a></li>
+    <li><a href="http://houston.pm.org/mailman/listinfo/houston.pm_houston.pm.org">Join Mailing List</a></li>
     <li><a href="/about.html">About Us</a></li>
     <li><a href="/meetings.html">Meetings</a></li>
     <li><a href="/sponsors.html">Sponsors</a></li>
@@ -8,7 +8,7 @@
     <li><a href="/talks/mostrecent.html">Most Recent Talk</a></li>
     <li><a href="/talks/index.html">Talks Archive</a></li>
     <li><a href="/projects/index.html">Group Projects</a></li>
-<br /><br />
+    <br />
     <li class="head">External Resources</li>
     <li><a href="http://padre.perlide.org/" title="perl editor">Perl IDE</a></li>
     <li><a href="http://blogs.perl.org/">Perl Blogs</a></li>

+ 17 - 0
templates/sponsors.tx

@@ -0,0 +1,17 @@
+<h1 class="subhead">Sponsors</h1>
+
+<p>For the last few years, the Houston.pm meetings have been sponsored by
+  <a href="http://cpanel.net/">cPanel, L.L.C.</a> They have generously
+  provided a location for our meetings at <a href="http://maps.google.com/maps?q=3131+W.+Alabama,+Houston,+TX&amp;hl=en&amp;z=17">3131 W. Alabama St.</a>,
+  with audio/visual equipment and internet access for the meeting. They have also
+  provided free pizza.</p>
+
+<p>Houston.pm and the Perl community in Houston cannot really thank cPanel, L.L.C.
+  and CEO J. Nick Koston enough for this generous support.</p>
+
+<p>In 2014, Houston.pm gained another sponsor. <a href="http://www.hostgator.com/">HostGator</a>
+  began alternating with cPanel as our meeting place at <a href="https://maps.google.com/maps?q=HostGator,+Houston&amp;fb=1&amp;gl=us&amp;hq=HostGator,&amp;hnear=0x8640b8b4488d8501:0xca0d02def365053b,Houston,+TX&amp;cid=2141572779937723859&amp;t=h&amp;z=16&amp;iwloc=A">5005 Mitchelldale</a>,
+  providing internet access, a projector, and free food.</p>
+
+<p>Houston.pm and the Perl community in Houston cannot really thank HostGator
+  enough for this generous support.</p>