Project

General

Profile

Feature #1183

mod_dirlist.c supporting default_css

Added by Anonymous about 12 years ago. Updated about 3 years ago.

Status:
Wontfix
Priority:
Normal
Assignee:
-
Category:
mod_dirlisting
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

Description

Hi there,
I'm using lighttpd for several months now on my rootserver. I had the problem that mod_dirlisting doesn't allow to specify a default_css. Sure there's external_css, but the CSS specified with this directive has to be reachable via URL. This is complicated when using vhosts, because there has to be a css file for each vhost. My modification makes it possible to specify default_css, which content will be printed out into the html file so that theres no need to be public available.

Greetz halfdan ******
http://c0demonkey.com

-- halfdan


Related issues

Related to Feature #1458: Several listing enhancementsFixed

Actions
Related to Feature #1605: patch for dirlisting.extra-head confvarWontfix

Actions

History

#1

Updated by Anonymous about 12 years ago

#2

Updated by jcak77 over 11 years ago

Hi,
In your source, you've added:


        BUFFER_APPEND_STRING_CONST(out, "<style type=\"text/css\">\n");
        char c[80];
        FILE * css;
        css = fopen(p->conf.default_css->ptr,"r");
        if(css !=NULL)
        {
            while(fgets(c, 10, css)!=NULL) 
            { 
                buffer_append_string_len(out, c, strlen(c));
            }
        }
        else
        {
            buffer_append_string_buffer(out, p->conf.default_css);
        }

        BUFFER_APPEND_STRING_CONST(out, "</style>");

I think you must enclose the content of the file with a CDATA section, since lighttpd generates xhtml. With the current version, things like:


body > table {
  ...some CSS rules...
}

...will produce an invalid XHTML page because of the > symbol (which is valid in CSS).

#3

Updated by jcak77 over 11 years ago

Also, bug 1605 supersedes this one, since you can use inlined CSS in the file pointed to by dirlisting.extra-head as well as any other XHTML directive meant to be part of <head>.

#4

Updated by gstrauss about 3 years ago

  • Description updated (diff)
  • Assignee deleted (jan)
  • Priority changed from High to Normal
#5

Updated by gstrauss about 3 years ago

#6

Updated by gstrauss about 3 years ago

  • Related to Feature #1605: patch for dirlisting.extra-head confvar added
#7

Updated by gstrauss about 3 years ago

  • Status changed from New to Wontfix

Superceded by https://redmine.lighttpd.net/issues/1458 in lighttpd 1.4.x

Also available in: Atom