From 8a3e9fcb53d3c9e876535e0d262a469ed446f2ff Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 9 Feb 2012 10:14:42 -0200 Subject: Adding custom icons --- templates/alias.conf.erb | 24 ++++++++++++++ templates/apache2.conf.erb | 77 ------------------------------------------ templates/autoindex.conf.erb | 79 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+), 77 deletions(-) create mode 100644 templates/alias.conf.erb create mode 100644 templates/autoindex.conf.erb (limited to 'templates') diff --git a/templates/alias.conf.erb b/templates/alias.conf.erb new file mode 100644 index 0000000..342213b --- /dev/null +++ b/templates/alias.conf.erb @@ -0,0 +1,24 @@ + +# +# Aliases: Add here as many aliases as you need (with no limit). The format is +# Alias fakename realname +# +# Note that if you include a trailing / on fakename then the server will +# require it to be present in the URL. So "/icons" isn't aliased in this +# example, only "/icons/". If the fakename is slash-terminated, then the +# realname must also be slash terminated, and if the fakename omits the +# trailing slash, the realname must also omit it. +# +# We include the /icons/ alias for FancyIndexed directory listings. If +# you do not use FancyIndexing, you may comment this out. +# +Alias /icons/ "<%= $apache_www_folder %>" + +"> + Options Indexes MultiViews + AllowOverride None + Order allow,deny + Allow from all + + + diff --git a/templates/apache2.conf.erb b/templates/apache2.conf.erb index ee28bdc..6bb03a5 100644 --- a/templates/apache2.conf.erb +++ b/templates/apache2.conf.erb @@ -225,83 +225,6 @@ ServerTokens Prod # ServerSignature On -# -# Directives controlling the display of server-generated directory listings. -# - - - # - # IndexOptions: Controls the appearance of server-generated directory - # listings. - # - IndexOptions FancyIndexing VersionSort HTMLTable NameWidth=* - - # - # AddIcon* directives tell the server which icon to show for different - # files or filename extensions. These are only displayed for - # FancyIndexed directories. - # - AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip - - AddIconByType (TXT,/icons/text.gif) text/* - AddIconByType (IMG,/icons/image2.gif) image/* - AddIconByType (SND,/icons/sound2.gif) audio/* - AddIconByType (VID,/icons/movie.gif) video/* - - AddIcon /icons/binary.gif .bin .exe - AddIcon /icons/binhex.gif .hqx - AddIcon /icons/tar.gif .tar - AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv - AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip - AddIcon /icons/a.gif .ps .ai .eps - AddIcon /icons/layout.gif .html .shtml .htm .pdf - AddIcon /icons/text.gif .txt - AddIcon /icons/c.gif .c - AddIcon /icons/p.gif .pl .py - AddIcon /icons/f.gif .for - AddIcon /icons/dvi.gif .dvi - AddIcon /icons/uuencoded.gif .uu - AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl - AddIcon /icons/tex.gif .tex - AddIcon /icons/bomb.gif core - - AddIcon /icons/back.gif .. - AddIcon /icons/hand.right.gif README - AddIcon /icons/folder.gif ^^DIRECTORY^^ - AddIcon /icons/blank.gif ^^BLANKICON^^ - - # - # DefaultIcon is which icon to show for files which do not have an icon - # explicitly set. - # - DefaultIcon /icons/unknown.gif - - # - # AddDescription allows you to place a short description after a file in - # server-generated indexes. These are only displayed for FancyIndexed - # directories. - # Format: AddDescription "description" filename - # - #AddDescription "GZIP compressed document" .gz - #AddDescription "tar archive" .tar - #AddDescription "GZIP compressed tar archive" .tgz - - # - # ReadmeName is the name of the README file the server will look for by - # default, and append to directory listings. - # - # HeaderName is the name of a file which should be prepended to - # directory indexes. - ReadmeName README.html - HeaderName HEADER.html - - # - # IndexIgnore is a set of filenames which directory indexing should ignore - # and not include in the listing. Shell-style wildcarding is permitted. - # - IndexIgnore .??* *~ *# RCS CVS *,v *,t - - # diff --git a/templates/autoindex.conf.erb b/templates/autoindex.conf.erb new file mode 100644 index 0000000..9d21242 --- /dev/null +++ b/templates/autoindex.conf.erb @@ -0,0 +1,79 @@ + +# +# Directives controlling the display of server-generated directory listings. +# + +IndexOptions FancyIndexing VersionSort SuppressDescription XHTML HTMLTable FoldersFirst NameWidth=* Charset=UTF-8 + +# AddIcon* directives tell the server which icon to show for different +# files or filename extensions. These are only displayed for +# FancyIndexed directories. +# + +# Custom FileType Icons by Arne Fahrenwalde + +# Pictures +AddIcon /icons/image.png .jpg .jp2 .jif .jpeg .tiff .tif .pict .pct .bmp .gif .png .psd .tga .ai .indd .fh* .fh10 .xcf .svg + +# Application +AddIcon /icons/app.png .app + +# Movies +AddIcon /icons/movie.png .mov .mpg .mpeg .m2v .avi .divx .xvid .swf .wmv .wma .wm* .ram .rm .ogm .ogv + +# Documents +AddIcon /icons/txt.png .txt .text .log +AddIcon /icons/html.png .htm .html .xml .php .shtml .xhtml +AddIcon /icons/odt.png .odt .rtf .doc .ps .pdf +AddIcon /icons/ods.png .ods .xls +AddIcon /icons/odp.png .odp .ppt .pps + +# Compressed Archives +AddIcon /icons/compressed.png .sit .sitx .zip .tar .gtar .gnutar .ustar .gz .tgz .tar-gz .hqx .bin .macbin .as .arc .arj .btoa .bz2 .tbz .tbz2 .cab .z .Z .sea .taz .tar-z .cpt .lza .lha .pf .rar .uu .uue .ync .y + +# Sound Files +AddIcon /icons/sound.png .mp3 .m4a .mp4 .m4* .wav .aif .aiff .ogg .oga .spx .flac + +# Disk Images & PKGs +AddIcon /icons/iso.png .dmg .iso .smi .img .toast +AddIcon /icons/deb.png .pkg .deb +AddIcon /icons/rpm.png .rpm + +# Add-On + +AddIcon /icons/h.png .h +AddIcon /icons/jar.png .jar +AddIcon /icons/log.png .log +AddIcon /icons/script.png .scpt .command .term .sh + +# iWork +AddIcon /icons/pages.png .pages +AddIcon /icons/keynote.png .key + +# standard-types +AddIcon /icons/bomb.png core + +AddIcon /icons/back.png .. +AddIcon /icons/hand.right.gif README +AddIcon /icons/folder.png ^^DIRECTORY^^ +AddIcon /icons/blank.png ^^BLANKICON^^ + +# other Types +AddIconByEncoding (CMP,/icons/compressed.png) x-compress x-gzip +AddIconByType (TXT,/icons/text.png) text/* +AddIconByType (IMG,/icons/image.png) image/* +AddIconByType (SND,/icons/sound.png) audio/* +AddIconByType (VID,/icons/movie.png) video/* + +# +# DefaultIcon is which icon to show for files which do not have an icon +# explicitly set. +# +DefaultIcon /icons/unknown.png + +# +# IndexIgnore is a set of filenames which directory indexing should ignore +# and not include in the listing. Shell-style wildcarding is permitted. +# +IndexIgnore .??* *~ *# RCS CVS *,v *,t + -- cgit v1.2.3