diff --git a/lib/PostText.pm b/lib/PostText.pm index d7d5ed0..c117e82 100644 --- a/lib/PostText.pm +++ b/lib/PostText.pm @@ -147,6 +147,8 @@ sub startup($self) { $r->get('/feeds')->to('page#feeds')->name('feeds_page'); + $r->get('/javascript')->to('page#javascript')->name('javascript_page'); + # Not-so-static but I mean they're all 'pages' c'mon $human->get('/search')->to('page#search')->name('search_page'); diff --git a/lib/PostText/Controller/Page.pm b/lib/PostText/Controller/Page.pm index 2b5dba1..d457a31 100644 --- a/lib/PostText/Controller/Page.pm +++ b/lib/PostText/Controller/Page.pm @@ -10,6 +10,8 @@ sub rules($self) { $self->render } sub feeds($self) { $self->render } +sub javascript($self) { $self->render } + sub captcha($self) { my $v; diff --git a/t/page.t b/t/page.t index 1a8ac87..8a88111 100644 --- a/t/page.t +++ b/t/page.t @@ -10,4 +10,7 @@ $t->get_ok('/rules')->status_is(200)->text_like(h2 => qr/The Rules/); $t->get_ok('/feeds')->status_is(200)->text_like(h2 => qr/Feeds/); +$t->get_ok('/javascript')->status_is(200) + ->text_like(h2 => qr/JavaScript License Information/); + done_testing; diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index 86617de..ccfa565 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -93,6 +93,9 @@ <%= content =%> diff --git a/templates/page/javascript.html.ep b/templates/page/javascript.html.ep new file mode 100644 index 0000000..c75fb22 --- /dev/null +++ b/templates/page/javascript.html.ep @@ -0,0 +1,28 @@ +% layout 'default'; +% title 'JavaScript License Information'; +% content_for open_graph => begin + + + +% end +% content_for twitter_card => begin + + +% end +

<%= title %>

+
+ + + + + + +
<%= link_to 'background.js', '/js/background.js' %><%= link_to 'http://www.gnu.org/licenses/gpl-3.0.html', + begin%>GNU General Public License 3.0 or later<% end %><%= link_to 'background.js', '/js/background.js' %>
+