]> git.plutz.net Git - serve0/commitdiff
yield menu before generting item list
authorpaul <paul@plutz.net>
Sun, 16 Oct 2016 15:55:45 +0000 (15:55 +0000)
committerpaul <paul@plutz.net>
Sun, 16 Oct 2016 15:55:45 +0000 (15:55 +0000)
svn path=/trunk/; revision=154

templates/list.html.sh

index 21dfd1189a976296d0b7ad170e893577e94018b5..e6552fdcd95e9aa7417a375a7254d1bafab86c0c 100755 (executable)
 # You should have received a copy of the GNU Affero General Public License
 # along with Serve0  If not, see <http://www.gnu.org/licenses/>. 
 
-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 '<a class="%s" href="?%spn=%s">%s</a>\n' "$class" "$page_link" "$plink" "$pn"
-done
-)"
-
 cat <<EOF
 
   <input type=radio name=topmenu id=btn_search checked><label for=btn_search>Search</label>
@@ -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 '<a class="%s" href="?%spn=%s">%s</a>\n' "$class" "$page_link" "$plink" "$pn"
+  done
+  )"
+
 cat <<EOF
     </ul>
     $(. $_EXEC/templates/tagger.html.sh)