svn path=/trunk/; revision=131
text-decoration: none;
}
+.pagination_nav a.previous,
+.pagination_nav a.current,
+.pagination_nav a.next { display: inline; }
.pagination_nav a.current {
- display: inline;
color: #F66;
font-weight: bold;
}
.pagination_nav:hover {
position: fixed;
+ padding-top: 2.5em;
bottom: auto;
text-align: right;
background-color: #333;
<label>Page:</label>
EOF
+ pages="$(
seq 1 $(pagecount) \
| while read pn; do
plink="$(($pn * $pagesize - $pagesize + 1))"
- printf '<a %s href="?%spn=%s">%s</a>\n' "$([ $plink = $page ] && printf class=current)" "$page_link" "$plink" "$pn"
+
+ 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
+ )"
+ printf %s "$pages"
cat <<EOF
</div>
<div class="pagination_nav">
<label>Page:</label>
- $(seq 1 $(pagecount) \
- | while read pn; do
- plink="$(($pn * $pagesize - $pagesize + 1))"
- printf '<a %s href="?%spn=%s">%s</a>\n' "$([ $plink = $page ] && printf class=current)" "$page_link" "$plink" "$pn"
- done
- )
+ ${pages}
</div>
</div>