diff options
Diffstat (limited to 'lib/MasterWebInterface/Util')
| -rwxr-xr-x | lib/MasterWebInterface/Util/AdvancedFilterBox.pm | 23 | ||||
| -rwxr-xr-x | lib/MasterWebInterface/Util/FilterBox.pm | 2 | ||||
| -rwxr-xr-x | lib/MasterWebInterface/Util/Layout.pm | 11 |
3 files changed, 22 insertions, 14 deletions
diff --git a/lib/MasterWebInterface/Util/AdvancedFilterBox.pm b/lib/MasterWebInterface/Util/AdvancedFilterBox.pm index a496a04..24382a2 100755 --- a/lib/MasterWebInterface/Util/AdvancedFilterBox.pm +++ b/lib/MasterWebInterface/Util/AdvancedFilterBox.pm @@ -19,7 +19,7 @@ use Data::Dumper 'Dumper'; # TODO: allow searching by IP, in combination with expired servers (and sanity check in javascript?) sub htmlAdvancedFilterBox { - my($self, %opt) = @_; + my ($self, %opt) = @_; div class => 'mainbox'; div class => "header"; @@ -31,6 +31,16 @@ sub htmlAdvancedFilterBox txt "."; end; end; + + if (0) + { + div class => "codeblock"; + p "No worries, Darkelarious is debugging an issue right now. Please ignore this code block."; + pre; + txt Dumper \%opt; + end; + end; + } # advanced filter form form action => "/adv", 'accept-charset' => 'UTF-8', method => 'get', class => "advancedfilter"; @@ -182,17 +192,6 @@ sub htmlAdvancedFilterBox end 'fieldset'; end; # form - # debugging box - if ( 0 ) - { - h2 "Debug information"; - div class => "codeblock"; - pre; - txt Dumper \%opt; - end; - end; - } - # return to simple filter/layout div class => "simpleadvanced"; a href => $opt{gamename} ? "/s/$opt{gamename}" : "/s"; diff --git a/lib/MasterWebInterface/Util/FilterBox.pm b/lib/MasterWebInterface/Util/FilterBox.pm index 8db7a60..40218ac 100755 --- a/lib/MasterWebInterface/Util/FilterBox.pm +++ b/lib/MasterWebInterface/Util/FilterBox.pm @@ -22,7 +22,7 @@ sub htmlFilterBox end; # filter box - form action => $opt{gamename} ? "/s/$opt{gamename}" : "/s", 'accept-charset' => 'UTF-8', method => 'get'; + form action => $opt{action}, 'accept-charset' => 'UTF-8', method => 'get'; fieldset class => 'simple'; a href => '/g', $opt{sel} eq 'g' ? (class => 'sel') : (), 'Games'; a href => '/s', $opt{sel} eq 's' ? (class => 'sel') : (), 'Servers'; diff --git a/lib/MasterWebInterface/Util/Layout.pm b/lib/MasterWebInterface/Util/Layout.pm index fe7b5c5..4862f93 100755 --- a/lib/MasterWebInterface/Util/Layout.pm +++ b/lib/MasterWebInterface/Util/Layout.pm @@ -18,9 +18,18 @@ sub htmlHeader title "$o{title} :: $self->{site_name} masterserver"; Link type => 'image/x-icon', rel => 'shortcut icon', href => "/favicon.ico"; Link type => "text/css", rel => 'stylesheet', href => "/style/$self->{style}/style.css", media => "all"; + + # metadata for previews + meta property => "theme-color", content => ($self->{meta_color} // "#111111"); + meta property => "og:type", content => "website"; + meta property => "og:site_name", content => $self->{site_name}; + meta property => "og:title", content => substr($o{title},0,50); + meta property => "og:description", content => ($o{meta_desc} // ""); + meta property => "og:image", content => ($o{meta_img } // "/map/default/333networks.jpg"); + if ( $o{noindex} ) { - meta name => 'robots', content => 'noindex,nofollow,nosnippet,noodp,noarchive,noimageindex';end; + meta name => 'robots', content => 'noindex,nofollow,nosnippet,noodp,noarchive,noimageindex'; } end 'head'; |
