git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sample: make rule to checkout text data
[sheet.git]
/
common.inc.plp
diff --git
a/common.inc.plp
b/common.inc.plp
index 898e8bbcd5dd24774d6a32f166f14dae0def9fee..d282f091ca452598092ca2b7034c691f5d57ccbb 100644
(file)
--- a/
common.inc.plp
+++ b/
common.inc.plp
@@
-78,7
+78,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
3
", $_
+ $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "/$_.css?1.1
4
", $_
) } @avail;
}
) } @avail;
}
@@
-133,6
+133,7
@@
sub Html {
# default fallbacks
$meta->{stylesheet} ||= [qw( light dark circus mono red )];
$meta->{charset} ||= 'utf-8';
# default fallbacks
$meta->{stylesheet} ||= [qw( light dark circus mono red )];
$meta->{charset} ||= 'utf-8';
+ $meta->{lang} ||= 'en';
# convert options to arrays
ref $_ eq 'ARRAY' or $_ = [$_]
# convert options to arrays
ref $_ eq 'ARRAY' or $_ = [$_]
@@
-141,6
+142,7
@@
sub Html {
# document headers before output
$header{content_type} = "text/html; charset=$meta->{charset}"
unless $PLP::sentheaders;
# document headers before output
$header{content_type} = "text/html; charset=$meta->{charset}"
unless $PLP::sentheaders;
+ exit if $ENV{REQUEST_METHOD} eq 'HEAD';
unshift @{ $meta->{raw} }, stylesheet($meta->{stylesheet});
push @{ $meta->{raw} }, (
unshift @{ $meta->{raw} }, stylesheet($meta->{stylesheet});
push @{ $meta->{raw} }, (
@@
-161,7
+163,7
@@
sub Html {
PLP_START {
# leading output
say '<!DOCTYPE html>';
PLP_START {
# leading output
say '<!DOCTYPE html>';
- say
'<html lang="en">'
;
+ say
qq(<html lang="$meta->{lang}">)
;
say '';
say '<head>';
say sprintf '<meta http-equiv="content-type" content="%s">', $_
say '';
say '<head>';
say sprintf '<meta http-equiv="content-type" content="%s">', $_