From c4a6116722f7798967a8424cb47aad2a319e7a9c Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Sun, 15 Sep 2013 00:42:20 +1000 Subject: [PATCH] Optionally show page navigation bar at the top too. --- inc/config.php | 6 ++++++ stylesheets/style.css | 4 ++++ templates/index.html | 22 ++++++++++++++++++++-- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/inc/config.php b/inc/config.php index 897c8a42..90e66a2c 100644 --- a/inc/config.php +++ b/inc/config.php @@ -797,6 +797,12 @@ // Whether or not to put brackets around the whole board list $config['boardlist_wrap_bracket'] = true; + // Show page navigation links at the top as well. + $config['page_nav_top'] = false; + + // Show "Catalog" link in page navigation. Use with the Catalog theme. + // $config['catalog_link'] = 'catalog.html'; + // Board categories. Only used in the "Categories" theme. // $config['categories'] = array( // 'Group Name' => array('a', 'b', 'c'), diff --git a/stylesheets/style.css b/stylesheets/style.css index c1725e35..10ddb8e8 100644 --- a/stylesheets/style.css +++ b/stylesheets/style.css @@ -319,6 +319,10 @@ div.pages { border-right: 1px solid #B7C5D9; border-bottom: 1px solid #B7C5D9; } +div.pages.top { + display: inline-block; + padding: 4px 8px; +} div.pages a.selected { color: black; font-weight: bolder; diff --git a/templates/index.html b/templates/index.html index d5e6cd18..0b4fed8d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -25,6 +25,17 @@ {% include 'post_form.html' %} + {% if config.page_nav_top %} +
+ {% for page in pages %} + [{{ page.num }}]{% if loop.last %} {% endif %} + {% endfor %} {{ btn.next }} + {% if config.catalog_link %} + | Catalog + {% endif %} +
+ {% endif %} + {% if config.global_message %}
{{ config.global_message }}
{% endif %}
@@ -33,9 +44,16 @@ {{ body }} {% include 'report_delete.html' %}
-
{{ btn.prev }} {% for page in pages %} + +
+ {{ btn.prev }} {% for page in pages %} [{{ page.num }}]{% if loop.last %} {% endif %} - {% endfor %} {{ btn.next }}
+ {% endfor %} {{ btn.next }} + {% if config.catalog_link %} + | Catalog + {% endif %} +
+ {{ boardlist.bottom }}