=head1 DESCRIPTION
-[enter your description here]
+Implements all actions for this simple chat application.
=head1 METHODS
=cut
sub index :Path :Args(0) {
- my ( $self, $c ) = @_;
-
- # Hello World
- $c->response->body( $c->welcome_message );
+ my ( $self, $c ) = @_;
}
=head2 default
=cut
sub default :Path {
- my ( $self, $c ) = @_;
- $c->response->body( 'Page not found' );
- $c->response->status(404);
+ my ( $self, $c ) = @_;
+ $c->response->body( 'Page not found' );
+ $c->response->status(404);
}
=head2 end
--- /dev/null
+package Chatty::View::HTML;
+
+use strict;
+use warnings;
+
+use base 'Catalyst::View::TT';
+
+__PACKAGE__->config(
+ TEMPLATE_EXTENSION => '.tt',
+ INCLUDE_PATH => [
+ Chatty->path_to('root', 'tt'),
+ ],
+ WRAPPER => 'wrapper.tt',
+ render_die => 1,
+ COMPILE_DIR => '/tmp/tt_cache',
+);
+
+
+=head1 NAME
+
+Chatty::View::HTML - TT View for Chatty
+
+=head1 DESCRIPTION
+
+TT View for Chatty.
+
+=head1 SEE ALSO
+
+L<Chatty>
+
+=head1 AUTHOR
+
+Charles McGarvey
+
+=head1 LICENSE
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;
--- /dev/null
+
+body {
+ font: 100 14px Verdana, Helvetica, Arial;
+ margin: 10px;
+ background: #ccf;
+}
+
+img {
+ border: 0;
+}
+
+a {
+ text-decoration: none;
+}
+
+a:hover {
+ border-bottom: 1px dotted blue;
+}
+
+
+.left {
+ float: left;
+ margin: 0 5px 5px 0;
+}
+
+.right {
+ float: right;
+ margin: 0 0 5px 5px;
+}
+
+
+#outer {
+ margin: 0 auto 0 auto;
+ width: 640px;
+ border: 2px solid black;
+ background: #99c;
+}
+
+#inner {
+ margin: 5px;
+ padding: 10px;
+ border: 2px solid black;
+ background: white;
+}
+
+#inner h1 {
+ font-size: 1.3em;
+}
+
--- /dev/null
+<h1>Chatty - Toy chat app written in Perl/Catalyst</h1>
--- /dev/null
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="author" content="Charles McGarvey">
+ <meta name="description" content="This is a chat application in Catalyst!">
+ <link rel="stylesheet" type="text/css" href="[% c.uri_for('static/css/common.css') %]">
+ <title>Chatty - [% template.title or 'Toy chat application written in Perl/Catalyst' %]</title>
+ </head>
+ <body>
+ <div id="outer">
+ <div id="inner">
+[% content %]
+ </div>
+ </div>
+ <script type="text/javascript" src="[% static('js/jquery.tools-1.2.6.min.js') %]"></script>
+ </body>
+</html>
--- /dev/null
+use strict;
+use warnings;
+use Test::More;
+
+
+BEGIN { use_ok 'Chatty::View::HTML' }
+
+done_testing();