]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
webish.py: put the URI in a narrower auto-scrolling box (with CSS)
authorBrian Warner <warner@lothar.com>
Fri, 15 Jun 2007 08:32:20 +0000 (01:32 -0700)
committerBrian Warner <warner@lothar.com>
Fri, 15 Jun 2007 08:32:20 +0000 (01:32 -0700)
setup.py
src/allmydata/web/directory.xhtml
src/allmydata/web/tahoe.css [new file with mode: 0644]
src/allmydata/webish.py

index 7596a5b8fddab61c0b84e2d965b5b71d6a5136fd..5036b8e49d85a728f3374ece53327f21db4ae533 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -82,7 +82,7 @@ majority of the nodes are no longer available.""",
                 "allmydata.filetree", "allmydata.scripts",],
       package_dir={ "allmydata": "src/allmydata",},
       scripts = ["bin/allmydata-tahoe"],
-      package_data={ 'allmydata': ['web/*.xhtml'] },
+      package_data={ 'allmydata': ['web/*.xhtml', 'web/*.css'] },
       classifiers=trove_classifiers,
       test_suite="allmydata.test",
       )
index 6ee528f3f9eb15542788da3eea03e8644b9490c5..430223cd76807f583f068fa11d2ea2bea4bcb0a1 100644 (file)
@@ -4,6 +4,7 @@
     <!-- <link href="http://www.allmydata.com/common/css/styles.css"
           rel="stylesheet" type="text/css"/> -->
     <link href="/webform_css" rel="stylesheet" type="text/css"/>
+    <link href="/tahoe_css" rel="stylesheet" type="text/css"/>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   </head>
   <body>
@@ -25,7 +26,7 @@
     <td><n:slot name="filename"/></td>
     <td><n:slot name="type"/></td>
     <td><n:slot name="size"/></td>
-    <td><n:slot name="uri"/></td>
+    <td><pre class="overflow"><n:slot name="uri"/></pre></td>
     <td><n:slot name="delete"/></td>
   </tr>
 
diff --git a/src/allmydata/web/tahoe.css b/src/allmydata/web/tahoe.css
new file mode 100644 (file)
index 0000000..78e8db6
--- /dev/null
@@ -0,0 +1,8 @@
+
+pre.overflow {
+               background: #f7f7f7;
+               border: 1px solid #d7d7d7;
+               margin: 1em 1.75em;
+               padding: .25em;
+               overflow: auto;
+               }
\ No newline at end of file
index b2728df7c3a3ed7658675172ee40f60e9700c7b0..023406e314409da27d353ef1379e3700c14cb665 100644 (file)
@@ -3,6 +3,7 @@ from twisted.application import service, strports
 from twisted.web import static, resource, server, html
 from twisted.python import util, log
 from nevow import inevow, rend, loaders, appserver, url, tags as T
+from nevow.static import File as nevow_File # TODO: merge with static.File?
 from allmydata.util import idlib
 from allmydata.uri import unpack_uri
 from allmydata.interfaces import IDownloadTarget
@@ -333,6 +334,7 @@ class Root(rend.Page):
         return rend.Page.locateChild(self, ctx, segments)
 
     child_webform_css = webform.defaultCSS
+    child_tahoe_css = nevow_File(util.sibpath(__file__, "web/tahoe.css"))
 
     child_welcome = Welcome()