Almost-minimal filesystem based blog.
 
 
 

99 lines
2.7 KiB

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>${title_prefix}::${title}</title>
<meta name="keywords" content="brennen, bearnes, journal, poetry,
wiki, perl, linux, debian, free software, beer, colorado,
boulder, nebraska, kansas, great plains, lincoln, salina, laurel,
ultimate frisbee, education, public domain, photography,
history, anarchism, comics, bluegrass"
/>
<meta name="description" content="Writing by ${author}." />
<meta name="author" content="${author}" />
<link rel="alternate" type="application/atom+xml"
title="p1k3 atom feed"
href="${url_root}${feed_alias}" />
<link rel="feed" type="application/atom+xml"
title="p1k3 atom feed"
href="${url_root}${feed_alias}" />
<link rel="stylesheet" href="${stylesheet_url}" />
<link rel="icon" type="image/x-png" href="${favicon_url}" />
</head>
<body>
<perl>
return qq{<div id="entries">\n\n} if $self->title() eq 'new';
</perl>
<h1>p1k3::${title}</h1>
<perl>
return $self->link_bar(qw(chapbook hack));
</perl>
${content}
<perl>
my $output;
my $rights = '<p class="rights">All original content on p1k3, unless otherwise noted, is
released to the public domain.</p>';
if ($self->title eq 'new') {
my @headers = dir_list('/home/bbearnes/p1k3.com/imgs/header', 'alpha',
'\.(jpg|png)$');
my $header_image = $headers[rand @headers];
my %translation = (
achewood => 'Achewood',
ct => 'Crooked Timber',
dc => 'Dresden Codak',
ocms => 'Old Crow Medicine Show',
wp => 'Wikipedia',
xkcd => 'xkcd',
acephalous => 'Acephalous',
sparkfun => 'SparkFun Electronics',
);
my $shorthand = join '|', keys %translation;
my $LinkDump = $self->wala->print_page('LinkDump');
$LinkDump =~ s{<p>($shorthand):}
{<p><img src="/imgs/favicons/$1.png" height="16" width="16" title="$translation{$1}" style="vertical-align: middle;" />}sg;
return <<"END_HTML";
</div> <!-- end of entries -->
<div class="linkdump" id="linkdump">
<p class="centerpiece">
<img src="/imgs/header/$header_image" alt="" id="header_image"/>
</p>
<h3 style="margin-bottom: .5em;"><a href="/wala/">wala</a>::<a href="/wala/wala.pl?LinkDump">LinkDump</a>
(<a href="/wala/wala.pl?RecentChanges">changes</a>)
</h3>
$LinkDump
</div> <!-- end of linkdump -->
$rights
END_HTML
} else {
return "\n$rights\n";
}
</perl>
</body>
</html>