X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=themes%2Fdefault.sh;h=eb3d537442c41f90e4202ad47029e186fb6f38da;hb=3c949f9f02cddc9d1cd30174342aae1d58175999;hp=85febeef60e7274563a2e62c0d59698e7088bb12;hpb=7ee49ea6a4595386680b9a19ae75108068b93fb0;p=shellwiki diff --git a/themes/default.sh b/themes/default.sh index 85febee..eb3d537 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##*/}"