[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: html_packages: add some <span class="avoidwrap"> to help the browser decide where to wrap the line, avoiding uglinesses like this word

Holger Levsen holger at moszumanska.debian.org
Wed Mar 18 23:53:26 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 20906b693faf91f88f62828fd9a31289b8047078
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Thu Mar 19 00:10:06 2015 +0100

    reproducible: html_packages: add some <span class="avoidwrap"> to help the browser decide where to wrap the line, avoiding uglinesses like this word
---
 bin/reproducible_html_packages.py | 29 ++++++++++++++++++-----------
 userContent/static/style.css      |  1 +
 2 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py
index 60dbed2..9f4d2c7 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 fb9b819..d3803e2 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 {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list