Commit graph

143 commits

Author SHA1 Message Date
Daniel Schömer
a989003c62 template.h: viewport width for mobile browsers
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.
2013-12-28 17:58:35 +01:00
Daniel Schömer
dc2bb3a42b template.html: viewport width for mobile browsers
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.
2013-12-28 17:56:13 +01:00
Adrian Perez
47e36a788f Merge pull request #8 from polymorf/master
Add new line between parent dir and file/dir list
2013-11-15 01:57:10 -08:00
David BÉRARD
1b90ae6977 add new line between parent dir and file/dir list, each table row end now with a new line 2013-11-14 14:54:05 +01:00
Adrian Perez de Castro
87e4206159 Release version 0.3.3 2013-10-25 13:06:44 +03:00
Adrian Perez de Castro
ea30f7fb21 Preserve URL sorting arguments on directory links
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.
2013-10-25 13:00:10 +03:00
Adrian Perez de Castro
9b3cdb5583 Clickable table headers change sort direction
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.
2013-10-25 12:21:33 +03:00
Adrian Perez de Castro
1226d363be Support changing the sort direction of elements
When choosing different sorting criteria for the elements (with the "?C=x"
URL argument), allow also specifying a second "O=x" argument for the
direction: "?C=x&O=A" selects ascending direction, while "?C=x&O=D" chooses
descending direction.
2013-10-24 21:45:18 +03:00
Adrian Perez de Castro
d78536c9a4 Support sorting files using mtime or size
This introduces Apache-style URL arguments to specify how to sort the
entries in the generated listings:

 - Appending "?C=M" sorts by modification time (mtime).
 - Appending "?C=S" sorts by file size.
 - Any other (or no arguments) use the default sorting, by name.
2013-10-24 17:38:48 +03:00
Adrian Perez de Castro
fa6455a011 Release version 0.3.2 2013-06-05 11:43:25 +03:00
Adrian Perez de Castro
6cf0bf8ad8 Update copyright header 2013-06-05 11:38:34 +03:00
Adrian Perez
fd3950172a Merge pull request #4 from davidjb/master
Ensure correct 200 status is sent to clients on successful listing
2013-04-22 04:56:57 -07:00
David\ Beitey
aba75b3c45 Ensure fancyindex is sending NGX_HTTP_OK (200) as the status vs HTTP_OK which is 0. Without this, connections sit waiting forever. 2013-04-19 11:10:44 +10:00
Adrian Perez
2034d0ad35 Initialize headers_out.status to NGX_OK and improve error check
When issuing subrequests (currently for non-builtin headers and footers),
initialize the headers_out.status field to NGX_OK.

Also, change the check of the result from ngx_http_send_header() to only
check for NGX_OK, as it is redundant to check it and also NGX_ERROR.
2012-03-14 22:30:26 +02:00
Stefan Rubner
ea6323f92c Ooops. Didn't fix the actual check but just added the comment instead. Fixed. 2012-03-14 00:29:11 +01:00
Stefan Rubner
07614d5abe Fixed the wrong status code check when including header/footer in NGinx 1.1.16
where ngx_http_subrequests returns NGX_OK (0) and not NGX_HTTP_OK (200) on a
successful completion of the subrequest.
2012-03-08 23:49:32 +01:00
Adrian Perez
607159a61d Update README with some bits
More exactly:

* In the requirements section, state that the module will work with
  any version of Nginx newer than 0.7.x

* Updated URL to the Nginx wiki, using now wiki.nginx.org

* Specifying a custom CSS works, the README was contradicting the code.
  FWIW, removed status markers from features in the file.

* Made the build instructions a bit more generic.
2012-01-18 00:31:22 +02:00
Adrian Perez
44805008d0 Use "ngx_inline" instead of plain "inline"
This should improve compatibility with some particular compilers
2012-01-18 00:23:02 +02:00
Óscar García Amor
a86e293f4f - Fixed description errors in README.rst
- Now the directives are sorted alphabetically
2011-07-20 08:37:07 +02:00
Adrian Perez
42d2f1b1f7 Properly escape ':' and '?' in generated hrefs
Unfortunately ngx_escape_uri() does not properly escape all characters
that may be problematic in URIs, so apart from doing a first pass with
ngx_escape_uri(), it is needed to do a second pass for escaping the rest
of characters.

Thanks to Steve Willing <eiji-gravion@hotmail.com> for reporting the issue.
2011-04-04 03:46:51 +03:00
Adrian Perez
d8e0bdaef2 Update e-mail address and copyright headers 2011-04-03 00:22:59 +03:00
Adrian Perez
2f138afb70 Implement fancyindex_ignore configuration directive
Adds a new "fancyindex_ignore string1 [string2 [... stringN]]" directive
which sets a lists of files which are not to be shown in generated listings.
If Nginx is built with PCRE support, strings are interpreted as regular
expressions, and files which match one of the regular expressions in this
list will not be sent in listings.
2010-09-09 16:42:46 +02:00
Sergey A. Osokin
3d1c14f162 Fix incompatibility with Nginx 0.7.66
Adds a couple of additional version checks to make the module compatible
with Nginx 0.7.66.

Signed-off-by: Adrian Perez <aperez@igalia.com>
2010-06-10 18:38:45 +02:00
Adrian Perez
4b19f3a73f Add fancyindex_css_href configuration option
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.
2010-06-10 16:56:31 +02:00
Adrian Perez
224db63c53 Save some bytes removing things in the template
* 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.
2010-06-10 14:52:23 +02:00
Adrian Perez
062b851137 Update README file, add .gitignore
* Change old e-mail address to my new one.
* State that the module is unsupported in Nginx 0.6.x
* Remove text about the fancyindex_readme* directives
* Add some basic git ignores.
2010-06-10 01:49:30 +02:00
Sergey A. Osokin
f465a2bcd6 Small improvement over previous patch
Sergey A. Osokin provided this small improvement for the his previous patch
regarding the "zero_in_uri" being absent in newer development versions of
Nginx.

Signed-off-by: Adrian Perez <aperez@igalia.com>
2010-06-07 02:14:41 +02:00
Sergey A. Osokin
d54092b842 Fix build with latest development versions of Nginx
The zero_in_uri member of the request structure does not longer exist, so
removed a reference to it.

Signed-off-by: Adrian Perez <aperez@igalia.com>
2010-06-03 22:08:59 +02:00
Benoit Sigoure
bcbf8144c6 Whenever a directory contained a file that couldn't be stat()ed by nginx
(e.g. due to EACCESS), the fancyindex module would produce an error and
wouldn't generate any response to the user.

The new behavior is to log a non-critical error and keep serving the page
anyway.

Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
Signed-off-by: Adrian Perez <aperez@igalia.com>
2010-03-10 01:53:19 +01:00
Adrián Pérez
3d18805d3a Merged support for nginx 0.8 2009-06-07 06:50:30 +02:00
Adrián Pérez
9e6893c0c8 Be compatible with Nginx 0.8.0 2009-06-06 22:09:04 +02:00
Adrián Pérez
4fa7e69117 Add patch for nginx 0.6 2008-12-10 02:34:30 +01:00
Adrián Pérez
6d5cec8e68 Corrected README 2008-12-10 02:23:32 +01:00
Adrian Perez
30337efcb3 Removed half-implemented readme_* directives (#1) 2008-09-11 19:55:52 +02:00
Adrian Perez
9b75e7ebf9 Add note on gawk requisite 2008-09-11 19:55:34 +02:00
Adrian Perez
207be06cd4 Fixes for building on nginx 0.7.7 2008-08-01 11:27:01 +02:00
Adrian Perez
0b7e40f274 Fixed issue with non-bash shells being unable of configuring the module. 2007-09-28 23:01:28 +02:00
Adrian Perez
d508e6f95a - Added support for sending as much response as possible in a single
ngx_chain_t instead of always calling the output filter three times.
  This should avoid possible blocking in Nginx code.
- Added warning about using external URLs in subrequest in readme file.
- Factorized out some variable declarations out to function header. Removed
  a shadowed variable.
- Removed some debugging statements.
2007-09-19 18:22:16 +02:00
Adrian Perez
7181e18fb3 Fixed order of handler linkage, fixes #240 2007-09-14 13:39:50 +02:00
Adrian Perez
74863e2716 Fixed module initialization order, so we end up behinx index_module 2007-09-14 04:04:37 +02:00
Adrian Perez
2f429b796b - Updated documentation.
- Fixed XHTML 1.0 validation by enclosing JS code into a CDATA section.
2007-09-13 23:40:40 +02:00
Adrian Perez
75e90109e0 Fixed handling of NGX_AGAIN in big responses 2007-09-12 17:16:59 +02:00
Adrian Perez
4cc0d75806 Fixed readme 2007-09-12 12:40:21 +02:00
Adrian Perez
d47dd32858 some code cleanup 2007-09-12 12:38:37 +02:00
Adrian Perez
1eaaa8b505 - Make sure the thing compiles with 0.6.11
- Removed a compiler warning
2007-09-12 11:42:21 +02:00
Adrian Perez
312c69b5aa Merged changes which fix up ticket #231 2007-09-12 11:36:06 +02:00
Adrian Perez
45775bd0f1 - At last, inclusion works in proper order. 2007-09-12 01:11:46 +02:00
Adrian Perez
feaa4d9bf7 compiles -- just do not ask 2007-09-11 19:12:58 +02:00
Adrian Perez
7e156ff58d - Implemented seperate functions to create header/footer buffers.
- Simplified template.html and make code work with new template. Some vars
  were uneeded.
- Added buffer chain debug macro in module header.
2007-09-11 13:52:53 +02:00
Adrian Perez
549d00bdae Clarified documentation 2007-09-11 12:28:26 +02:00