X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/dae492a5488a4b54635d1c8de597162e649fd123..1c2fd8f8d8c72f190c55283d7c4199754a163d06:/browser.plp diff --git a/browser.plp b/browser.plp index aaafa03..fbbddde 100644 --- a/browser.plp +++ b/browser.plp @@ -6,8 +6,10 @@ use List::Util qw(sum max first); Html({ title => 'browser compatibility cheat sheet', version => 'v1.0', - description => - "caniuse.", + description => [ + "Compatibility table of new web features (HTML5, CSS3, SVG, Javascript)", + "comparing support and usage share for all popular browser versions.", + ], keywords => [qw' web browser support compatibility usage available feature html html5 css css3 svg javascript js dom mobile @@ -236,10 +238,14 @@ sub saytitlecol { } $row->{title}; print '
'; s/\.?$/./, print "

$_

" for map { ref $_ ? @$_ : $_ || () } - Entity($row->{description}), formathtml($row->{notes}); # sic + Entity($row->{description}), + map { s/\s*\n/\n
/g; $_ } $row->{notes}; printf 'Resources: %s.', join(', ', map { sprintf '%s', EscapeHTML($_->{url}), $_->{title} } @$_) for grep { @$_ } $row->{links} // (); + printf '
Parent feature: %s.', join(', ', map { + sprintf '%s', EscapeHTML("#$_"), $caniuse->{data}->{$_}->{title} + } $_) for $row->{parent} || (); print '
'; } @@ -310,16 +316,6 @@ for my $id (sort { say ''; say ''; -sub formathtml { - my $ref = defined wantarray ? [@_] : \@_; - for (@$ref) { - s/& (?!\w)/&/gx; - s/< \s/</gx; - s/\n\K\n/
/g; - } - return @$ref; -} - sub paddedver { # normalised version number comparable as string (cmp) shift =~ /(?:.*-|^)(\d*)(.*)/;