Liking cljdoc? Tell your friends :D

Hiccup-Font-Awesome

Clojars Project

Hiccup-Font-Awesome provides Hiccup functions for Font Awesome.

Installation

Add the following dependency to your project.clj file:

[hiccup-font-awesome "0.1.0-SNAPSHOT"]

Note that if you're using Ring, you'll need version 1.1.0 or later.

Usage

Add the wrap-font-awesome-resources middleware to your handler to automatically add routes for the Font Awesome CSS files:

(use 'hiccup.font-awesome.middleware)

(def app
  (wrap-font-awesome-resources handler))

Then in your Hiccup template, add in include-font-awesome in the page header:

(use 'hiccup.core
     'hiccup.page
     'hiccup.font-awesome.page)

(defn page []
  (html5
    [:head
      [:title "Font-Awesome Example"]
      (include-font-awesome)]
    [:body
      [:h1 "Font-Awesome Example"]
      [:i.fa.fa-bomb]))

License

Copyright © 2016 Shigeaki Matsumura

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close