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

17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE html
  3. PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  4. "DTD/xhtml1-strict.dtd">
  5. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  6. <head>
  7. <title>p1k3::${title}</title>
  8. <meta name="keywords" content="brennen, bearnes, journal, poetry,
  9. wiki, perl, linux, debian, free software, beer, colorado,
  10. boulder, nebraska, kansas, midwest, lincoln, salina, laurel, UNL,
  11. ultimate frisbee, cornfed, education, public domain, photography,
  12. history, anarchism"
  13. />
  14. <meta name="description" content="Writing by ${author}." />
  15. <meta name="author" content="${author}" />
  16. <link rel="alternate" type="application/atom+xml"
  17. title="p1k3 atom feed"
  18. href="${url_root}${feed_alias}" />
  19. <link rel="feed" type="application/atom+xml"
  20. title="p1k3 atom feed"
  21. href="${url_root}${feed_alias}" />
  22. <link rel="stylesheet" href="${stylesheet_url}" />
  23. <link rel="icon" type="image/x-png" href="${favicon_url}" />
  24. </head>
  25. <body>
  26. <perl>
  27. if ($self->title() eq 'new') {
  28. return qq{<div id="entries">\n\n};
  29. }
  30. return '';
  31. </perl>
  32. <h1 style="display: none;">${title}</h1>
  33. <perl>
  34. # linkbar
  35. my $title = $self->title;
  36. my $output;
  37. my (%description) =
  38. (
  39. new => 'newest entries',
  40. all => 'all entries',
  41. chapbook => 'unrequired poetry',
  42. hack => 'code and such',
  43. 1997 => 'entries for 1997',
  44. 1998 => 'entries for 1998',
  45. 1999 => 'entries for 1999',
  46. 2000 => 'entries for 2000',
  47. 2001 => 'entries for 2001',
  48. 2002 => 'entries for 2001',
  49. 2003 => 'entries for 2003',
  50. 2004 => 'entries for 2004',
  51. 2005 => 'entries for 2005',
  52. 2006 => 'entries for 2006',
  53. 2007 => 'entries for 2007',
  54. 2008 => 'entries for 2008',
  55. feed => 'an Atom feed of new entries',
  56. );
  57. my @years = qw(2008 2007 2006 2005 2004 2003 2002 2001 2000 1999 1998 1997);
  58. # This makes the short list of years in the title context sensitive:
  59. if ( my ($title_year) = $title =~ m/^([0-9]{4})/ ) {
  60. # We have a match.
  61. if ($title_year == $years[0] ) { $title_year--; }
  62. elsif ($title_year == $years[-1]) { $title_year++; }
  63. if (grep { $title_year eq $_ } @years) {
  64. my $prev = $title_year - 1;
  65. my $next = $title_year + 1;
  66. @years = grep { m/^($prev|$title_year|$next)$/ } @years;
  67. }
  68. } else {
  69. @years = @years[0..2];
  70. }
  71. my @linklist = ( qw(new all), @years, qw(chapbook hack feed) );
  72. foreach my $link (@linklist) {
  73. if ($title ne $link) {
  74. my $href = $self->url_root . $link;
  75. if ($link eq 'new') {
  76. $href = $self->url_root;
  77. }
  78. $output .= a("href: $href", "title: $description{$link}", $link) . " \n";
  79. } else {
  80. $output .= qq{<strong><span title="$description{$link}">$link</span></strong> \n};
  81. }
  82. }
  83. return p($output);
  84. </perl>