From 04ce1ef4e0778b6387739a4ba5b56fdbe90d0567 Mon Sep 17 00:00:00 2001 From: Valerie R Young Date: Thu, 21 Jul 2016 14:23:26 -0400 Subject: reproducible debian: decouple navigation and page writing logic Decoupling the navigation and page writing logic made it easier to do the following: - fix a bug introduced by adding headers at the top of the mainbody div (fixed in this commit) - make package pages to use the same structure as all other pages that contain a left navigation (to do in future) Signed-off-by: Holger Levsen --- bin/reproducible_html_indexes.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'bin/reproducible_html_indexes.py') diff --git a/bin/reproducible_html_indexes.py b/bin/reproducible_html_indexes.py index a46f62a6..c704c9ca 100755 --- a/bin/reproducible_html_indexes.py +++ b/bin/reproducible_html_indexes.py @@ -526,16 +526,22 @@ def build_page(page, suite=None, arch=None): if gpage: destfile = DEBIAN_BASE + '/index_' + page + '.html' desturl = DEBIAN_URL + '/index_' + page + '.html' - suite = defaultsuite # used for the links generated by write_html_page + suite = defaultsuite # used for the links in create_main_navigation else: - destfile = DEBIAN_BASE + '/' + suite + '/' + arch + '/index_' + page + '.html' + destfile = DEBIAN_BASE + '/' + suite + '/' + arch + '/index_' + \ + page + '.html' desturl = DEBIAN_URL + '/' + suite + '/' + arch + '/index_' + \ page + '.html' suite_arch_nav_template = DEBIAN_URI + '/{{suite}}/{{arch}}/index_' + \ page + '.html' - write_html_page(title=title, body=html, destfile=destfile, suite=suite, - arch=arch, style_note=True, displayed_page=page, - suite_arch_nav_template=suite_arch_nav_template) + left_nav_html = create_main_navigation( + suite=suite, + arch=arch, + displayed_page=page, + suite_arch_nav_template=suite_arch_nav_template, + ) + write_html_page(title=title, body=html, destfile=destfile, style_note=True, + left_nav_html=left_nav_html) log.info('"' + title + '" now available at ' + desturl) -- cgit v1.2.3-70-g09d2