From c92f19c9320abd9bd8a3940cf437c92af0eb558e Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 13 Mar 2011 10:56:00 +0000 Subject: [PATCH] Move directory listing CSS to resource:internal.css. svn path=/trunk/netsurf/; revision=12017 --- !NetSurf/Resources/internal.css,f79 | 61 +++++++++++++++++++++++++++++ content/dirlist.c | 25 ++---------- 2 files changed, 65 insertions(+), 21 deletions(-) diff --git a/!NetSurf/Resources/internal.css,f79 b/!NetSurf/Resources/internal.css,f79 index 1a6c3ac9b..a5923fe33 100644 --- a/!NetSurf/Resources/internal.css,f79 +++ b/!NetSurf/Resources/internal.css,f79 @@ -98,3 +98,64 @@ dd > ul { border-top: 2px solid #94adff; } +/* + * Directory Listing Style + */ + +body#dirlist { + background-color: #abf; + padding-bottom: 2em; } + +body#dirlist h1 { + padding: 5mm; + margin: 0; + border-bottom: 2px solid #bcf; } + +body#dirlist p { + padding: 2px 5mm; + margin: 0; } + +body#dirlist div { + display: table; + width: 94%; + margin: 5mm auto 2em auto; + padding: 0; } + +body#dirlist a, strong { + display: table-row; + margin: 0; + padding: 0; } + +body#dirlist a.odd { + background-color: #bcf; } + +body#dirlist a.even { + background-color: #b2c3ff; } + +body#dirlist span { + display: table-cell; } + +body#dirlist em > span { + padding-bottom: 1px; } + +body#dirlist a + a>span { + border-top: 1px solid #9af; } + +body#dirlist span.name { + padding-left: 22px; + min-height: 19px;} + +body#dirlist a.dir > span.name { + font-weight: bold; } + +body#dirlist a.dir > span.type { + font-weight: bold; } + +body#dirlist span.size { + text-align: right; + padding-right: 0.3em; } + +body#dirlist span.size + span.size { + text-align: left; + padding-right: 0; } + diff --git a/content/dirlist.c b/content/dirlist.c index d22e35c77..8ed977239 100644 --- a/content/dirlist.c +++ b/content/dirlist.c @@ -56,26 +56,9 @@ bool dirlist_generate_top(char *buffer, int buffer_length) int error = snprintf(buffer, buffer_length, "\n" "\n" - "\n" "%s\n" "\n" - "\n" + "\n" "

%s

\n", title, title); if (error < 0 || error >= buffer_length)