version 1.7, 2010/04/30 07:23:32 |
version 1.9, 2010/04/30 18:30:57 |
|
|
#!/usr/bin/env perl |
#!/usr/bin/perl |
|
|
package Dudelicious; |
package Dudelicious; |
|
|
|
|
BEGIN { |
BEGIN { |
use FindBin; |
use FindBin; |
use lib "$FindBin::Bin/../lib"; |
use lib "$FindBin::Bin/../lib"; |
use lib "$FindBin::Bin/mojo/lib"; |
use lib "$FindBin::Bin/../mojo/lib"; |
} |
} |
|
|
use Carp qw/ carp croak /; |
use Carp qw/ carp croak /; |
|
|
$self->render( files => \@files, layout => 'todotxt' ); |
$self->render( files => \@files, layout => 'todotxt' ); |
} => 'index'; |
} => 'index'; |
|
|
|
get '/todotxt' => 'todotxt'; |
|
|
get '/l/:file' => sub { |
get '/l/:file' => sub { |
my $self = shift; |
my $self = shift; |
my $file = $self->stash('file') . '.txt'; |
my $file = $self->stash('file') . '.txt'; |
|
|
|
|
@@ layouts/todotxt.html.ep |
@@ layouts/todotxt.html.ep |
<!doctype html><html> |
<!doctype html><html> |
<head><title>Funky!</title></head> |
<head> |
|
<title>Funky!</title> |
|
<link rel="stylesheet" href="<%= url_for 'todotxt', format => 'css' %>"> |
|
</head> |
<body><%== content %></body> |
<body><%== content %></body> |
</html> |
</html> |
|
|
|
@@ todotxt.css.ep |
|
body { |
|
background: LightGoldenRodYellow; |
|
color: DarkSlateBlue; |
|
} |
|
|
|
.inplaceeditor-saving { |
|
background: url(images/saving.gif) bottom right no-repeat; |
|
} |
|
|
|
|
__END__ |
__END__ |
|
|