summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--!NetSurf/Resources/internal.css,f7961
-rw-r--r--content/dirlist.c25
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,
"<html>\n"
"<head>\n"
- "<style>\n"
- "html, body { margin: 0; padding: 0; }\n"
- "body { background-color: #abf; padding-bottom: 2em; }\n"
- "h1 { padding: 5mm; margin: 0; "
- "border-bottom: 2px solid #bcf; }\n"
- "p { padding: 2px 5mm; margin: 0; }\n"
- "div { display: table; width: 94%%; margin: 5mm auto 2em auto; "
- "padding: 0; }\n"
- "a, strong { display: table-row; margin: 0; padding: 0; }\n"
- "a.odd { background-color: #bcf; }\n"
- "a.even { background-color: #b2c3ff; }\n"
- "span { display: table-cell; }\n"
- "em > span { padding-bottom: 1px; }\n"
- "a + a>span { border-top: 1px solid #9af; }\n"
- "span.name { padding-left: 22px; min-height: 19px;}\n"
- "a.dir > span.name { font-weight: bold; }\n"
- "a.dir > span.type { font-weight: bold; }\n"
- "span.size { text-align: right; padding-right: 0.3em; }\n"
- "span.size + span.size { text-align: left; "
- "padding-right: 0; }\n");
+ "<link rel=\"stylesheet\" title=\"Standard\" "
+ "type=\"text/css\" href=\"resource:internal.css\">\n"
+ "<style>\n");
if (error < 0 || error >= buffer_length)
/* Error or buffer too small */
return false;
@@ -161,7 +144,7 @@ bool dirlist_generate_title(const char *title, char *buffer, int buffer_length)
"</style>\n"
"<title>%s</title>\n"
"</head>\n"
- "<body>\n"
+ "<body id=\"dirlist\">\n"
"<h1>%s</h1>\n",
title, title);
if (error < 0 || error >= buffer_length)