summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-03-19 00:10:06 +0100
committerMattia Rizzolo <mattia@mapreri.org>2015-03-19 00:49:11 +0100
commit20906b693faf91f88f62828fd9a31289b8047078 (patch)
tree3dd8cd313b14642235be1e2a27b45edefab721e2
parent43a7c9abaa62f4e1bc53dd819c9cc5d2a55db5b6 (diff)
downloadjenkins.debian.net-20906b693faf91f88f62828fd9a31289b8047078.tar.xz
reproducible: html_packages: add some <span class="avoidwrap"> to help the browser decide where to wrap the line, avoiding uglinesses like this word
-rwxr-xr-xbin/reproducible_html_packages.py29
-rw-r--r--userContent/static/style.css1
2 files changed, 19 insertions, 11 deletions
diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py
index 60dbed2e..9f4d2c79 100755
--- a/bin/reproducible_html_packages.py
+++ b/bin/reproducible_html_packages.py
@@ -15,16 +15,20 @@ html_package_page = Template((tab*2).join(("""
<table class="head">
<tr>
<td>
- <span style="font-size:1.2em;">$package</span> $suite: $version
+ <span class="avoidwrap">
+ <span style="font-size:1.2em;">$package</span> $suite: $version
$status
- <span style="font-size:0.9em;">$build_time:</span>
+ <span style="font-size:0.9em;">$build_time:</span>
+ </span>
+ <span class="avoidwrap">
$links
- <a href="https://tracker.debian.org/$package" target="main">PTS</a>
- <a href="https://bugs.debian.org/src:$package" target="main">BTS</a>
- <a href="https://sources.debian.net/src/$package/" target="main">sources</a>
- <a href="https://sources.debian.net/src/$package/$version/debian/" target="main">debian</a>/<!--
- -->{<a href="https://sources.debian.net/src/$package/$version/debian/changelog" target="main">changelog</a>,<!--
- --><a href="https://sources.debian.net/src/$package/$version/debian/rules" target="main">rules</a>}
+ <a href="https://tracker.debian.org/$package" target="main">PTS</a>
+ <a href="https://bugs.debian.org/src:$package" target="main">BTS</a>
+ <a href="https://sources.debian.net/src/$package/" target="main">sources</a>
+ <a href="https://sources.debian.net/src/$package/$version/debian/" target="main">debian</a>/<!--
+ -->{<a href="https://sources.debian.net/src/$package/$version/debian/changelog" target="main">changelog</a>,<!--
+ --><a href="https://sources.debian.net/src/$package/$version/debian/rules" target="main">rules</a>}
+ </span>
</td>
<td>
${suites_links}
@@ -161,14 +165,17 @@ def gen_suites_links(package, suite):
if len(results) == 1:
return html
for i in results:
- # i[0]: suite, i[1]: arch, i[3]: status (NULL if untested)
+ # i[0]: suite, i[1]: arch, i[2]: version, i[3]: status (NULL if untested)
if i[0] == suite:
continue
status = 'untested' if not i[3] else i[3]
+ html += '<span class="avoidwrap">\n' + tab
icon = '<img src="/static/{icon}" alt="{status}" title="{status}"/>\n'
html += icon.format(icon=join_status_icon(status)[1], status=status)
- html += '<a href="' + RB_PKG_URI + '/' + i[0] + '/' + i[1] + '/' + \
- str(package) + '.html" target="_parent">' + i[0] + ':' + i[2] + '</a> '
+ html += tab + '<a href="' + RB_PKG_URI + '/' + i[0] + '/' + i[1] + \
+ '/' + str(package) + '.html" target="_parent">' + i[0] + \
+ ':' + i[2] + '</a>\n'
+ html += '</span>\n'
return tab*5 + (tab*7).join(html.splitlines(True))
diff --git a/userContent/static/style.css b/userContent/static/style.css
index fb9b8192..d3803e28 100644
--- a/userContent/static/style.css
+++ b/userContent/static/style.css
@@ -304,6 +304,7 @@ span.red { color: red; }
span.purple { color: purple; }
span.green { color: green; }
span.dangerous { color: orange; }
+span.avoidwrap { display: inline-block; }
@media all and (max-width: 641px) {
body {