matsu911 / hiccup-font-awesome

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

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

License:Eclipse Public License 1.0


Languages

Language:Clojure 100.0%