Almost-minimal filesystem based blog.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

109 lines
2.9 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>p1k3::${title}</title>
<meta name="keywords" content="brennen, bearnes, journal, poetry,
wiki, perl, linux, debian, free software, beer, colorado,
boulder, nebraska, kansas, midwest, lincoln, salina, laurel, UNL,
ultimate frisbee, cornfed, education, public domain, photography,
history, anarchism"
/>
<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>
if ($self->title() eq 'new') {
return qq{<div id="entries">\n\n};
}
return '';
</perl>
<h1 style="display: none;">${title}</h1>
<perl>
# linkbar
my $title = $self->title;
my $output;
my (%description) =
(
new => 'newest entries',
all => 'all entries',
chapbook => 'unrequired poetry',
hack => 'code and such',
1997 => 'entries for 1997',
1998 => 'entries for 1998',
1999 => 'entries for 1999',
2000 => 'entries for 2000',
2001 => 'entries for 2001',
2002 => 'entries for 2001',
2003 => 'entries for 2003',
2004 => 'entries for 2004',
2005 => 'entries for 2005',
2006 => 'entries for 2006',
2007 => 'entries for 2007',
2008 => 'entries for 2008',
feed => 'an Atom feed of new entries',
);
my @years = qw(2008 2007 2006 2005 2004 2003 2002 2001 2000 1999 1998 1997);
# This makes the short list of years in the title context sensitive:
if ( my ($title_year) = $title =~ m/^([0-9]{4})/ ) {
# We have a match.
if ($title_year == $years[0] ) { $title_year--; }
elsif ($title_year == $years[-1]) { $title_year++; }
if (grep { $title_year eq $_ } @years) {
my $prev = $title_year - 1;
my $next = $title_year + 1;
@years = grep { m/^($prev|$title_year|$next)$/ } @years;
}
} else {
@years = @years[0..2];
}
my @linklist = ( qw(new all), @years, qw(chapbook hack feed) );
foreach my $link (@linklist) {
if ($title ne $link) {
my $href = $self->url_root . $link;
if ($link eq 'new') {
$href = $self->url_root;
}
$output .= a("href: $href", "title: $description{$link}", $link) . " \n";
} else {
$output .= qq{<strong><span title="$description{$link}">$link</span></strong> \n};
}
}
return p($output);
</perl>