summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindex.cgi5
-rw-r--r--themes/html5/index.tmpl12
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);
})();
</script>
@@ -96,7 +96,7 @@
</section>
<section id="tagcloud">
- <h3>Tag cloud</h3>
+ <h3>Tag Cloud</h3>
<ul>
<TMPL_LOOP name="tagcloud">
<li class="tagcloud_<TMPL_VAR name="scale">"><a href="/Tags/<TMPL_VAR name="tag">"><TMPL_VAR name="tag"></a></li>
@@ -165,7 +165,7 @@
wrote in to say &hellip;
</p>
</header>
- <q><TMPL_VAR name="comment"></q>
+ <blockquote><TMPL_VAR name="comment"></blockquote>
</article>
</TMPL_LOOP>
</article>
@@ -174,15 +174,13 @@
<TMPL_IF name="error">
<article id="error">
- <h3>Error</h3>
- <p><TMPL_VAR name="error"></p>
+ <h3><TMPL_VAR name="error"></h3>
</article>
</TMPL_IF>
<TMPL_IF name="message">
<article id="message">
- <h3>Ok</h3>
- <p><TMPL_VAR name="message"></p>
+ <h3><TMPL_VAR name="message"></h3>
</article>
</TMPL_IF>