theme_revisions(){ theme_page "$@"; }
+theme_search(){
+ local words="$*"
+ # STDIN: read result pages line by line
+
+ theme_page - <<-EOF
+ <article>
+ <h1>$([ "$words" ] && _ "Search results" || _ "Search" )</h1>
+ <form method=GET>
+ <input class="search" name="q" value="$(HTML $words)"><button class="search" type="submit">$(_ Search)</button>
+ </form>
+ <ol class="searchresults">
+ $( while read p; do
+ printf '<li><a href="%s">%s</a></li>' "$(URL "$p")" "$(HTML "$p")"
+ done)
+ </ol>
+ </article>
+ EOF
+}
+
theme_attachments(){
local page="$1" title
title="${page%/}"; title="${title##*/}"