From b624a2a9579d6340f9a8b1f8342eec86775ec84f Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 20 Apr 2013 01:30:14 +0000 Subject: fix tag parser, theme cleanup --- index.cgi | 5 +++-- themes/html5/index.tmpl | 12 +++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/index.cgi b/index.cgi index e9e2c55..e61d166 100755 --- a/index.cgi +++ b/index.cgi @@ -76,9 +76,9 @@ if ( $path =~ m/^\/(\d{4})\/(\d{2})\/([^\/]+)$/ ) { @args = ( year => $1, month => $2 ); } elsif ( $path =~ m/^\/(\d{4})\/?$/ ) { @args = ( year => $1 ); -} elsif ( $path =~ m/^\/Page\/(\d+)$/ ) { +} elsif ( $path =~ m/^\/[Pp]age\/(\d+)$/ ) { @args = ( page => $1 ); -} elsif ( $path =~ m/^\/Tags\/(\w+)$/ ) { +} elsif ( $path =~ m/^\/[Tt]ags\/([\w_-]+)$/ ) { @args = ( tag => $1 ); } elsif ( $path =~ m/^\/rss\.xml$/ ) { $output = \&output_rss; @@ -125,6 +125,7 @@ sub output_article { } } else { $template->param( error => $page_not_found_error ); + $template->param( notfound => 1 ); @status = ( -status => '404 Not Found' ); } print $cgi->header(@status), $template->output; diff --git a/themes/html5/index.tmpl b/themes/html5/index.tmpl index d2bb188..09a6358 100644 --- a/themes/html5/index.tmpl +++ b/themes/html5/index.tmpl @@ -20,7 +20,7 @@ (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + ga.src = '//' + ('https:' == document.location.protocol ? 'ssl' : 'www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); @@ -96,7 +96,7 @@
-

Tag cloud

+

Tag Cloud