summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/index.php b/index.php
index be36f66..7418c15 100644
--- a/index.php
+++ b/index.php
@@ -130,14 +130,18 @@ li:target {
?>
</ol>
<?php
- if ($depth > $more && $depth <= $max_more) {
+ $first_more = TRUE;
+ while ($depth <= $max_more) {
?>
<a<?=$anchor?> class="more" href="?<?=http_build_query([
'idx' => index_name($selected_index),
'q' => $q,
'more' => $depth,
- ])?>#more">MORE</a>
+ ])?><?= $first_more ? "#more" : "" ?>"><?= $first_more ? "MORE" : $depth ?></a>
<?php
+ $anchor = "";
+ $depth++;
+ $first_more = FALSE;
}
} else {
?>