This commit is contained in:
Graham Ollis
2013-08-08 08:51:56 -04:00
parent cfbf3e8ea3
commit 6386e0620e
5 changed files with 240 additions and 16 deletions
+29
View File
@@ -0,0 +1,29 @@
use Mojolicious::Lite;
# Documentation browser under "/perldoc"
plugin 'tt_renderer';
get '/' => sub {
my $self = shift;
$self->render('index');
};
app->start;
__DATA__
@@ index.html.tt
[%
WRAPPER 'layouts/default.html.tt'
title = 'default'
%]
<p>Welcome to the Mojolicious real-time web framework!</p>
<p>Welcome to the TtRenderer plugin!</p>
[% END %]
@@ layouts/default.html.tt
<!DOCTYPE html>
<html>
<head><title>[% title %]</title></head>
<body>[% content %]</body>
</html>