This patch adds some css styling improvements to mod_autoindex. It is based on the IndexStyleSheet functionality found in the current development version (originally from http://force-elite.com/~chip/patches/httpd/mod_autoindex/). The patch introduces the directiveIndexStyleSheet to specify the URL of a style sheet (this one is already in Apache httpd 2.1-head) and adds some css classes to html elements. Additionally, there is a new IndexOption AddAltClass which appends the "alt" text information to class names allowing different appearances of the listing of files or file types. Patch: http://opcenter.de/pub/misc/httpd-2.0.53-mod_autoindex-style.diff Live example: http://opcenter.de/pub/
can you make a patch against 2.1-dev?
Created attachment 14512 [details] mod_autoindex style enhancement patch This patch does some enhancements to the HTML output to allow styling via CSS. It adds a new IndexOption AddAltClass which appends the "alt" text information of a file/directory to its CSS class name allwong for further styling possibilities.
(In reply to comment #1) > can you make a patch against 2.1-dev? A patch against 2.1 trunk is attached (or see http://opcenter.de/pub/misc/httpd-2.1trunk-mod_autoindex-style.diff).
I think we should just always output the additional IDs, even if a Style Sheet isnt set. I will take a look at adapting the submmited patch to do that...
I would concur that style choices are always useful, however... we have to consider that some programmers may be slurping the contents of the current table results. Therefore; * default to table style, css annotated in the general distribution * introduce the new flag to turn off css decorate for html tables. OR (and this is a better solution)... Add a format type 3 for decorated html, and type 4 for strict XHTML/XML if we want to help authors. So 0, plain, 1, fixed, 2, html, 3, useful html, and then a 4/5 later on if we want to use strict semantics (this may get tricky handling text and arbitrary text/html header/readme contents, if they don't conform to XHTML/XML strict).
Thanks. Patch applied, r903052
whoops, this old patch also changed the date format @@ -1823,11 +1843,11 @@ apr_time_exp_t ts; apr_time_exp_lt(&ts, ar[x]->lm); apr_strftime(time_str, &rv, MAX_STRING_LEN, - "%d-%b-%Y %H:%M ", &ts); + "%Y-%m-%d %H:%M ", &ts); ap_rputs(time_str, r); } else { - /*Length="22-Feb-1998 23:42 " (see 4 lines above) */ + /*Length="1975-04-07 01:23 " (see 4 lines above) */ ap_rputs(" ", r); } }