No commit activity in last 3 years
No release in over 3 years
Bundled Faenza Icons are copyright by their respective owners and redistributed under the terms of the GPL license.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

~> 4.0
 Project Readme

Faenza File Icons

  • Description
  • Installation
  • Usage
    • Title and Meta Tags
  • License
  • Credits

Description

This gem provides a subset of the Faenza icons for use in your rails application as file type icons.

Installation

Add the following line to your Gemfile:

gem 'faenza-file-icons-rails'

Then run:

bundle install
rails g faenza

This will install all available icons in public/filetype-icons/ and create an initializer that you can use to access them.

Usage

You can add a helper method in application_helpers.rb similar to this to fetch the icon src path for a given file type:

def icon_for(type)
    "/" + (FAENZA_ICONS_FILES[type] || FAENZA_ICONS_FILES["unknown"])
end

You can then use this helper in your views as follows:

<img src="<% icon_for "png" %>" alt="icon"/>

License

Released under the GPL License.

Credits

Faenza icons. Visit the project page to obtain the icon source.