5 printf '[a .list .dir href="%s" %s]' \
11 printf '[div .list .file [a href="%s" [img src="%s?a=thumbnail"] %s]]' \
12 "$file" "$file" "$file"
17 find ./ -type d -mindepth 1 -maxdepth 1 \
18 -exec stat -c '%Y %n' '{}' +
20 | { [ "$(GET o)" = Date ] && sort -rn || sort -k 2; } \
26 find ./ -type f -mindepth 1 -maxdepth 1 \
27 -exec stat -c '%Y %n' "${f#./}" '{}' +
29 | { [ "$(GET o)" = Date ] && sort -rn || sort -k 2; } \
36 -exec stat -c '%Y %n' '{}' +
38 | { [ "$(GET o)" = Date ] && sort -rn || sort -k 2; } \
42 printf 'Content-Type: text/html;charset=utf-8\r\n\r\n'
44 "$_EXEC/cgilite/html-sh.sed" <<-EOF
46 [html [head [title Listing]
47 [link rel=stylesheet href="/style.css" ]
50 [input type=checkbox #t_prefs .toggle ][label for=t_prefs ⚙]
52 $(if [ $(COOKIE mode) = index ]; then
53 list_tree |while read -r file; do list_file "$file"; done
55 list_dirs |while read -r dir; do list_dir "$dir"; done
57 list_files |while read -r file; do list_file "$file"; done