Project

General

Profile

Actions

Feature #1183

closed

mod_dirlist.c supporting default_css

Added by Anonymous about 17 years ago. Updated 6 months ago.

Status:
Obsolete
Priority:
Normal
Category:
mod_dirlisting
Target version:
ASK QUESTIONS IN Forums:
No

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 2 (0 open2 closed)

Related to Feature #1458: Several listing enhancementsFixedjanActions
Related to Feature #1605: patch for dirlisting.extra-head confvarWontfixjanActions
Actions #1

Updated by Anonymous about 17 years ago

Actions #2

Updated by jcak77 over 16 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).

Actions #3

Updated by jcak77 over 16 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>.

Actions #4

Updated by gstrauss almost 8 years ago

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

Updated by gstrauss almost 8 years ago

Actions #6

Updated by gstrauss almost 8 years ago

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

Updated by gstrauss almost 8 years ago

  • Status changed from New to Wontfix

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

Actions #8

Updated by gstrauss 6 months ago

  • Status changed from Wontfix to Obsolete
  • ASK QUESTIONS IN Forums set to No

lighttpd 1.5.x branch has been abandoned.

lighttpd 1.4.x branch is now far more advanced and continues to be maintained.

Fixed in #1458 in lighttpd 1.4.23

Actions

Also available in: Atom