]> arthur.barton.de Git - bup.git/commitdiff
Add simple styling to bup web.
authorDavid Roda <davidcroda@gmail.com>
Tue, 14 Sep 2010 01:09:16 +0000 (21:09 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Wed, 22 Sep 2010 01:59:28 +0000 (18:59 -0700)
This adds a wrapper set to 960px to the bup web layout. It also
sets widths on the table and columns.

I added a wrapper div to list-directory.html but I think that must
have snuck in with a previous commit.  I am not sure how to fix that
so I will leave it for now.  Sorry!

Adds a wrapper div to the html template.

Signed-off-by: David Roda <davidcroda@gmail.com>
lib/web/list-directory.html
lib/web/static/styles.css

index 0e9aa234200701175e0c88d22854a7d2e4c6032c..14ce0ffd403d2f7d23dd77f892971e4b775cf216 100644 (file)
@@ -6,32 +6,34 @@
         <link rel="stylesheet" href="/static/styles.css" />
     </head>
     <body>
-        <div id="breadcrumb">
-            {% for (display, part_path) in breadcrumbs[:-1] %}
-            <a href="{{ part_path }}">{{ display }}</a> /
+        <div id="wrapper">
+            <div id="breadcrumb">
+                {% for (display, part_path) in breadcrumbs[:-1] %}
+                <a href="{{ part_path }}">{{ display }}</a> /
+                {% end %}
+                <strong>{{ breadcrumbs[-1][0] }}</strong>
+            </div>
+            {% if files_hidden %}
+            <div id="message">
+                {% if hidden_shown %}
+                    <a href=".">Hide hidden files</a>
+                {% else %}
+                    <a href="?hidden=1">Show hidden files</a>
+                {% end %}
+            </div>
             {% end %}
-            <strong>{{ breadcrumbs[-1][0] }}</strong>
+            <table>
+                <tr>
+                    <th class="dir-name">Name</th>
+                    <th class="dir-size">Size</th>
+                </tr>
+                {% for (display, link, size) in dir_contents %}
+                <tr>
+                    <td class="dir-name"><a href="{{ link }}">{{ display }}</a></td>
+                    <td class="dir-size">{% if size != None %}{{ size }}{% else %}&nbsp;{% end %}</td>
+                </tr>
+                {% end %}
+            </table>
         </div>
-        {% if files_hidden %}
-        <div id="message">
-            {% if hidden_shown %}
-                <a href=".">Hide hidden files</a>
-            {% else %}
-                <a href="?hidden=1">Show hidden files</a>
-            {% end %}
-        </div>
-        {% end %}
-        <table>
-            <tr>
-                <th class="dir-name">Name</th>
-                <th class="dir-size">Size</th>
-            </tr>
-            {% for (display, link, size) in dir_contents %}
-            <tr>
-                <td class="dir-name"><a href="{{ link }}">{{ display }}</a></td>
-                <td class="dir-size">{% if size != None %}{{ size }}{% else %}&nbsp;{% end %}</td>
-            </tr>
-            {% end %}
-        </table>
     </body>
-</html>
\ No newline at end of file
+</html>
index 11ce3606637acca850d9c63a104d3c0099d4ef3b..12f65165d5073b4f1510b2e5f3bab549c271aa25 100644 (file)
@@ -2,6 +2,27 @@ body {
     font-family: sans-serif
 }
 
+#wrapper {
+    width: 960px;
+    margin: auto;
+}
+
 #breadcrumb {
     margin: 10px 0;
+}
+
+table {
+    width: 100%;
+}
+
+th {
+    text-align: left;
+}
+
+.dir-name {
+    width:80%;
+}
+
+.dir-size {
+    width:20%;
 }
\ No newline at end of file