Hi, the attached patches will use lists as navigation elements instead of tables and add a nice CSS to these lists. Cheers, u.
From 22141f51bcfbd7f124612b2102297326ca5ba56f Mon Sep 17 00:00:00 2001 From: u451f <u@451f.org> Date: Mon, 15 Sep 2014 15:28:48 +0200 Subject: [PATCH 1/2] use lists instead of tables where there is no tabular data --- bin/tracker_service.py | 6 +++--- lib/python/web_support.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/tracker_service.py b/bin/tracker_service.py index f002cc4..17066e9 100644 --- a/bin/tracker_service.py +++ b/bin/tracker_service.py @@ -52,12 +52,12 @@ class BugFilter: note = 'Restore local vulnerabilities' else: note = 'Hide ' + desc - l.append(TR(TD(A(url.updateParamsDict({prop : None}), note)))) + l.append(LI(A(url.updateParamsDict({prop : None}), note))) else: note = 'Show ' + desc - l.append(TR(TD(A(url.updateParamsDict({prop : '1'}), note)))) + l.append(LI(A(url.updateParamsDict({prop : '1'}), note))) - return TABLE(l) + return UL(l) def urgencyFiltered(self, urg, vuln): """Returns True for urgencies that should be filtered.""" diff --git a/lib/python/web_support.py b/lib/python/web_support.py index 050f449..dfd5bfe 100644 --- a/lib/python/web_support.py +++ b/lib/python/web_support.py @@ -421,6 +421,8 @@ def FORM(*__contents, **__attribs): return Tag('form', __contents, __attribs) def INPUT(*__contents, **__attribs): return Tag('input', __contents, __attribs) +def UL(contents): + return tag('ul', contents) def LI(*__contents, **__attribs): return Tag('li', __contents, __attribs) def HEADER(*__contents, **__attribs): -- 1.7.10.4
From 53db362ea5f4a8c638d8b272555b59cdf269ea97 Mon Sep 17 00:00:00 2001 From: u451f <u@451f.org> Date: Mon, 15 Sep 2014 15:40:31 +0200 Subject: [PATCH 2/2] correct UL element. Take out the search form of the ul element on the homepage. --- bin/tracker_service.css | 17 +++++++++++++++-- bin/tracker_service.py | 9 ++++++--- lib/python/web_support.py | 2 +- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/bin/tracker_service.css b/bin/tracker_service.css index 0e02a61..00e9846 100644 --- a/bin/tracker_service.css +++ b/bin/tracker_service.css @@ -29,12 +29,25 @@ a:hover, a:focus { text-decoration:underline; } +ul, ol { + padding-left: 0; +} + ul, li { list-style: none; } -ul, ol { - padding-left: 0; +ul li { + display: inline-block; +} + +li a { + background: #fafafa; + border: 1px solid #ddd; + margin: 0 0.5em 0.2em 0; + border-radius: 0.5em; + padding: 0.15em 0.5em; + display: block; } h1 { diff --git a/bin/tracker_service.py b/bin/tracker_service.py index 17066e9..3618935 100644 --- a/bin/tracker_service.py +++ b/bin/tracker_service.py @@ -185,6 +185,7 @@ here. Please help us keep this information up-to-date by """, aware of and/or help us improve the quality of this information by """, A(url.scriptRelative("data/report"), "participating"), "."), + make_menu( url.scriptRelative, ('status/release/unstable', @@ -214,9 +215,11 @@ aware of and/or help us improve the quality of this information by """, ('data/funny-versions', 'Packages with strange version numbers'), ('data/releases', - 'Covered Debian releases and architectures (slow)'), - self.make_search_button(url)), - P("""(You can enter CVE names, Debian bug numbers and package + 'Covered Debian releases and architectures (slow)') + ), + + self.make_search_button(url), + P("""(You can enter CVE names, Debian bug numbers and package names in the search forms.)"""), H3("External interfaces"),
Attachment:
signature.asc
Description: OpenPGP digital signature