2013-05-07 17:45:09 +00:00
{% capture stripe_ad_content %}
< p class = "lead" >
Setting up Font Awesome can be as simple as adding two lines of code to your website, or you can be a pro and
customize the LESS yourself! Font Awesome even plays nicely with
< a href = "{{ site.bootstrap.url }}" > Bootstrap< / a > !
< / p >
{% endcapture %}
{% include stripe-ad.html %}
2013-05-03 14:41:31 +00:00
2013-05-10 12:28:57 +00:00
< div id = "bootstrapcdn" >
2013-05-06 04:00:00 +00:00
< h2 class = "page-header" > EASIEST: < a href = "http://www.bootstrapcdn.com/#tab_fontawesome" > BootstrapCDN< / a > < / h2 >
2013-05-06 00:06:36 +00:00
< p > Add Font Awesome + Bootstrap into your website with two lines of code. You don't even have to download or install anything!< / p >
< ol >
< li >
Paste the following code into the < code > < head> < / code > section of your site's HTML.
2013-05-23 17:14:14 +00:00
{% highlight html %}
2013-05-06 03:34:45 +00:00
< link href = "//netdna.bootstrapcdn.com/twitter-bootstrap/{{ site.bootstrap.version }}/css/bootstrap-combined.no-icons.min.css" rel = "stylesheet" >
2013-05-23 20:22:45 +00:00
< link href = "//netdna.bootstrapcdn.com/font-awesome/{{ site.fontawesome.version }}/css/font-awesome.css" rel = "stylesheet" >
2013-05-06 00:06:36 +00:00
{% endhighlight %}
< div class = "alert alert-info margin-top" >
2013-10-01 02:07:49 +00:00
< i class = "fa fa-info-sign" > < / i > Want to use Font Awesome by itself without Bootstrap? Just don't include the first line.
2013-05-06 00:06:36 +00:00
< / div >
< / li >
< li >
Pat yourself on the back for your scalable-vector-icons-on-the-website
< a href = "http://37signals.com/svn/posts/312-lingo-judo" > judo solution< / a > in two lines of code.
< / li >
< li >
2013-05-09 03:15:29 +00:00
Check out the < a href = "{{ page.relative_path }}examples/" > examples< / a > to start using Font Awesome!
2013-05-06 00:06:36 +00:00
< / li >
< / ol >
2013-05-10 12:28:57 +00:00
< / div >
2013-05-06 00:06:36 +00:00
2013-05-10 12:28:57 +00:00
< section id = "default-css" >
2013-05-06 04:00:00 +00:00
< h2 class = "page-header" > EASY: Default CSS< / h2 >
2013-05-06 00:06:36 +00:00
< p > Use this method to get the default Font Awesome CSS with the default Bootstrap CSS.< / p >
< ol >
2013-05-08 04:31:48 +00:00
< li > Copy the < code > font-awesome< / code > directory into your project.< / li >
2013-05-06 00:06:36 +00:00
< li >
In the < code > < head> < / code > of your html, reference the location to your font-awesome.min.css.
2013-05-23 17:14:14 +00:00
{% highlight html %}
2013-05-08 04:31:48 +00:00
< link rel = "stylesheet" href = "path/to/bootstrap/css/bootstrap.min.css" >
< link rel = "stylesheet" href = "path/to/font-awesome/css/font-awesome.min.css" >
2013-05-06 00:06:36 +00:00
{% endhighlight %}
< / li >
2013-05-09 03:15:29 +00:00
< li > Check out the < a href = "{{ page.relative_path }}examples/" > examples< / a > to start using Font Awesome!< / li >
2013-05-06 00:06:36 +00:00
< / ol >
< / section >
2013-05-10 12:28:57 +00:00
< section id = "custom-less" >
2013-05-06 04:00:00 +00:00
< h2 class = "page-header" > PRO: Custom LESS< / h2 >
2013-05-08 04:31:48 +00:00
< p > Use this method to customize Font Awesome and Bootstrap {{ site.bootstrap.version }} using LESS.< / p >
2013-05-06 00:06:36 +00:00
< ol >
2013-05-08 04:31:48 +00:00
< li > Copy the < code > font-awesome< / code > directory into your project.< / li >
2013-06-14 21:32:23 +00:00
< li > Open your project's bootstrap/bootstrap.less and replace
2013-06-12 00:33:08 +00:00
{% highlight html %}
@import "sprites.less";
{% endhighlight %}
with
{% highlight html %}
@import "path/to/font-awesome/less/font-awesome.less";
{% endhighlight %}
< / li >
2013-05-06 00:06:36 +00:00
< li >
2013-06-14 21:32:23 +00:00
Open your project's font-awesome/variables.less and edit the < code > @FontAwesomePath< / code > variable to point to your font directory.
2013-05-23 17:14:14 +00:00
{% highlight html %}
2013-05-03 00:12:33 +00:00
@FontAwesomePath: "../font";
2013-05-06 00:06:36 +00:00
{% endhighlight %}
2013-10-01 02:07:49 +00:00
< p class = "alert alert-info" > < i class = "fa fa-info-sign" > < / i > The font path is relative from your compiled CSS directory.< / p >
2013-05-06 00:06:36 +00:00
< / li >
< li > Re-compile your LESS if using a static compiler. Otherwise, you should be good to go.< / li >
2013-05-09 03:15:29 +00:00
< li > Check out the < a href = "{{ page.relative_path }}examples/" > examples< / a > to start using Font Awesome!< / li >
2013-05-06 00:06:36 +00:00
< / ol >
< / section >
2013-05-10 12:28:57 +00:00
< section id = "not-using-bootstrap" >
2013-05-06 04:00:00 +00:00
< h2 class = "page-header" > Not using Bootstrap?< / h2 >
2013-05-06 00:06:36 +00:00
< p > Font Awesome works just as well without Bootstrap.< / p >
< ol >
2013-05-08 04:31:48 +00:00
< li > Copy the < code > font-awesome< / code > directory into your project.< / li >
< li > Follow the above directions and skip the Bootstrap parts.< / li >
2013-05-06 00:06:36 +00:00
< li > Open your project's font-awesome.less or font-awesome.min.css and edit the font location to point it to your font directory (see above examples).< / li >
2013-05-09 03:15:29 +00:00
< li > Check out the < a href = "{{ page.relative_path }}examples/" > examples< / a > to start using Font Awesome!< / li >
2013-05-06 00:06:36 +00:00
< / ol >
< / section >
2013-05-10 12:28:57 +00:00
< section class = "need-ie7" >
2013-05-06 04:00:00 +00:00
< h2 class = "page-header" > Need IE7 Support?< / h2 >
2013-05-06 00:06:36 +00:00
< p > Font Awesome supports IE7. If you need it, you have my condolences.< / p >
< ol >
< li > Get Font Awesome working properly in a modern browser.< / li >
< li > Copy font-awesome-ie7.min.css into your project.< / li >
< li >
In the < code > < head> < / code > of your html, reference the location to your font-awesome-ie7.min.css.
2013-05-23 17:14:14 +00:00
{% highlight html %}
2013-05-08 04:31:48 +00:00
< link rel = "stylesheet" href = "path/to/bootstrap/css/bootstrap.min.css" >
< link rel = "stylesheet" href = "path/to/font-awesome/css/font-awesome.min.css" >
2013-05-06 00:06:36 +00:00
<!-- [if IE 7]>
2013-05-08 04:31:48 +00:00
< link rel = "stylesheet" href = "path/to/font-awesome/css/font-awesome-ie7.min.css" >
2013-05-23 20:22:45 +00:00
<![endif]-->
{% endhighlight %}
2013-05-06 00:06:36 +00:00
< / li >
2013-07-01 22:12:25 +00:00
< li > Go complain to whomever decided your project needs IE7 support.< / li >
2013-05-06 00:06:36 +00:00
< / ol >
2013-05-03 00:12:33 +00:00
< / section >