word: localised browser hyphenation instead of poor poc
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 6 Jun 2022 16:54:35 +0000 (18:54 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 11 Jul 2022 02:02:34 +0000 (04:02 +0200)
base.css
word.plp

index 31429aa7067158562ec6a73070bf5c394d30c420..34a0efe0f1c69e011166a5e8f43e25e304c3e08a 100644 (file)
--- a/base.css
+++ b/base.css
@@ -722,6 +722,7 @@ figure img {
 .gallery figure {
        overflow: hidden;
        box-sizing: border-box;
+       hyphens: auto;
 }
 .gallery figcaption > small {
        display: inline-block;
index a3be917e1fcbe1eda518bccd21a04e623c9713f5..909c6fdaf7da57e7120ed323cf8a5d07e14b284e 100644 (file)
--- a/word.plp
+++ b/word.plp
@@ -30,6 +30,7 @@ my $limit = $get{v} // (exists $get{v} ? 5 : 3);
 Html({
        title => 'words cheat sheet',
        version => '1.0',
+       lang => $lang,
        description => "Visual words",
        keywords => [qw'
                language
@@ -78,7 +79,6 @@ my $table = Data($wordlistbase);
 sub showimg {
        my ($id, $name) = @_;
        my ($imgname) = $name =~ m{^([^/]+)};
-       $name =~ s/\w{4} [^aoeuiyc\W] [rl]?+ \K (?= [^aoeuiy\W] [rl]? [aoeuiy] \w)/&shy;/gx;
        ($name, my @morenames) = split m{/}, $name;
        $name =~ s{\( ([^/]+) \)}{<small>$1</small>}x;
        $name .= " <small>($_)</small>" for @morenames;