Prechádzať zdrojové kódy

handle meetings correctly

George S. Baugh 5 rokov pred
rodič
commit
80f74be8b7
3 zmenil súbory, kde vykonal 8 pridanie a 73 odobranie
  1. 8 22
      routes.pm
  2. 0 25
      templates/announce.tx
  3. 0 26
      templates/meetings.tx

+ 8 - 22
routes.pm

@@ -20,13 +20,13 @@ our %routes = (
     },
     '/meetings.html' => {
         method   => 'GET',
-        callback => \&Trog::Routes::HTML::posts,
-        data     => { tag => ['meetings'] },
+        callback => \&Trog::Routes::HTML::series,
+        data     => { id => 1609008204, in_series => 1 },
     },
     '/announce_meeting.html' => {
         method   => 'GET',
-        callback => \&Trog::Routes::HTML::posts,
-        data     => { tag => ['meetings'], limit => 1 },
+        callback => \&Trog::Routes::HTML::series,
+        data     => { id => 1609008204, in_series => 1, limit => 1 },
     },
     '/sponsors.html' => {
         method   => 'GET',
@@ -38,8 +38,8 @@ our %routes = (
     },
     '/projects/index.html' => {
         method   => 'GET',
-        callback => \&Trog::Routes::HTML::posts,
-        data     => { tag => ['project'] },
+        callback => \&Trog::Routes::HTML::series,
+        data     => { id => 1608661217, in_series => 1 },
     },
     '/talks/mostrecent.html' => {
         method   => 'GET',
@@ -48,8 +48,8 @@ our %routes = (
     },
     '/talks/index.html' => {
         method   => 'GET',
-        callback => \&Trog::Routes::HTML::posts,
-        data     => { tag => ['presentations'] },
+        callback => \&Trog::Routes::HTML::series,
+        data     => { id => 1608661368, in_series => 1 },
     },
     '/styles/houston.css' => {
         method   => 'GET',
@@ -63,10 +63,6 @@ our %routes = (
         },
         captures => ['fragment'],
     },
-    '/meetings.html' => {
-        method => 'GET',
-        callback => \&meetings,
-    },
 );
 
 my $processor = Text::Xslate->new(
@@ -93,14 +89,4 @@ sub faq ($args, $render_cb) {
     return Trog::Routes::HTML::index($args,$render_cb, $out);
 }
 
-sub meetings ($args, $render_cb) {
-    my $out = $processor->render('meetings.tx');
-    return Trog::Routes::HTML::index($args,$render_cb, $out);
-}
-
-sub announce ($args, $render_cb) {
-    my $out = $processor->render('announce.tx');
-    return Trog::Routes::HTML::index($args,$render_cb, $out);
-}
-
 1;

+ 0 - 25
templates/announce.tx

@@ -1,25 +0,0 @@
-<h1 class="subhead">Next Meeting</h1>
-
-<p>The December meeting will be held on Zoom.</p>
-
-<ul style="list-style-type: none">
-    <li>Time: December 10, 2020 06:00 PM Central Time (US and Canada)</li>
-    <li>Join Zoom Meeting <a href="https://us02web.zoom.us/j/920069702">https://us02web.zoom.us/j/920069702</a></li>
-    <li>Meeting ID: 920 069 702</li>
-    <li>Find your local number: <a href="https://us02web.zoom.us/u/kijzdeGpk">https://us02web.zoom.us/u/kijzdeGpk</a></li>
-</ul>
-
-<p>The passcode is available by executing the following Perl code:</p>
-
-<pre><code>
-print +(0b1000100).((3&lt;&lt;2)*10).(010)
-</code></pre>
-
-<p>the result will be your 6 digit passcode.</p>
-
-<p>The idea for Perl code to generate the passcode was stolen from example for SanDiego.pm meeting by $Bob: <a href="http://blogs.perl.org/users/bob/2020/07/sandiegopm-meeting-tuesday-july-14th-2020.html" target="_blank">blog post</a>.
-
-</p><p>This month, Brett Estrade will present <em>Atomic Operations in Unix (and Perl)</em>.</p>
-
-<p>Brett Estrade (ESTRABD on CPAN)</p>
-

+ 0 - 26
templates/meetings.tx

@@ -1,26 +0,0 @@
-<h1 class="subhead">Monthly Meetings</h1>
-
-<p>We meet the second Thursday of each month, starting around 6pm and ending
-  around 8pm. Houston.pm meetings have split into <a href="technical_meetings.html">technical meetings</a> and
-  <a href="social_meetings.html">social meetings</a>.</p>
-
-<p>The meetings are announced on the Houston.pm mailing list, on <a href="https://twitter.com/houstonpm">Houston.pm twitter account</a>
-  and in our <a href="http://houston.pm.home/atom.xml">Atom
-  feed</a>. We try to announce the meetings at least a couple of weeks in
-  advance, but that is not guaranteed.</p>
-
-<h2 class="subhead">Upcoming Meetings</h2>
-
-<dl>
-    <dt><time datetime="2021-01-14">January 14, 2021</time></dt>
-    <dd><em>Atomic Operations in Unix (and Perl)</em> with Brett Estrade on Zoom</dd>
-
-    <dt><time datetime="2021-02-11">February 11, 2021</time></dt>
-    <dd>TBD at Hostgator</dd>
-
-    <dt><time datetime="2021-03-11">March 11, 2021</time></dt>
-    <dd>TBD at cPanel</dd>
-
-</dl>
-
-