Commits

Adam M Dutko  committed cd3b9bd

Reorganize.

  • Participants
  • Parent commits 092ef7b

Comments (0)

Files changed (7)

File site/www/layouts/default.html.ep

+<!DOCTYPE html>
+<html>
+  <head>
+      <title><%= title %></title>
+      <link ref="/css/default.css" rel="stylesheet" media="all" />
+  </head>
+  <body>
+      %= include 'templates/header'
+      <%= content %>
+  </body>
+</html>

File site/www/layouts/header.html.ep

+<nav>
+    <ul>
+        <li><a href="/">Home</a></li>
+        <li><a href="/meetings/">Meetings</a></li>
+        <li><a href="/links/">Links</a></li>
+    </ul>
+</nav>

File site/www/layouts/meetings.html.ep

+<!DOCTYPE html>
+<html>
+  <head><title><%= title %></title></head>
+  <body>
+      %= include 'templates/header'
+      <%= content %>
+  </body>
+</html>

File site/www/lib/clevelandpm.pm

-package ClevelandPM;
-use Mojo::Base 'Mojolicious';
-
-sub startup {
-    ## We need ourself to make it
-    my $self = shift;
-
-    ## Go go hypnotoad
-    $self->app->config(hypnotoad => {listen => ['http://*:8080/']});
-
-    ## Hoorary for Cleveland Perl Mongers
-    ## --> Secret Key for session information
-    ## 
-    ## NOTE: Changed on the fly when we deploy.
-    $self->secret('clevelandPerlMongers2013');
-
-    ## Start setting up routes
-    my $r = $self->routes;
-
-    ## Route all requests to / to index
-    $r->get('/')->to(template => 'index', layout => 'default');
-
-    ## Route all requests to /meetings/[date] to the proper meeting
-    $r->get('/meetings/(:dateofmeeting)' => [dateofmeeting => qr/\d+/] => sub {
-      my $self = shift;
-      my $dateofmeeting = $self->param('dateofmeeting');
-      $self->render($dateofmeeting);
-    });
-
-    ## Route all requests to /meetings to meetings
-    $r->get('/meetings') => sub {
-      my $self = shift;
-      $self->render('meetings');
-    };
-}
-
-1;

File site/www/templates/templates/default.html.ep

-<!DOCTYPE html>
-<html>
-  <head>
-      <title><%= title %></title>
-      <link ref="/css/default.css" rel="stylesheet" media="all" />
-  </head>
-  <body>
-      %= include 'templates/header'
-      <%= content %>
-  </body>
-</html>

File site/www/templates/templates/header.html.ep

-<nav>
-    <ul>
-        <li><a href="/">Home</a></li>
-        <li><a href="/meetings/">Meetings</a></li>
-        <li><a href="/links/">Links</a></li>
-    </ul>
-</nav>

File site/www/templates/templates/meetings.html.ep

-<!DOCTYPE html>
-<html>
-  <head><title><%= title %></title></head>
-  <body>
-      %= include 'templates/header'
-      <%= content %>
-  </body>
-</html>