codec: page intro from format data
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 2 Nov 2021 02:52:55 +0000 (03:52 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 9 Nov 2021 03:14:15 +0000 (04:14 +0100)
codec-audio.inc.pl
codec-image.inc.pl
codec.plp

index 4d14f9b10e97d45116601985f8617b6935645459..4239b2fca6c1d0f12429f26ccf60f28c73294df2 100644 (file)
@@ -1,5 +1,6 @@
 use utf8;
 +{
+intro => 'Comparison of audio compression formats.',
 codec => {
        mp3 => {
                name => '<abbr title="MPEG-1 Audio Layer III">MP3</abbr>',
index f9a544c55ef9251b29f1981b9232887a3d6edc4f..21ce9a1fc4bb7ff4b2aa5c9e6ef55381993dae71 100644 (file)
@@ -1,5 +1,6 @@
 use utf8;
 +{
+intro => 'Comparison of image encoding formats, based on <a href="https://cloudinary.com/blog/one_pixel_is_worth_three_thousand_words">Cloudinary</a> research.',
 codec => {
        jpeg => {
                name => '<abbr title="Joint Photographic Experts Group">JPEG</abbr>',
index 4251df9239cf9b95e16d585a21df325ecad57f51..1ce4611708149f5974fa005e9edcb4dd4121ded6 100644 (file)
--- a/codec.plp
+++ b/codec.plp
@@ -25,6 +25,7 @@ $info and %{$info} > 1
        or Abort("Requested codec type <q>$page</q> not available", '404 request not found', $@ // $!);
 
 say "<h1>\u$title</h1>";
+say "<p>$_</p>" for $info->{intro} // ();
 
 my %BOOLSCORE = (y => [5, '✔'], n => [1, '✘'], 0 => [0, 'n/a']);
 :>