X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=themes%2Fdefault.sh;fp=themes%2Fdefault.sh;h=5e38ee4583f743c9240464022648d864bee9aeaf;hb=35c700335c55a0819e3582a77211e3cb280f48fe;hp=85febeef60e7274563a2e62c0d59698e7088bb12;hpb=9093deb385bb32eddd5149cd68c3eecb65a9c415;p=shellwiki diff --git a/themes/default.sh b/themes/default.sh index 85febee..5e38ee4 100755 --- a/themes/default.sh +++ b/themes/default.sh @@ -131,6 +131,25 @@ theme_editor(){ theme_revisions(){ theme_page "$@"; } +theme_search(){ + local words="$*" + # STDIN: read result pages line by line + + theme_page - <<-EOF +
+

$([ "$words" ] && _ "Search results" || _ "Search" )

+
+ +
+
    + $( while read p; do + printf '
  1. %s
  2. ' "$(URL "$p")" "$(HTML "$p")" + done) +
+
+ EOF +} + theme_attachments(){ local page="$1" title title="${page%/}"; title="${title##*/}"