This is a backwards compatibility break, in that the `fancyindex_name_length` setting will now
prevent nginx from starting until removed. I do think though that most people will find the new
behavior preferable to that setting however.
There's two arguably unrelated CSS changes included in this pull request, so let me know if you
like one but not the other or vice versa I can split them up.
-----
We've introduced `table-layout: fixed;`. This is a performance optimization for browsers rendering
very large file lists.
The default mode (`table-layout: auto`) first needs to load the entire table, then calculates the
optimal column widths based on the contents of all cells in the table start to finish. This can be
a bit slow when directory listings contain tens of thousands of files or folders.
With `table-layout: fixed;` the width is determined based on the first row allowing the browser to
render to begin rendering the table immediately.
Technically, the widths of columns have changed slightly as a result of this, but we no longer need
to specify widths using style attributes, which makes it easier for custom CSS users to change the
widths.
.link was 55% wide, now 50%
.size was 20% wide, now 25%
.date was 25% wide, now 25%
-----
Rather than truncating string names server-side, we instead send the full name and tell the browser
to truncate file names with CSS. This has the advantage of always showing as much of the file name
as it can fit in a line. This has the benefit of avoiding line wraps on smaller screens (like
phones) and allowing people to resize their window larger to see more of the file name.
This reduces the code complexity server side and provides a optimal truncation on every device.
Entity references are encoding-independent, and will work despite of the
encoding of the rest of the served document. Note that in general it may be
a bad idea to use "fancyindex_header" to change the encoding of the served
documents because file names will still be treated as UTF-8, which is the
only sane default in Unix.
Fixes#50.
The XHTML document makes the document not to validate because of the undefined
entity references, and it seems better to use the HTML5 document type instead
of the HTML 4.01 one because the template uses already some modern constructs
like defining the device viewport options.
Fixes issue #52.
There is almost universal support for the CSS3
:nth-child() pseudo-selector. We're shifting the
responsibility for labeling even and odd rows to
the browser.
Set html5 meta viewport width to device-width. A mobile browser now scales up the directory listing and dir-/filenames are easier to read and click/touch.
If a sorting criteria different than the default is used, carry the URL
arguments to the links pointing to other directories, so the sorting is
"remembered" when navigating across different directories.
Make table headers clickable, for changing sorting direction of the entries.
Clicking on the name of the headers selects ascending direction, clicking on
the arrow next to it, chooses descending direction. The arrow symbol, for
simplicity, is an Unicode down-arrow symbol, which all reasonably modern
browsers should display fine. Also, most text-only browsers will show the
arrow correctly when running on Unicode-compatible terminals.
This allows for inserting a <link> tag in the generated listings pointing to
an additional CSS stylesheet, which will be applied by the browser after the
built-in rules. This allows for super-easy customization of the output look.
* Removed the 'media="screen"', because it is unlikely that an user would
like to print a file listing.
* Removed unused "#readme" rule in the CSS part. Support for inlining a file
was discontinued long ago.
- Fixed flags for the readme mode, now they are disjoint. This fixed some
other related things.
- Renamed fancyindex_readme_options to fancyindex_readme_mode (shorter
and clearer, IMHO)
- Renamed fancyindex_mode to fancyindex_include_mode (clearer).
- Checks for bottom/top readme are now properly done.
- Fix: Initialization of readme_flags now is zero instead of NGX_CONF_UNSET.
- Improved iteration of builtin template.