From: Paul Hänsch Date: Tue, 21 Dec 2021 20:00:21 +0000 (+0100) Subject: show group listings in video view X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=dee510eeafc877736c968f16651646f671a39245;p=serve0 show group listings in video view --- diff --git a/style.css b/style.css index 391a6da..7f6f2bb 100644 --- a/style.css +++ b/style.css @@ -277,6 +277,10 @@ body#view .tag { border-radius: 1pt; } +body#view .itemlist { + margin-top: 2em; +} + /* ====== SCALE BLOCK ELEMENTS ====== */ diff --git a/view.sh b/view.sh index 094337e..1566a82 100755 --- a/view.sh +++ b/view.sh @@ -36,6 +36,31 @@ printf 'Content-Type: text/html;charset=utf-8\r\n\r\n' printf %s\\n "$META_TAGS" |tr , \\n |while read tag; do [ "$tag" ] && printf ' [span .tag . %s]\n' "$(HTML "${tag#-}")" done + + if [ "${META_GROUP}" ]; then + printf '[div .itemlist' + list_meta "$_DATA/${ITEM%/*}/.index/meta" \ + | grep -F "${CR} ${META_GROUP}" \ + | while read_meta; do + file="$(printf %s\\n "$_DATA/${META_NAME}".*)" + [ "/${file#${_DATA}/}" = "$ITEM" ] && continue + name="$(HTML "/${file#${_DATA}/}")" + + printf '[div .list .file + [a href="%s" [img src="%s?a=thumbnail"]][label . %s] + [span .time %i:%02imin] [span .dim %ix%i] %s + ]' \ + "$name" "$name" "${name##/}" \ + "$((META_LENGTH / 60))" "$((META_LENGTH % 60))" \ + "$META_WIDTH" "$META_HEIGHT" \ + "$(printf %s\\n "${META_TAGS}" \ + | sed -r 's;^;,;; s;,+;,;g; s;,$;;; + :X s;,-?([^,]+)(,|$); [span .tag\n \1]\2;; tX;' + )" + done + printf ']' + fi + printf ' [div #editing [form method=POST action="/?a=multitag"