-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove
fancyindex_name_length
by offloading work to CSS
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.
- Loading branch information
1 parent
6cdffdb
commit 5930c29
Showing
4 changed files
with
37 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters