From 8c9cfe238e565088b37d256eb461a01919ef9968 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Sun, 1 Nov 2015 13:42:56 +0100 Subject: Switch to HTML5 doctype + s/acronym/abbr/ + s/ / /e I'd have preferred to stick with XHTML 1.0, but unfortunately browsers won't allow you to use modern Javascript APIs with an older doctype. Note that most pages don't actually validate correctly as HTML5, I'm relying on browsers to be lenient. In either case, I'd like VNDB to stay valid XML (XHTML5, then), and luckily that shouldn't be a problem. --- lib/VNDB/Util/CommonHTML.pm | 8 ++++---- lib/VNDB/Util/FormHTML.pm | 4 ++-- lib/VNDB/Util/LayoutHTML.pm | 7 ++----- 3 files changed, 8 insertions(+), 11 deletions(-) (limited to 'lib/VNDB/Util') diff --git a/lib/VNDB/Util/CommonHTML.pm b/lib/VNDB/Util/CommonHTML.pm index bcc2ea97..7504ace8 100644 --- a/lib/VNDB/Util/CommonHTML.pm +++ b/lib/VNDB/Util/CommonHTML.pm @@ -204,12 +204,12 @@ sub htmlRevision { table class => 'stripe'; thead; Tr; - td; lit ' '; end; + td; lit ' '; end; td; revheader($self, $type, $old); end; td; revheader($self, $type, $new); end; end; Tr; - td; lit ' '; end; + td; lit ' '; end; td colspan => 2; b mt '_revision_edit_summary', $new->{rev}; br; br; @@ -439,6 +439,7 @@ sub htmlSearchBox { sub htmlRGHeader { my($self, $title, $type, $obj) = @_; + # This used to be a good test for inline SVG support, but I'm not sure it is nowadays. if(($self->reqHeader('Accept')||'') !~ /application\/xhtml\+xml/) { $self->htmlHeader(title => $title); $self->htmlMainTabs($type, $obj, 'rg'); @@ -452,8 +453,7 @@ sub htmlRGHeader { $self->htmlFooter; return 1; } - $self->resHeader('Content-Type' => 'application/xhtml+xml; charset=UTF-8'); - $self->htmlHeader(title => $title, svg => 1); + $self->htmlHeader(title => $title); $self->htmlMainTabs($type, $obj, 'rg'); return 0; } diff --git a/lib/VNDB/Util/FormHTML.pm b/lib/VNDB/Util/FormHTML.pm index 9612f904..afecbe08 100644 --- a/lib/VNDB/Util/FormHTML.pm +++ b/lib/VNDB/Util/FormHTML.pm @@ -97,7 +97,7 @@ sub htmlFormPart { if(/check/) { Tr class => 'newfield'; td class => 'label'; - lit ' '; + lit ' '; end; td class => 'field'; input type => 'checkbox', name => $o{short}, id => $o{short}, tabindex => 10, @@ -120,7 +120,7 @@ sub htmlFormPart { } elsif($o{label}) { txt $o{label}; } else { - lit ' '; + lit ' '; } end; } diff --git a/lib/VNDB/Util/LayoutHTML.pm b/lib/VNDB/Util/LayoutHTML.pm index 76b15690..fcd26346 100644 --- a/lib/VNDB/Util/LayoutHTML.pm +++ b/lib/VNDB/Util/LayoutHTML.pm @@ -17,11 +17,8 @@ sub htmlHeader { # %options->{ title, noindex, search, feeds, svg } $skin = $self->{skin_default} if !$self->{skins}{$skin} || !-d "$VNDB::ROOT/static/s/$skin"; # heading - html lang => $self->{l10n}->language_tag(), $o{svg} ? ( - doctype => 'xhtml-math-svg', - 'xmlns:svg' => 'http://www.w3.org/2000/svg', - 'xmlns:xlink' => 'http://www.w3.org/1999/xlink' - ) : (); + lit ''; + tag 'html', lang => $self->{l10n}->language_tag(); head; title $o{title}; Link rel => 'shortcut icon', href => '/favicon.ico', type => 'image/x-icon'; -- cgit v1.2.3