added google search

master
muflax 2012-02-06 05:58:19 +01:00
parent db57f131b2
commit 5555ecb943
3 changed files with 27 additions and 10 deletions

View File

@ -1,11 +1,15 @@
---
title: 404
non_cognitive: true
no_comments: true
---
*when candles turn to ashes...*
Page not found. You may have followed an old link. The content is probably still
there, in some form. Have a look at [the homepage][Lies and Wonderland].
there, in some form. Have a look at [the homepage][Lies and Wonderland]. Or search the site:
<%= google_search %>
<div align="right" markdown="span">*...tears shall stop*</div>
*...tears shall stop*

View File

@ -17,6 +17,8 @@ Articles are sorted by latest major modification. You can see the [Changelog]
for any recent changes or subscribe to the [RSS Feed][RSS]. You can also read
the [Twitter][] feed or my [Blog][] for raw thought in smaller chunks.
<%= google_search %>
<%= category :morality %>
<%= category :reflections %>
<%= category :religion %>

View File

@ -28,14 +28,6 @@ class Nanoc3::Item
end
end
def category name
render "category", :category => name
end
def route_unchanged
item.identifier.chop + '.' + item[:extension]
end
class Nanoc3::Site
# only articles that actually get printed
attr_reader :printed_items
@ -45,3 +37,22 @@ class Nanoc3::Site
end
end
def category name
render "category", :category => name
end
def route_unchanged
item.identifier.chop + '.' + item[:extension]
end
def google_search
<<EOF
<div align="center"><form method="get" action="http://www.google.com/search">
<input type="text" name="q" maxlength="255" />
<input type="submit" value="Google Search" />
<input type="hidden" name="domains" value="muflax.com" />
<input style="visibility:hidden" type="radio" name="sitesearch" value="muflax.com" checked="checked" />
</form></div>
EOF
end