diff options
author | Valerie R Young <spectranaut@riseup.net> | 2016-07-21 14:23:26 -0400 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-07-24 11:46:03 -0400 |
commit | 04ce1ef4e0778b6387739a4ba5b56fdbe90d0567 (patch) | |
tree | 8757848eaf8cd5f3d43c8f0871551fdaabddb251 /bin/reproducible_html_indexes.py | |
parent | a93cd8dbb2de5474ec20b728f09395575d81cac2 (diff) | |
download | jenkins.debian.net-04ce1ef4e0778b6387739a4ba5b56fdbe90d0567.tar.xz |
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 <holger@layer-acht.org>
Diffstat (limited to 'bin/reproducible_html_indexes.py')
-rwxr-xr-x | bin/reproducible_html_indexes.py | 16 |
1 files changed, 11 insertions, 5 deletions
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) |