diff options
author | Yorhel <git@yorhel.nl> | 2021-01-19 13:12:17 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2021-01-20 09:06:12 +0100 |
commit | 9d1727c77d4b00d2a861c2c31f93d3aebff2f2d9 (patch) | |
tree | 61d77e79edb2590c06cca80c8d029d8630a5aabc /lib/VNDB/Util/LayoutHTML.pm | |
parent | b35af5ba52f3bceb603e8c7dda10d4abb84c6bd9 (diff) |
v2rw: Rewrite done, time to clean up old v2 code
Yay!
There are no more request handlers in the VNDB::* namespace and no more
Javascript in data/js/. This cleans up a lot of old legacy code that
wasn't fun to maintain.
Diffstat (limited to 'lib/VNDB/Util/LayoutHTML.pm')
-rw-r--r-- | lib/VNDB/Util/LayoutHTML.pm | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/lib/VNDB/Util/LayoutHTML.pm b/lib/VNDB/Util/LayoutHTML.pm deleted file mode 100644 index a9e0c05f..00000000 --- a/lib/VNDB/Util/LayoutHTML.pm +++ /dev/null @@ -1,44 +0,0 @@ - -package VNDB::Util::LayoutHTML; - -use strict; -use warnings; -use TUWF ':html'; -use VNDB::Config; -use VNWeb::HTML; -use Exporter 'import'; - -our @EXPORT = qw|htmlHeader htmlFooter|; - -sub htmlHeader { # %options->{ title, noindex, search, feeds, metadata } - my($self, %o) = @_; - %VNWeb::HTML::pagevars = (); - - $o{og} = $o{metadata} ? +{ map +(s/og://r, $o{metadata}{$_}), keys $o{metadata}->%* } : undef; - $o{index} = !$o{noindex}; - - html lang => 'en'; - head sub { VNWeb::HTML::_head_(\%o) }; - body; - div id => 'bgright', ' '; - div id => 'header', sub { h1 sub { a href => '/', 'the visual novel database' } }; - div id => 'menulist', sub { VNWeb::HTML::_menu_(\%o) }; - div id => 'maincontent'; -} - - -sub htmlFooter { # %options => { pref_code => 1 } - my($self, %o) = @_; - div id => 'footer', sub { VNWeb::HTML::_footer_ }; - end 'div'; # maincontent - - # Abuse an empty noscript tag for the formcode to update a preference setting, if the page requires one. - noscript id => 'pref_code', title => $self->authGetCode('/xml/prefs.xml'), '' - if $o{pref_code} && $self->authInfo->{id}; - script type => 'text/javascript', src => config->{url_static}.'/g/vndb.js?'.config->{version}, ''; - VNWeb::HTML::_scripts_({}); - end 'body'; - end 'html'; -} - -1; |