2
0

integration.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <section id="integration">
  2. <h2 class="page-header">Integration</h2>
  3. <p>It's easy to integrate Font Awesome into Twitter Bootstrap, or even use it on its own.</p>
  4. <div class="row">
  5. <div class="span12">
  6. <h4>Easy Bootstrap + Font Awesome Integration</h4>
  7. </div>
  8. <div class="span3">
  9. <p>Use this method to integrate Font Awesome with the default Bootstrap CSS.</p>
  10. </div>
  11. <div class="span9">
  12. <ol>
  13. <li>Copy the Font Awesome font directory into your project.</li>
  14. <li>Copy font-awesome.min.css into your project.</li>
  15. <li>
  16. Open your project's font-awesome.min.css and edit the font paths to ensure they point to the right place.
  17. <p class="alert alert-info"><i class="icon-info-sign"></i> The font path is relative from your CSS directory.</p>
  18. </li>
  19. <li>
  20. In the <code>&lt;head&gt;</code> of your html, reference the location to your font-awesome.min.css.
  21. <pre class="prettyprint linenums">
  22. &lt;link rel="stylesheet" href="../css/bootstrap.min.css"&gt;
  23. &lt;link rel="stylesheet" href="../css/font-awesome.min.css"&gt;
  24. </pre>
  25. </li>
  26. <li>Check out the examples to start using Font Awesome!</li>
  27. </ol>
  28. </div>
  29. </div>
  30. <div class="row">
  31. <div class="span12">
  32. <h4>Custom Bootstrap + Font Awesome Integration using LESS</h4>
  33. </div>
  34. <div class="span3">
  35. <p>Use this method to integrate Font Awesome with Twitter Bootstrap using LESS.</p>
  36. </div>
  37. <div class="span9">
  38. <ol>
  39. <li>Copy the Font Awesome font directory into your project.</li>
  40. <li>Copy font-awesome.less into your bootstrap/less directory.</li>
  41. <li>Open bootstrap.less and replace <code>@import "sprites.less";</code> with <code>@import "font-awesome.less";</code></li>
  42. <li>
  43. Open your project's font-awesome.less and edit the <code>@FontAwesomePath</code> variable to point to your font directory.
  44. <pre class="prettyprint linenums">
  45. @FontAwesomePath: "../font";
  46. </pre>
  47. <p class="alert alert-info"><i class="icon-info-sign"></i> The font path is relative from your compiled CSS directory.</p>
  48. </li>
  49. <li>Re-compile your LESS if using a static compiler. Otherwise, you should be good to go.</li>
  50. <li>Check out the examples to start using Font Awesome!</li>
  51. </ol>
  52. </div>
  53. </div>
  54. <div class="row">
  55. <div class="span12">
  56. <h4>Custom Bootstrap + Font Awesome Integration using SASS or SCSS</h4>
  57. <p>I have never used either, so let me know if the included SCSS or SASS files have issues.</p>
  58. </div>
  59. </div>
  60. <div class="row">
  61. <div class="span12">
  62. <h4>Not using Bootstrap?</h4>
  63. </div>
  64. <div class="span3">
  65. <p>Font Awesome works just as well without Twitter Bootstrap.</p>
  66. </div>
  67. <div class="span9">
  68. <ol>
  69. <li>Copy the Font Awesome font directory into your project.</li>
  70. <li>Copy font-awesome.less or font-awesome.min.css into your project.</li>
  71. <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>
  72. <li>Check out the examples to start using Font Awesome!</li>
  73. </ol>
  74. </div>
  75. </div>
  76. <div class="row">
  77. <div class="span12">
  78. <h4>Need IE7 Support?</h4>
  79. </div>
  80. <div class="span3">
  81. <p>Font Awesome supports IE7. If you need it, you have my condolences.</p>
  82. </div>
  83. <div class="span9">
  84. <ol>
  85. <li>Get Font Awesome working properly in a modern browser.</li>
  86. <li>Copy font-awesome-ie7.min.css into your project.</li>
  87. <li>
  88. In the <code>&lt;head&gt;</code> of your html, reference the location to your font-awesome-ie7.min.css.
  89. <pre class="prettyprint linenums">
  90. &lt;link rel="stylesheet" href="../css/bootstrap.min.css"&gt;
  91. &lt;link rel="stylesheet" href="../css/font-awesome.min.css"&gt;
  92. &lt;!--[if IE 7]&gt;
  93. &lt;link rel=&quot;stylesheet&quot; href=&quot;assets/css/font-awesome-ie7.min.css&quot;&gt;
  94. &lt;![endif]--&gt;
  95. </pre>
  96. </li>
  97. <li>Go complain to whoever decided your project needs IE7 support.</li>
  98. </ol>
  99. </div>
  100. </div>
  101. </section>