billy3321 / hanzi-rails

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hanzi::Rails

This is a rails gem which provides Sass/JavaScript typesetting framework Han.css.

You can read more about han.css at here and read manual at here

han.css is made by Chen Yijun (陳奕鈞,http://yijun.me/).

Installation

Add this line to your application's Gemfile:

gem 'hanzi-rails'

And then execute:

$ bundle

Or install it yourself as:

$ gem install hanzi-rails

Usage

The han.css files will be added to the asset pipeline and available for you to use. Add the line to app/assets/stylesheets/application.css:

*= require hanzi

If you need to use the javascript render function, Add these lines to app/assets/javascripts/application.js:

//= require hanzi

Han.init();

Or add class han-init and correct lang attribute to html tag.

<html lang="zh-Hant" class="han-init">

For more information, please read the manual.

Contributing

  1. Fork it ( https://github.com/billy3321/hanzi-rails/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

License:MIT License


Languages

Language:JavaScript 52.2%Language:HTML 47.1%Language:Ruby 0.7%