git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
keyboard/altgr/macos: describe exceptions in nl language variant
[sheet.git]
/
common.inc.plp
diff --git
a/common.inc.plp
b/common.inc.plp
index 9d341284e1ba20869e2634d695c23ace8f52c6c7..a634733cba704de18de8e56605a78a796f8109c9 100644
(file)
--- a/
common.inc.plp
+++ b/
common.inc.plp
@@
-76,7
+76,7
@@
sub stylesheet {
return map { sprintf(
'<link rel="%s" type="text/css" media="all" href="%s" title="%s">',
return map { sprintf(
'<link rel="%s" type="text/css" media="all" href="%s" title="%s">',
- $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "/$_.css?1.1
4
", $_
+ $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "/$_.css?1.1
8
", $_
) } @avail;
}
) } @avail;
}
@@
-106,7
+106,7
@@
sub Data {
local $/; # slurp
return JSON::decode_json(readline $cache);
};
local $/; # slurp
return JSON::decode_json(readline $cache);
};
- if ($
! or $
@ or !@data or !$data[0]) {
+ if ($@ or !@data or !$data[0]) {
die ['Table data not found', $@ || $!];
}
if (@data == 1 and ref $data[0] eq 'HASH' and not %{$data[0]}) {
die ['Table data not found', $@ || $!];
}
if (@data == 1 and ref $data[0] eq 'HASH' and not %{$data[0]}) {
@@
-157,7
+157,8
@@
sub Html {
my ($file) = $ENV{SCRIPT_FILENAME} =~ m{ ([^/]+) \.plp$ }x;
my ($file) = $ENV{SCRIPT_FILENAME} =~ m{ ([^/]+) \.plp$ }x;
- if (my $url = $meta->{canonical} // "/$file/$Request") {
+ $meta->{canonical} //= "/$file" . ($Request ne '' && "/$Request");
+ if (my $url = $meta->{canonical}) {
$url = "https://sheet.shiar.nl$url";
push @{ $meta->{raw} }, qq(<link rel="canonical" href="$url" />);
}
$url = "https://sheet.shiar.nl$url";
push @{ $meta->{raw} }, qq(<link rel="canonical" href="$url" />);
}