font-awesome-rails 3.2.0.0 → 4.7.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +6 -14
- data/LICENSE +1 -1
- data/README.md +93 -55
- data/app/assets/fonts/FontAwesome.otf +0 -0
- data/app/assets/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/fonts/fontawesome-webfont.svg +2668 -396
- data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/fonts/fontawesome-webfont.woff2 +0 -0
- data/app/assets/stylesheets/font-awesome.css.erb +1549 -678
- data/app/helpers/font_awesome/rails/icon_helper.rb +100 -0
- data/lib/font-awesome-rails/engine.rb +3 -5
- data/lib/font-awesome-rails/version.rb +4 -5
- data/test/dummy/.gitignore +2 -0
- data/test/dummy/app/assets/config/manifest.js +3 -0
- data/test/dummy/app/assets/stylesheets/sprockets-require.css +1 -1
- data/test/dummy/app/controllers/pages_controller.rb +2 -0
- data/test/dummy/app/views/pages/icons.html.erb +3 -0
- data/test/dummy/config/application.rb +1 -0
- data/test/dummy/config/initializers/secret_token.rb +16 -2
- data/test/dummy/config/routes.rb +1 -0
- data/test/font_awesome_rails_test.rb +19 -11
- data/test/icon_helper_test.rb +138 -0
- metadata +47 -54
- data/app/assets/stylesheets/font-awesome-ie7.css +0 -1197
- data/app/assets/stylesheets/font-awesome-ie7.min.css +0 -382
- data/test/dummy/log/test.log +0 -9511
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
NDcxYjVkY2ZlZWRkNmVjY2ZkNmVjZjYxMmI2MGU1YzY0MWY2YTA5ZmI1NjEy
|
10
|
-
ZTk0ZmE2YTViYmZlN2YwZDMwNDNmYmEzOTIwMTZkNjcwNGQ2ZjYxYTdjYWZh
|
11
|
-
ZGYzMzEzMzFkN2RmOGYxMDcwYTNkZmM2OGY5OWVhYzI2NDkyMWM=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NjFhYzhkN2FhYzZiYWRkNmRiNTk1NGU2NTJhNDZjMzc4ZTQ3YjY1NjczNjM1
|
14
|
-
NjQxNWE1NjdiYzg2NTllMWEzZDdmZjQzODFiZjA1ZTE2NWU2NDIyNjVmYTQ2
|
15
|
-
ZTU5MDZlMjhhNjIyNzM5MGFlODMwNDgzODMzYWVjM2NkOTUyZTc=
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '080d3193ebf3f975f4e6b969da8bda96beac39c5c9bfc1866607b72534517221'
|
4
|
+
data.tar.gz: 6551767e3713086b24d58ba291f5ffe6d2cb948b2ffb7dc5dee774cb1a6fd04f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d487678b52ad1381c3c1d5e8efb2c87d8c5e30a4e3dae68757f6f8329186b28e616d3f8787d35556bd1df69e011b73ef2ca495211b1d8686abf95f37abf15dff
|
7
|
+
data.tar.gz: 75860a618f4fb7ee56370a8b7ecf839d729e1e0902ba8ca7ae0181b12229485966a320b7191b562fa5d1ac35ab42af663b3586024c7c740a82678ddf9309eecf
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
# font-awesome-rails
|
1
|
+
# font-awesome-rails
|
2
|
+
|
3
|
+
[](https://rubygems.org/gems/font-awesome-rails)
|
4
|
+
[](https://github.com/bokmann/font-awesome-rails/actions?query=workflow%3ACI)
|
5
|
+
[](https://rubygems.org/gems/font-awesome-rails)
|
2
6
|
|
3
7
|
font-awesome-rails provides the
|
4
8
|
[Font-Awesome](http://fortawesome.github.com/Font-Awesome/) web fonts and
|
@@ -23,13 +27,14 @@ In your `application.css`, include the css file:
|
|
23
27
|
*= require font-awesome
|
24
28
|
*/
|
25
29
|
```
|
30
|
+
Then restart your webserver if it was previously running.
|
26
31
|
|
27
32
|
Congrats! You now have scalable vector icon support. Pick an icon and check out the
|
28
33
|
[FontAwesome Examples](http://fortawesome.github.io/Font-Awesome/examples/).
|
29
34
|
|
30
35
|
### Sass Support
|
31
36
|
|
32
|
-
If you prefer [SCSS](http://sass-lang.com/
|
37
|
+
If you prefer [SCSS](http://sass-lang.com/documentation/file.SASS_REFERENCE.html), add this to your
|
33
38
|
`application.css.scss` file:
|
34
39
|
|
35
40
|
```scss
|
@@ -44,74 +49,107 @@ add this to your `application.css.sass` file:
|
|
44
49
|
@import font-awesome
|
45
50
|
```
|
46
51
|
|
47
|
-
###
|
52
|
+
### Helpers
|
48
53
|
|
49
|
-
|
50
|
-
|
51
|
-
provide the `font-awesome-ie7.min.css` stylesheet to Internet Explorer.
|
54
|
+
There are also some helpers (`fa_icon` and `fa_stacked_icon`) that make your
|
55
|
+
views _icontastic!_
|
52
56
|
|
53
|
-
```
|
54
|
-
|
55
|
-
|
56
|
-
<![endif]-->
|
57
|
-
```
|
57
|
+
```ruby
|
58
|
+
fa_icon "camera-retro"
|
59
|
+
# => <i class="fa fa-camera-retro"></i>
|
58
60
|
|
59
|
-
|
61
|
+
fa_icon "camera-retro", text: "Take a photo"
|
62
|
+
# => <i class="fa fa-camera-retro"></i> Take a photo
|
60
63
|
|
61
|
-
|
62
|
-
|
63
|
-
= stylesheet_link_tag "font-awesome-ie7.min.css", media: "all"
|
64
|
-
```
|
64
|
+
fa_icon "chevron-right", text: "Get started", right: true
|
65
|
+
# => Get started <i class="fa fa-chevron-right"></i>
|
65
66
|
|
66
|
-
|
67
|
+
fa_icon "quote-left 4x", class: "text-muted pull-left"
|
68
|
+
# => <i class="fa fa-quote-left fa-4x text-muted pull-left"></i>
|
67
69
|
|
68
|
-
|
69
|
-
|
70
|
+
content_tag(:li, fa_icon("check li", text: "Bulleted list item"))
|
71
|
+
# => <li><i class="fa fa-check fa-li"></i> Bulleted list item</li>
|
70
72
|
```
|
71
73
|
|
72
|
-
|
73
|
-
|
74
|
-
|
74
|
+
```ruby
|
75
|
+
fa_stacked_icon "twitter", base: "square-o"
|
76
|
+
# => <span class="fa-stack">
|
77
|
+
# => <i class="fa fa-square-o fa-stack-2x"></i>
|
78
|
+
# => <i class="fa fa-twitter fa-stack-1x"></i>
|
79
|
+
# => </span>
|
80
|
+
|
81
|
+
fa_stacked_icon "dollar inverse", base: "circle", class: "fa-5x"
|
82
|
+
# => <span class="fa-stack fa-5x">
|
83
|
+
# => <i class="fa fa-circle fa-stack-2x"></i>
|
84
|
+
# => <i class="fa fa-dollar fa-inverse fa-stack-1x"></i>
|
85
|
+
# => </span>
|
86
|
+
|
87
|
+
fa_stacked_icon "terminal inverse", base: "square", class: "pull-right", text: "Hi!"
|
88
|
+
# => <span class="fa-stack pull-right">
|
89
|
+
# => <i class="fa fa-square fa-stack-2x"></i>
|
90
|
+
# => <i class="fa fa-terminal fa-inverse fa-stack-1x"></i>
|
91
|
+
# => </span> Hi!
|
75
92
|
|
76
|
-
```css
|
77
|
-
/*
|
78
|
-
*= require font-awesome-ie7.min
|
79
|
-
*/
|
80
93
|
```
|
81
94
|
|
82
|
-
##
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
95
|
+
## Misc
|
96
|
+
|
97
|
+
### Rails engines
|
98
|
+
|
99
|
+
When building a Rails engine that includes font-awesome-rails as a dependency,
|
100
|
+
be sure to `require "font-awesome-rails"` somewhere during the initialization of
|
101
|
+
your engine. Otherwise, Rails will not automatically pick up the load path of
|
102
|
+
the font-awesome-rails assets and helpers ([source 1](https://github.com/bokmann/font-awesome-rails/issues/130#issuecomment-95308175), [source 2](https://bibwild.wordpress.com/2013/02/27/gem-depends-on-rails-engine-gem-gotcha-need-explicit-require/), [source 3](http://stackoverflow.com/questions/5159607/rails-engine-gems-dependencies-how-to-load-them-into-the-application/5850503#5850503)).
|
103
|
+
|
104
|
+
### Deploying to sub-folders
|
105
|
+
|
106
|
+
It is sometimes the case that deploying a Rails application to a production
|
107
|
+
environment requires the application to be hosted at a sub-folder on the server.
|
108
|
+
This may be the case, for example, if Apache HTTPD or Nginx is being used as a
|
109
|
+
front-end proxy server, with Rails handling only requests that come in to a sub-folder
|
110
|
+
such as `http://example.com/myrailsapp`. In this case, the
|
111
|
+
FontAwesome gem (and other asset-serving engines) needs to know the sub-folder,
|
112
|
+
otherwise you can experience a problem roughly described as ["my app works
|
113
|
+
fine in development, but fails when I deploy
|
114
|
+
it"](https://github.com/bokmann/font-awesome-rails/issues/74).
|
115
|
+
|
116
|
+
To fix this, set the *relative URL root* for the application. In the
|
117
|
+
environment file for the deployed version of the app, for example
|
118
|
+
`config/environments/production.rb`,
|
119
|
+
set the config option `action_controller.relative_url_root`:
|
120
|
+
|
121
|
+
MyApp::Application.configure do
|
122
|
+
...
|
123
|
+
|
124
|
+
# set the relative root, because we're deploying to /myrailsapp
|
125
|
+
config.action_controller.relative_url_root = "/myrailsapp"
|
126
|
+
|
127
|
+
...
|
128
|
+
end
|
129
|
+
|
130
|
+
The default value of this variable is taken from `ENV['RAILS_RELATIVE_URL_ROOT']`,
|
131
|
+
so configuring the environment to define `RAILS_RELATIVE_URL_ROOT` is an alternative strategy.
|
132
|
+
|
133
|
+
In addition you need to indicate the subfolder when you *precompile* the assets:
|
134
|
+
|
135
|
+
RAILS_ENV=production bundle exec rake assets:precompile RAILS_RELATIVE_URL_ROOT=/myrailsapp
|
136
|
+
|
137
|
+
### Rails 3.2
|
138
|
+
|
139
|
+
**Note:** In Rails 3.2, make sure font-awesome-rails is outside the bundler asset group
|
140
|
+
so that these helpers are automatically loaded in production environments.
|
141
|
+
|
142
|
+
## Versioning
|
143
|
+
|
144
|
+
Versioning follows the core releases of Font-Awesome which follows Semantic
|
145
|
+
Versioning 2.0 as defined at <http://semver.org>. We will do our best not to
|
146
|
+
make any breaking changes until Font-Awesome core makes a major version bump.
|
109
147
|
|
110
148
|
## License
|
111
149
|
|
112
|
-
* The [Font Awesome](http://fortawesome.github.
|
150
|
+
* The [Font Awesome](http://fortawesome.github.io/Font-Awesome) font is
|
113
151
|
licensed under the [SIL Open Font License](http://scripts.sil.org/OFL).
|
114
|
-
* [Font Awesome](http://fortawesome.github.
|
152
|
+
* [Font Awesome](http://fortawesome.github.io/Font-Awesome) CSS files are
|
115
153
|
licensed under the
|
116
154
|
[MIT License](http://opensource.org/licenses/mit-license.html).
|
117
155
|
* The remainder of the font-awesome-rails project is licensed under the
|
Binary file
|
Binary file
|