├── .gitignore ├── .htaccess ├── .icons ├── after effects.png ├── application-msword.png ├── application-pdf.png ├── application-vnd.ms-excel.png ├── application-vnd.ms-powerpoint.png ├── application-x-bittorrent.png ├── application-x-flash-video.png ├── application-x-gzip.png ├── application-x-php.png ├── application-x-rar.png ├── application-x-tar.png ├── application-x-zip.png ├── audio-x-mp3-playlist.png ├── audio-x-mpeg.png ├── audio-x-ms-wma.png ├── audio-x-vorbis+ogg.png ├── audio-x-wav.png ├── audition.png ├── default.png ├── dreamweaver.png ├── fireworks.png ├── folder-home.png ├── folder.png ├── illustrator.png ├── image-gif.png ├── image-jpeg.png ├── image-jpg.png ├── image-svg.png ├── image-x-psd.png ├── indesign.png ├── otf.png ├── png.png ├── premiere pro.png ├── template.psd ├── text-css.png ├── text-html.png ├── text-plain.png ├── text-richtext.png ├── text-x-javascript.png ├── text-xsql.png ├── ttf.png └── video-x-generic.png ├── LICENSE ├── README.md ├── directory-theme.conf ├── favicon.ico └── theme ├── 404.html ├── footer.html ├── header.html ├── nginx-header.html ├── scripts.js ├── search.png ├── search.svg └── style.css /.gitignore: -------------------------------------------------------------------------------- 1 | # OS generated files # 2 | ###################### 3 | .DS_Store 4 | .DS_Store? 5 | ._* 6 | .Spotlight-V100 7 | .Trashes 8 | ehthumbs.db 9 | Thumbs.db 10 | *.swo 11 | *.swp 12 | 13 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | # ENABLE INDEXING 2 | Options +Indexes 3 | 4 | # INDEX OPTIONS 5 | IndexOptions +FancyIndexing +IgnoreCase +FoldersFirst +XHTML +HTMLTable +SuppressRules +SuppressDescription +NameWidth=* +IconsAreLinks +SuppressSize 6 | 7 | # HIDE /theme DIRECTORY 8 | IndexIgnore .htaccess /theme favicon.ico *.swp *.swo 404.html 9 | ErrorDocument 404 /theme/404.html 10 | 11 | # 12 | # GENERAL ICONS (BLANK, DIRECTORY, PARENT DIRECTORY) 13 | # 14 | 15 | # 16 | # Replace {FOLDERNAME} with your directory URL eg: 17 | # If your directory is http://mywebsite.com/share/ 18 | # you would change to: 19 | # 20 | # AddIcon /share/theme/icons/blank.png ^^BLANKICON^^ 21 | # 22 | 23 | AddIcon /.icons/default.png ^^BLANKICON^^ 24 | AddIcon /.icons/folder.png ^^DIRECTORY^^ 25 | AddIcon /.icons/folder-home.png .. 26 | 27 | # 28 | # EXTENSION SPECIFIC ICONS 29 | # 30 | 31 | AddIcon /.icons/audio-x-mpeg.png .aif .iff .m3u .m4a .mid .mp3 .mpa .ra 32 | AddIcon /.icons/audio-x-wav.png .wav .wma 33 | AddIcon /.icons/text-x-c.png .c 34 | AddIcon /.icons/text-css.png .css 35 | AddIcon /.icons/application-msword.png .doc .docx .docm .dot .dotx .dotm .log .msg .odt .pages .rtf .tex .wpd .wps 36 | AddIcon /.icons/image-svg.png .svg 37 | AddIcon /.icons/illustrator.png .ai .eps 38 | AddIcon /.icons/image-gif.png .gif 39 | AddIcon /.icons/text-html.png .html .xhtml .shtml .htm .liquid .md .rb 40 | AddIcon /.icons/image-x-ico.png .ico 41 | AddIcon /.icons/application-x-jar.png .jar 42 | AddIcon /.icons/image-jpg.png .jpg .jpeg 43 | AddIcon /.icons/text-x-javascript.png .js .json 44 | AddIcon /.icons/application-x-bittorrent.png .pkg .dmg .rar 45 | AddIcon /.icons/application-pdf.png .pdf 46 | AddIcon /.icons/application-x-php.png .php 47 | AddIcon /.icons/image-png.png .png .tiff 48 | AddIcon /.icons/image-x-psd.png .ps .psd 49 | AddIcon /.icons/application-rss+xml.png .rss 50 | AddIcon /.icons/text-x-sql.png .sql 51 | AddIcon /.icons/otf.png .otf 52 | AddIcon /.icons/ttf.png .ttf .woff .eot 53 | AddIcon /.icons/text-plain.png .txt 54 | AddIcon /.icons/video-x-generic.png .asf .asx .avi .flv .mov .mp4 .mpg .rm .srt .swf .vob .wmv 55 | AddIcon /.icons/application-vnd.ms-excel.png .xml .xlsx .xlsm .xltx .xltm .xlam .xlr .xls .csv 56 | AddIcon /.icons/application-x-zip.png .zip .bin 57 | DefaultIcon /.icons/default.png 58 | 59 | # 60 | # THEME FILES 61 | # 62 | 63 | HeaderName /theme/header.html 64 | ReadmeName /theme/footer.html 65 | IndexStyleSheet "/theme/style.css" 66 | 67 | 68 | RewriteEngine on 69 | RewriteCond %{REQUEST_FILENAME} !-d 70 | RewriteCond %{REQUEST_FILENAME}\.html -f 71 | RewriteRule ^(.*)$ $1.html -------------------------------------------------------------------------------- /.icons/after effects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/after effects.png -------------------------------------------------------------------------------- /.icons/application-msword.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/application-msword.png -------------------------------------------------------------------------------- /.icons/application-pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/application-pdf.png -------------------------------------------------------------------------------- /.icons/application-vnd.ms-excel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/application-vnd.ms-excel.png -------------------------------------------------------------------------------- /.icons/application-vnd.ms-powerpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/application-vnd.ms-powerpoint.png -------------------------------------------------------------------------------- /.icons/application-x-bittorrent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/application-x-bittorrent.png -------------------------------------------------------------------------------- /.icons/application-x-flash-video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/application-x-flash-video.png -------------------------------------------------------------------------------- /.icons/application-x-gzip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/application-x-gzip.png -------------------------------------------------------------------------------- /.icons/application-x-php.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/application-x-php.png -------------------------------------------------------------------------------- /.icons/application-x-rar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/application-x-rar.png -------------------------------------------------------------------------------- /.icons/application-x-tar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/application-x-tar.png -------------------------------------------------------------------------------- /.icons/application-x-zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/application-x-zip.png -------------------------------------------------------------------------------- /.icons/audio-x-mp3-playlist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/audio-x-mp3-playlist.png -------------------------------------------------------------------------------- /.icons/audio-x-mpeg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/audio-x-mpeg.png -------------------------------------------------------------------------------- /.icons/audio-x-ms-wma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/audio-x-ms-wma.png -------------------------------------------------------------------------------- /.icons/audio-x-vorbis+ogg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/audio-x-vorbis+ogg.png -------------------------------------------------------------------------------- /.icons/audio-x-wav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/audio-x-wav.png -------------------------------------------------------------------------------- /.icons/audition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/audition.png -------------------------------------------------------------------------------- /.icons/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/default.png -------------------------------------------------------------------------------- /.icons/dreamweaver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/dreamweaver.png -------------------------------------------------------------------------------- /.icons/fireworks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/fireworks.png -------------------------------------------------------------------------------- /.icons/folder-home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/folder-home.png -------------------------------------------------------------------------------- /.icons/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/folder.png -------------------------------------------------------------------------------- /.icons/illustrator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/illustrator.png -------------------------------------------------------------------------------- /.icons/image-gif.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/image-gif.png -------------------------------------------------------------------------------- /.icons/image-jpeg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/image-jpeg.png -------------------------------------------------------------------------------- /.icons/image-jpg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/image-jpg.png -------------------------------------------------------------------------------- /.icons/image-svg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/image-svg.png -------------------------------------------------------------------------------- /.icons/image-x-psd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/image-x-psd.png -------------------------------------------------------------------------------- /.icons/indesign.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/indesign.png -------------------------------------------------------------------------------- /.icons/otf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/otf.png -------------------------------------------------------------------------------- /.icons/png.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/png.png -------------------------------------------------------------------------------- /.icons/premiere pro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/premiere pro.png -------------------------------------------------------------------------------- /.icons/template.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/template.psd -------------------------------------------------------------------------------- /.icons/text-css.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/text-css.png -------------------------------------------------------------------------------- /.icons/text-html.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/text-html.png -------------------------------------------------------------------------------- /.icons/text-plain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/text-plain.png -------------------------------------------------------------------------------- /.icons/text-richtext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/text-richtext.png -------------------------------------------------------------------------------- /.icons/text-x-javascript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/text-x-javascript.png -------------------------------------------------------------------------------- /.icons/text-xsql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/text-xsql.png -------------------------------------------------------------------------------- /.icons/ttf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/ttf.png -------------------------------------------------------------------------------- /.icons/video-x-generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/.icons/video-x-generic.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Jessie Frazelle 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Directory Theme 2 | A simple, customizable theme for your **Apache** or **nginx** directory listing. 3 | Here is a demo of what the result looks like: [gif library](http://gifs.jessfraz.com). 4 | 5 | **Features** 6 | 7 | - search the directory and display results, as the user inputs the search term 8 | - custom styling of the default directory indexing 9 | - ```.html``` files are linked to without the file extension (ex. http://localhost/example.html -> http://localhost/example) 10 | - changes "Last modified" column to display time as time since (ex. 2 minutes ago, 4 days ago, etc) 11 | 12 | **Apache Features** 13 | 14 | ## Apache Setup 15 | Be sure you have ```mod_autoindex``` loaded on your server. 16 | 17 | ```bash 18 | $ cd into_vhost_root_directory_you_want_to_be_prettified/ 19 | $ git clone git@github.com:jessfraz/directory-theme.git 20 | 21 | # move the directory contents to the parent directory 22 | $ cd directory-theme/ 23 | $ mv * .[^.]* .. 24 | # you may get an output of: mv: cannot stat ‘*’: No such file or directory 25 | # that's fine, if you `ls -a` the directory it should be empty 26 | $ cd ../ 27 | 28 | # remove nginx items & .git just so it doesn't mess with your other stuff 29 | $ rm -rf directory-theme.conf 30 | $ rm -rf .git* 31 | ``` 32 | 33 | Then, view your virtual host in your favorite browser, *cough* **Chrome** *cough*. 34 | 35 | ## nginx Setup 36 | Be sure you have [```ngx_http_addition_module```](http://nginx.org/en/docs/http/ngx_http_addition_module.html) loaded on your server. 37 | 38 | ```bash 39 | $ cd into_vhost_root_directory_you_want_to_be_prettified/ 40 | $ git clone git@github.com:jessfraz/directory-theme.git 41 | 42 | # move the directory contents to the parent directory 43 | $ cd directory-theme/ 44 | $ mv * .[^.]* .. 45 | # you may get an output of: mv: cannot stat ‘*’: No such file or directory 46 | # that's fine, if you `ls -a` the directory it should be empty 47 | $ cd ../ 48 | 49 | # remove apache items & .git just so it doesn't mess with your other stuff 50 | $ rm -rf .htaccess 51 | $ rm -rf .git* 52 | 53 | # rename directory-theme.conf to your site config name ex. lab.jessfraz.com 54 | # at the same time moving it to the sites-available folder 55 | $ sudo mv directory-theme.conf /etc/nginx/sites-available/lab.jessfraz.com 56 | 57 | # edit the relevant fields for your setup 58 | # these are server_name and root 59 | $ sudo vim /etc/nginx/sites-available/lab.jessfraz.com 60 | 61 | # activate the host by creating a symbolic link between 62 | # the sites-available directory and the sites-enabled directory 63 | $ sudo ln -s /etc/nginx/sites-available/lab.jessfraz.com /etc/nginx/sites-enabled/lab.jessfraz.com 64 | 65 | # restart nginx 66 | $ sudo service nginx restart 67 | ``` 68 | 69 | Then, view your virtual host in your favorite browser, *cough* **Chrome** *cough*. 70 | 71 | ### Credits 72 | Based off [apaxy](https://github.com/AdamWhitcroft/Apaxy) by Adam Whitcroft 73 | 74 | 75 | [](https://github.com/jessfraz/directory-theme) 76 | -------------------------------------------------------------------------------- /directory-theme.conf: -------------------------------------------------------------------------------- 1 | server { 2 | # listen 80 deferred; # for Linux 3 | # listen 80 accept_filter=httpready; # for FreeBSD 4 | listen 80; 5 | 6 | # The host name to respond to 7 | server_name lab.jessfraz.com; 8 | 9 | # Path for static files 10 | root /var/www/lab.jessfraz.com/public; 11 | 12 | # turn on indexing 13 | autoindex on; 14 | 15 | #Specify a charset 16 | charset utf-8; 17 | 18 | add_before_body /theme/nginx-header.html; 19 | add_after_body /theme/footer.html; 20 | 21 | # Custom 404 page 22 | error_page 404 /theme/404.html; 23 | 24 | # let non-html ending links point to the html file 25 | try_files $uri.html $uri $uri/ =404; 26 | } -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jessfraz/directory-theme/5ebaec435a9514f0040bab38951539ed5a9071cd/favicon.ico -------------------------------------------------------------------------------- /theme/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |Sorry, but the page you were trying to view does not exist.
151 |It looks like this was the result of either:
152 |