From e4890c9e35e6e8b2c038d5ce8b857eabd8492c01 Mon Sep 17 00:00:00 2001 From: Ryan Voots Date: Fri, 17 Jun 2016 00:30:37 -0400 Subject: [PATCH] Moving to TT --- app.pl | 128 ++----------------------------------------------- tt/editor.html | 119 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+), 123 deletions(-) create mode 100755 tt/editor.html diff --git a/app.pl b/app.pl index 357aed1..827cce9 100755 --- a/app.pl +++ b/app.pl @@ -8,6 +8,11 @@ use Data::Dumper; use DBI; use Mojolicious::Lite; +use Mojolicious::Plugin::TtRenderer; + +plugin 'tt_renderer'; +app->renderer->default_handler( 'tt' ); +app->renderer->paths( [ './tt' ] ); my $dbh = DBI->connect("dbi:SQLite:dbname=pastes.db", "", "", {RaiseError => 1}); # hardcode some channels first @@ -58,126 +63,3 @@ get '/pastebin/:pasteid' => sub { app->start; -__DATA__ - -@@ editor.html.ep - - - - - - - - - - - - - - - - Editor - - - - -
-
-
-
-
- % if ($viewing) { -
- Who: <%= $who %> -
-
- When: <%= $when %> -
-
- What: <%= $what %> -
- % } else { -
- - -
-
- - -
-
- - -
- % } -
-
-
-
-
- -
-        
-
- -
-
-
- - - - - - diff --git a/tt/editor.html b/tt/editor.html new file mode 100755 index 0000000..5fa6dcb --- /dev/null +++ b/tt/editor.html @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + Editor + + + + +
+
+
+
+
+ % if ($viewing) { +
+ Who: <%= $who %> +
+
+ When: <%= $when %> +
+
+ What: <%= $what %> +
+ % } else { +
+ + +
+
+ + +
+
+ + +
+ % } +
+
+
+
+
+ +
+        
+
+ +
+
+
+ + + + + +