get-started.html 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. ---
  2. layout: base
  3. title: Get Started with Font Awesome
  4. navbar_active: get-started
  5. relative_path: ../
  6. ---
  7. {% capture jumbotron_h1 %}<i class="fa fa-cogs"></i>&nbsp; Get Started{% endcapture %}
  8. {% capture jumbotron_p %}Easy ways to get Font Awesome {{ site.fontawesome.version }} onto your website{% endcapture %}
  9. {% include jumbotron.html %}
  10. {% include stripe-social.html %}
  11. <div class="container">
  12. {% capture stripe_ad_content %}
  13. <p class="lead">
  14. Setting up Font Awesome can be as simple as adding two lines of code to your website, or you can be a pro and
  15. customize the LESS yourself! Font Awesome even plays nicely with
  16. <a href="{{ site.bootstrap.url }}">Bootstrap 3</a>!
  17. </p>
  18. {% endcapture %}
  19. {% include stripe-ad.html %}
  20. <div id="bootstrapcdn">
  21. <h2 class="page-header">EASIEST: <a href="http://www.bootstrapcdn.com/#fontawesome_tab">BootstrapCDN</a></h2>
  22. <p>Add Font Awesome into your website with a single line of code. You don't even have to download or install anything!</p>
  23. <ol>
  24. <li>
  25. Paste the following code into the <code>&lt;head&gt;</code> section of your site's HTML.
  26. {% highlight html %}
  27. <link href="//netdna.bootstrapcdn.com/font-awesome/{{ site.fontawesome.version }}/css/font-awesome.min.css" rel="stylesheet">
  28. {% endhighlight %}
  29. <p class="alert alert-success"><i class="fa fa-info-circle"></i> Immediately after release, it takes a bit of time for BootstrapCDN to catch up and get the newest version live on their CDN.</p>
  30. </li>
  31. <li>
  32. Pat yourself on the back for your scalable-vector-icons-on-the-website
  33. <a href="http://37signals.com/svn/posts/312-lingo-judo">judo solution</a> in a single line of code.
  34. </li>
  35. <li>
  36. Check out the <a href="{{ page.relative_path }}examples/">examples</a> to start using Font Awesome!
  37. </li>
  38. </ol>
  39. </div>
  40. <section id="default-css">
  41. <h2 class="page-header">EASY: Default CSS</h2>
  42. <p>Use this method to get the default Font Awesome CSS with the default Bootstrap CSS.</p>
  43. <ol>
  44. <li>Copy the entire <code>font-awesome</code> directory into your project.</li>
  45. <li>
  46. In the <code>&lt;head&gt;</code> of your html, reference the location to your font-awesome.min.css.
  47. {% highlight html %}
  48. <link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css">
  49. {% endhighlight %}
  50. </li>
  51. <li>Check out the <a href="{{ page.relative_path }}examples/">examples</a> to start using Font Awesome!</li>
  52. </ol>
  53. </section>
  54. <section id="ruby-gem-less">
  55. <h2 class="page-header">EASY: <a href="https://github.com/FortAwesome/font-awesome-less">LESS Ruby Gem</a></h2>
  56. <p>
  57. Use the <a href="https://github.com/FortAwesome/font-awesome-less">Official Font Awesome LESS Ruby Gem</a> to easily get Font
  58. Awesome LESS into a Rails project. Generously maintained by <a href="https://twitter.com/supercodepoet/">@supercodepoet</a>.
  59. </p>
  60. <ol>
  61. <li>
  62. Add this line to your application's Gemfile:
  63. {% highlight bash %}
  64. gem 'font-awesome-less'
  65. {% endhighlight %}
  66. </li>
  67. <li>
  68. And then execute:
  69. {% highlight bash %}
  70. $ bundle
  71. {% endhighlight %}
  72. </li>
  73. <li>Or install it yourself as:
  74. {% highlight bash %}
  75. $ gem install font-awesome-less
  76. {% endhighlight %}
  77. </li>
  78. </ol>
  79. <p>
  80. If you use Rails, add this to your e.g. <code>application.css</code>, just before <code>*= require_self</code>:
  81. </p>
  82. {% highlight css %}
  83. *= require font-awesome
  84. {% endhighlight %}
  85. </section>
  86. <section id="ruby-gem-sass">
  87. <h2 class="page-header">EASY: <a href="https://github.com/FortAwesome/font-awesome-sass">SASS Ruby Gem</a></h2>
  88. <p>
  89. Use the <a href="https://github.com/FortAwesome/font-awesome-sass">Official Font Awesome SASS Ruby Gem</a> to easily get Font
  90. Awesome SASS into a Rails or Compass project. Generously maintained by <a href="https://twitter.com/supercodepoet/">@supercodepoet</a>.
  91. </p>
  92. <ol>
  93. <li>
  94. Add this line to your application's Gemfile:
  95. {% highlight bash %}
  96. gem 'font-awesome-sass'
  97. {% endhighlight %}
  98. </li>
  99. <li>
  100. And then execute:
  101. {% highlight bash %}
  102. $ bundle
  103. {% endhighlight %}
  104. </li>
  105. <li>Or install it yourself as:
  106. {% highlight bash %}
  107. $ gem install font-awesome-sass
  108. {% endhighlight %}
  109. </li>
  110. </ol>
  111. <p>
  112. If you use Rails, add this to your e.g. <code>application.css</code>, just before <code>*= require_self</code>:
  113. </p>
  114. {% highlight css %}
  115. *= require font-awesome
  116. {% endhighlight %}
  117. </section>
  118. <section id="custom-less">
  119. <h2 class="page-header">PRO: Custom LESS or SASS</h2>
  120. <p>Use this method to customize Font Awesome {{ site.fontawesome.version }} using LESS or SASS.</p>
  121. <ol>
  122. <li>Copy the <code>font-awesome/</code> directory into your project.</li>
  123. <li>
  124. Open your project's <code>font-awesome/less/variables.less</code> or <code>font-awesome/scss/_variables.scss</code> and edit the <code>@fa-font-path</code> or <code>$fa-font-path</code>
  125. variable to point to your font directory.
  126. {% highlight scss %}
  127. @fa-font-path: "../font";
  128. {% endhighlight %}
  129. <p class="alert alert-success"><i class="fa fa-info-circle"></i> The font path is relative from your compiled CSS directory.</p>
  130. </li>
  131. <li>Re-compile your LESS or SASS if using a static compiler. Otherwise, you should be good to go.</li>
  132. <li>Check out the <a href="{{ page.relative_path }}examples/">examples</a> to start using Font Awesome!</li>
  133. </ol>
  134. </section>
  135. <section class="need-ie7">
  136. <h2 class="page-header">Need IE7 Support?</h2>
  137. <p>
  138. If you need IE7 support, you have my condolences. Really. Font Awesome {{ site.fontawesome.version }}
  139. doesn't support IE7, but an older version does. You'll need to check out the
  140. <a href="{{ page.relative_path }}3.2.1/get-started/#need-ie7">3.2.1 instructions for using IE7</a>. Then go complain to
  141. whomever decided your project needs IE7 support.
  142. </p>
  143. </section>
  144. <section id="troubleshooting">
  145. <h2 class="page-header">Troubleshooting</h2>
  146. <p>
  147. If you're having trouble with Font Awesome, make sure to check out the
  148. <a href="{{ site.fontawesome.github.url }}/wiki/Troubleshooting">troubleshooting wiki page</a>.
  149. Generously maintained by <a href="https://twitter.com/gtagliala">@gtagliala</a>.
  150. </p>
  151. </section>
  152. </div>