From: paul Date: Sun, 16 Oct 2016 15:55:45 +0000 (+0000) Subject: yield menu before generting item list X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=23d3725c05d053fc469b73625fa21991dab95dc9;p=serve0 yield menu before generting item list svn path=/trunk/; revision=154 --- diff --git a/templates/list.html.sh b/templates/list.html.sh index 21dfd11..e6552fd 100755 --- a/templates/list.html.sh +++ b/templates/list.html.sh @@ -15,22 +15,6 @@ # You should have received a copy of the GNU Affero General Public License # along with Serve0 If not, see . -pages="$( -seq 1 $(pagecount) \ -| while read pn; do - plink="$(($pn * $pagesize - $pagesize + 1))" - - case "$plink" in - $(($page - $pagesize))) class=previous;; - $page) class=current;; - $(($page + $pagesize))) class=next;; - * ) class='';; - esac - - printf '%s\n' "$class" "$page_link" "$plink" "$pn" -done -)" - cat < @@ -73,6 +57,22 @@ EOF thumblist + pages="$( + seq 1 $(pagecount) \ + | while read pn; do + plink="$(($pn * $pagesize - $pagesize + 1))" + + case "$plink" in + $(($page - $pagesize))) class=previous;; + $page) class=current;; + $(($page + $pagesize))) class=next;; + * ) class='';; + esac + + printf '%s\n' "$class" "$page_link" "$plink" "$pn" + done + )" + cat < $(. $_EXEC/templates/tagger.html.sh)