Add the fancyindex_case_sensitive option which considers the case when
sorting by name if it is on (which it is by default to keep current
behavior) and does a case-insensitive name sort if it is off.
Closes#78Closes#124
Co-authored-by: Ryan Schmidt <git@ryandesign.com>
Use a fork of pup on macOS 10.13 and higher because the binary provided
by the original project crashes immediately on those OS versions.
See https://github.com/ericchiang/pup/issues/85
When nginx is started, it returns control before it has created its pid
file. Since this test suite relies on the existence of the pid file,
wait until the pid file exists before returning from nginx_start. Time
out after 2 seconds so that if there is a real problem starting nginx
we don't wait forever.
Fixes#144
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.
Make the configuration process load the local files specified with
'fancyindex_{header,footer} "foo" local', instead of loading them
on every request.
Additionally, change the syntax of the configuration directive to accept
an optional parameter indicating whether the header (or footer) is to be
loaded as a subrequest (default, for backwards compatibility) or a local
file (must be specified explicitly). This avoids the footgun of having
a local file which accidentally happens to match the subrequest that one
had the intention to do when configuring.
Because the source archives from GitHub tags may not always produce the
same tarball when fetching at different times. Having proper tarballs
for releases also allows signing them i.e. with PGP.