CHECK(){ [ "$1" = "$2" ] && printf checked; }
+w_bookmarks(){
+ local name link bm
+ bm="$_DATA/.index/bookmarks"
+
+ printf '[form #bookmarks action=?a=bookmarks method=POST
+ [a href="#" X]
+ [hidden "ref" "%s"]
+ ' "$w_refuri"
+
+ name="$(grep -m1 -F " $(STRING "${REQUEST_URI}")" "$bm")"
+ printf '[hidden "link" "%s"][input name="name" value="%s"]' \
+ "$(HTML "$link")" "$(HTML "$name")"
+
+ sort "$bm" |while read -r name link; do
+ name="$(UNSTRING "$name")"
+ link="$(UNSTRING "$link")"
+ if [ "$link" != "$REQUEST_URI" ]; then
+ printf '[a href="%s"\n%s]' "$(HTML "$link")" "$(HTML "$name")"
+ fi
+ done
+ printf ']'
+}
+
w_search(){
printf '
[form #search method=GET action=?