<(common.inc.plp)><:
- our $VERSION = 'v1.0';
- my $source = $ENV{PATH_INFO};
- $source =~ s{^/}{};
+my $source = $ENV{PATH_INFO};
+$source =~ s{^/}{};
-:><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
+Html({
+ title => "$source source code",
+ version => 'v1.0',
+ description => !$source ? 'Index of source files for this site.' : [
+ "Source code of the $source file at this site,",
+ "with syntax highlighted and references linked."
+ ],
+ keywords => [qw'
+ sheet cheat source code perl plp html agpl
+ '],
+ stylesheet => [qw'light dark mono red'],
+});
-<head>
-<meta http-equiv="content-type" content="<:= $header{content_type} :>">
-<title><:= $source :> source code</title>
-<meta name="description" content="<:=
- $source ? "Source code of local $source file"
- . ", with syntax highlighted and references linked."
- : 'Index of source files for this site.'
-:>">
-<meta name="keywords" content="sheet, cheat, source, code, perl, plp, html, agpl">
-<:= stylesheet(qw'light dark mono red') :>
-</head>
-
-<body id="source">
-<:
+print "\n";
if (not $source) {
print "<h1>Source files</h1>";
else {
print "<pre>\n", EscapeHTML(ReadFile($source)), "</pre>\n";
}
+
+ print "\n";
}
-:>
-<p class="footer">
- <a href="/" rel="home">sheet.shiar.nl</a>/source.<a href="/source/source.plp"
- rel="code" title="Written in Perl">plp</a>
- <a href="http://git.shiar.nl/sheet.git/history/HEAD:/source.plp"
- rel="vcs-git" title="Git repository"><:= $VERSION :></a>
- created by <a href="http://shiar.nl/" rel="author">Shiar</a> •
- <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" rel="copyright"
- title="Licensed under the GNU Affero General Public License, version 3">AGPLv3</a>
-</p>
-</html>