[Secure-testing-commits] r28803 - bin lib/python static

Ulrike Uhlig u-guest at moszumanska.debian.org
Mon Sep 15 19:19:11 UTC 2014


Author: u-guest
Date: 2014-09-15 19:19:11 +0000 (Mon, 15 Sep 2014)
New Revision: 28803

Modified:
   bin/tracker_service.py
   lib/python/web_support.py
   static/style.css
Log:
use nav element for menu on homepage. add some css for nav and pre elements, improve h1.



Modified: bin/tracker_service.py
===================================================================
--- bin/tracker_service.py	2014-09-15 19:18:29 UTC (rev 28802)
+++ bin/tracker_service.py	2014-09-15 19:19:11 UTC (rev 28803)
@@ -193,7 +193,7 @@
                A(url.scriptRelative("data/report"), "participating"),
                "."),
 
-            make_menu(
+            NAV(make_menu(
             url.scriptRelative,
             ('status/release/unstable',
              'Vulnerable packages in the unstable suite'),
@@ -223,7 +223,7 @@
              '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

Modified: lib/python/web_support.py
===================================================================
--- lib/python/web_support.py	2014-09-15 19:18:29 UTC (rev 28802)
+++ lib/python/web_support.py	2014-09-15 19:19:11 UTC (rev 28803)
@@ -1,16 +1,16 @@
 # web_support.py -- simple HTTP generation framework
 # Copyright (C) 2005 Florian Weimer <fw at deneb.enyo.de>
-# 
+#
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
@@ -114,7 +114,7 @@
                 self.handle(cli, env, data, result)
                 client.sendall(result.getvalue())
                 client.close()
-                
+
             except ServinvokeError:
                 client.close()
                 pass
@@ -126,7 +126,7 @@
                 target = cStringIO.StringIO()
                 traceback.print_exc(None, target)
                 self.log("%s", target.getvalue())
-        
+
         def handle(args, environ, data):
             """Invoke by run to handle a single request.  Should
             return the data to be sent back to the client."""
@@ -146,7 +146,7 @@
 
     This factory class handles the case where a script wants to
     generate URLs which reference to itself (see scriptRelative)."""
-    
+
     def __init__(self, server_name, script_name, path_info='',
                  params={}, secure=False):
         self.server_name = server_name or 'localhost'
@@ -177,15 +177,15 @@
         while arg[:1] == '/':
             arg = arg[1:]
         return arg
-    
+
     def absolute(self, url, **args):
         """Creates an absolute URL, with optional arguments to pass."""
-        
+
         return URL(url + self._convertArgs(args))
 
     def absoluteDict(self, url, args):
         """Creates an absolute URL, with arguments to pass."""
-        
+
         return URL(url + self._convertArgs(args))
 
     def scriptRelative(self, path, **args):
@@ -195,7 +195,7 @@
         return URL("/%s%s%s" % (self.script_name,
                                 self._stripSlashes(path),
                                 self._convertArgs(args)))
-    
+
     def scriptRelativeFull(self, path, **args):
         """Like scriptRelative, but returns an absolute URL, including
         the http:// prefix."""
@@ -235,7 +235,7 @@
 def escapeHTML(str):
     '''Replaces the characters <>&" in the passed strings with their
     HTML entities.'''
-    
+
     result = []
     append = result.append
     for ch in str:
@@ -263,7 +263,7 @@
 class VerbatimHTML(HTMLBase):
     """Creates verbatim HTML from a string object.  Mainly used for
     optimizing recurring HTML snippets."""
-    
+
     def __init__(self, contents):
         self.__contents = contents
 
@@ -288,13 +288,13 @@
 def compose(*contents):
     """Concatenates several HTML objects."""
     return Compose(contents)
-    
 
+
 class Tag(HTMLBase):
     """Base class for HTML tags."""
-    
+
     re_name = re.compile(r'\A_?[a-zA-Z][a-zA-Z0-9]*\Z')
-    
+
     def __init__(self, name, contents, attribs={}):
         self._check(name)
         self.__name = name
@@ -342,7 +342,7 @@
                     pass
                 raise
             write(closing)
-            
+
         else:
             write("<%s%s/>" % (self.__name, self.__attribs))
 
@@ -356,7 +356,7 @@
 
 def tag(__name, __contents, **__attribs):
     """Creates a new tag object.
-    
+
     name - name of the tag
     contents - a sequence objet (or iterator) for the enclosed contents
     attribs - keyword arguments froming forming attributes
@@ -429,6 +429,8 @@
     return Tag('header', __contents, __attribs)
 def FOOTER(*__contents, **__attribs):
     return Tag('footer', __contents, __attribs)
+def NAV(*__contents, **__attribs):
+    return Tag('nav', __contents, __attribs)
 
 def _linkify(match):
     extra = match.group(2)
@@ -555,7 +557,7 @@
                                   'wildcard ** in the middle of path'
                         m['**'] = value
                         return
-                    
+
                     m_new = {}
                     m[element] = m_new
                     m = m_new
@@ -734,7 +736,7 @@
     def pre_dispatch(self, url):
         """Invoked by handle prior to calling the registered handler."""
         pass
-    
+
 class WebService(Service, WebServiceBase):
     "CGI service implemented using servinvoke"
     def __init__(self, socket_name):
@@ -778,7 +780,7 @@
         self.lock = threading.Lock()
 
         self.__parse_base_url(base_url)
-        
+
         service_self = self
         class Handler(BaseHTTPServer.BaseHTTPRequestHandler):
             def do_GET(self):
@@ -839,8 +841,8 @@
         self.secure = m.group(1) == "https"
         self.server_name = m.group(2)
         self.script_name = m.group(3)
-        
 
+
 def __test():
     assert str(URL("")) == ""
     assert str(URL("abc")) == "abc"

Modified: static/style.css
===================================================================
--- static/style.css	2014-09-15 19:18:29 UTC (rev 28802)
+++ static/style.css	2014-09-15 19:19:11 UTC (rev 28803)
@@ -14,9 +14,8 @@
 	color: #333333;
 }
 
-header {
-	border-bottom: 1px solid crimson;
-	margin-bottom: 2em;
+pre {
+	overflow: auto;
 }
 
 a {
@@ -29,6 +28,16 @@
 	text-decoration:underline;
 }
 
+header {
+	border-bottom: 1px solid crimson;
+	margin-bottom: 2em;
+}
+
+footer {
+	text-align: center;
+	margin-top: 1em;
+}
+
 ul, ol {
 	padding-left: 0;
 }
@@ -41,7 +50,7 @@
 	display: inline-block;
 }
 
-li a {
+ul li a {
 	background: #fafafa;
 	border: 1px solid #ddd;
 	margin: 0 0.5em 0.2em 0;
@@ -50,10 +59,21 @@
 	display: block;
 }
 
+nav ul li {
+	display: block;
+}
+
+nav ul li a {
+	background: none;
+	border: none;
+	padding: 0;
+}
+
 h1 {
 	font-size : 250%;
 	padding: 0;
 	margin: 0;
+	margin-right: 260px;
 	line-height: 1.4em;
 }
 
@@ -105,11 +125,6 @@
 	display: none;
 }
 
-footer {
-	text-align: center;
-	margin-top: 1em;
-}
-
 form {
 	text-align: center;
 	padding: 1em 0;
@@ -138,9 +153,6 @@
 @media all and (min-width: 641px) {
 	header {
 		background: url(/tracker/logo.png) top right no-repeat;
-		min-height: 60px;
+		min-height: 80px;
 	}
-	h1 {
-		line-height: 2.4em;
-	}
 }




More information about the Secure-testing-commits mailing list