Skip to content
Browse files

More cruft cleaning

  • Loading branch information...
1 parent 65df504 commit dd25d224e8cf2f41a6b6d9b4f421b795aa271078 @jshirley jshirley committed Mar 26, 2010
View
BIN lib/StyleGuide/Controller/.Root.pm.swp
Binary file not shown.
View
8 lib/StyleGuide/Controller/Root.pm
@@ -26,7 +26,7 @@ The root page (/)
=cut
-sub guide : Chained('/') PathPart('') CaptureArgs(0) {
+sub setup : Chained('/') PathPart('') CaptureArgs(0) {
my ( $self, $c ) = @_;
my $design = $c->req->cookie('design');
if ( not $design ) {
@@ -36,7 +36,11 @@ sub guide : Chained('/') PathPart('') CaptureArgs(0) {
}
}
-sub index : Chained('guide') PathPart('') Args(0) { }
+sub index : Chained('setup') PathPart('') Args(0) {
+ my ( $self, $c ) = @_;
+}
+
+sub guide : Chained('setup') Args(0) { }
sub switch : Chained('guide') Args(0) {
my ( $self, $c ) = @_;
View
8 shared/index.tt
@@ -0,0 +1,8 @@
+[%~
+
+page.title = 'StyleGuide Application';
+~%]
+<ul>
+ <li><a href="[% c.uri_for_action('/guide') %]">Full Guide</a></li>
+ <li><a href="[% c.uri_for_action('/switch') %]">Design Switcher</a></li>
+</ul>
View
21 shared/site/html.tt
@@ -15,7 +15,7 @@ END;
<html lang="[% page.language %]">
<head>
<meta charset="utf-8">
- <title>[% IF page.title %]</title>
+ <title>[% page.title %]</title>
<meta http-equiv="Content-Language" content="[% page.language %]">
<meta name="description" content="[% page.description %]">
[%
@@ -38,27 +38,24 @@ FOREACH stylesheet IN page.head.stylesheets;
stylesheet :
static("css/$stylesheet", 1); -%]
<link rel="stylesheet" href="[% stylesheet %]" type="text/css" media="screen">
-[%
-END;
-%]
+[% END %]
<link rel="stylesheet" href="[% static( 'css/screen.css', 1 ) %]" type="text/css" media="screen">
<style type="text/css" id="styleoverrides"></style>
</head>
- [% # Drop in the header if appropriate
- header %]
- [% content %]
- [% footer;
+[%
+# Drop in the header if appropriate
+ header;
+ content;
+ footer;
# Add footer scripts
page.body.scripts = page.body.scripts.unique;
FOREACH script IN page.body.scripts;
NEXT UNLESS script;
script = script.match('^(https?://|/)') ?
script :
- static('scripts/' _ script, undef, 1); -%]
+ static("scripts/$script", undef, 1); -%]
<script type="text/javascript" src="[% script %]"></script>
- [%
- END;
- %]
+ [% END %]
</body>
</html>
View
13 shared/site/layout/default.tt
@@ -1,5 +1,5 @@
[% IF page.crumbs.size %]
-<nav id="crumbs">
+<div id="crumbs">
<ul>
<li><a href="[% c.uri_for('/') %]">[% c.loc('Home') %]</a> [% c.loc('CRUMBS_SEP') %]</li>
[% FOREACH link = page.crumbs %]
@@ -10,19 +10,14 @@
[% END %]
[% END %]
</ul>
-</nav>
+</div>
[% END %]
-<article id="content">
+<div id="content">
<div id="main" class="clearfix">
[% PROCESS site/messages.tt %]
[%~
# Nothing fancy here. Just dump the content.
content
~%]
- [% IF c.debug %]
- <section id="debug">
- [% PROCESS site/instrumentation/querylog.tt %]
- </section>
- [% END %]
</div>
-</article>
+</div>

0 comments on commit dd25d22

Please sign in to comment.
Something went wrong with that request. Please try again.