diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-08-21 22:29:50 +0000 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-08-22 12:07:00 +0200 |
commit | e7d74461fd32f2da2396dd4c31c8bd81f5d3009a (patch) | |
tree | 1fb23141f7e69c8bec47fb7860224a14b03aa980 /bin/reproducible_common.py | |
parent | e7ee301790c725eb8a5f65b982787af89155d349 (diff) | |
download | jenkins.debian.net-e7d74461fd32f2da2396dd4c31c8bd81f5d3009a.tar.xz |
reproducible: completely refactor the package pages. Really thanks to Ulrike Uhlig <u@451f.org> for the great help!
Diffstat (limited to 'bin/reproducible_common.py')
-rwxr-xr-x | bin/reproducible_common.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py index 1616508f..0fc45218 100755 --- a/bin/reproducible_common.py +++ b/bin/reproducible_common.py @@ -120,11 +120,12 @@ tab = ' ' html_header = Template("""<!DOCTYPE html> <html> <head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta name="viewport" content="width=device-width" /> <link href="/static/style.css" type="text/css" rel="stylesheet" /> <title>$page_title</title> </head> - <body>""") + <body $padding>""") html_footer = Template(""" <hr /> <p style="font-size:0.9em;"> @@ -143,7 +144,7 @@ html_footer = Template(""" html_head_page = Template((tab*2).join(""" <header> <h2>$page_title</h2> - <ul> + <nav><ul> <li>Have a look at:</li> <li> <a href="/$suite/$arch/index_reproducible.html" target="_parent"> @@ -188,7 +189,7 @@ $links <li><a href="/index_repositories.html">repositories overview</a></li> <li><a href="/reproducible.html">reproducible stats</a></li> <li><a href="https://wiki.debian.org/ReproducibleBuilds" target="_blank">wiki</a></li> - </ul> + </ul></nav> </header>""".splitlines(True))) @@ -278,10 +279,14 @@ def _gen_links(suite, arch): return html -def write_html_page(title, body, destfile, suite=defaultsuite, arch=defaultarch, noheader=False, style_note=False, noendpage=False): +def write_html_page(title, body, destfile, suite=defaultsuite, arch=defaultarch, noheader=False, style_note=False, noendpage=False, packages=False): now = datetime.utcnow().strftime('%Y-%m-%d %H:%M UTC') html = '' - html += html_header.substitute(page_title=title) + # this removes the padding if we are writing a package page + padding = 'class="wrapper"' if packages else '' + html += html_header.substitute( + page_title=title, + padding=padding) if not noheader: links = _gen_links(suite, arch) html += html_head_page.substitute( |