Skip to content
/ Han Public
forked from ethantw/Han

「漢字標準格式」印刷品般的漢字排版框架 Han.css: the CSS typography framework optimised for Hanzi.

License

Notifications You must be signed in to change notification settings

toniol/Han

This branch is 201 commits behind ethantw/Han:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Apr 30, 2015
99fa0d1 · Apr 30, 2015
Apr 30, 2015
Apr 25, 2015
Apr 30, 2015
Apr 30, 2015
Jan 5, 2015
Jan 8, 2015
Jul 17, 2014
Apr 30, 2015
Mar 26, 2015
Apr 30, 2015
Apr 30, 2015
Apr 30, 2015
Apr 30, 2015
Apr 30, 2015
Apr 16, 2015
Jan 8, 2015
Jan 8, 2015
Apr 30, 2015

Repository files navigation

漢字標準格式

「漢字標準格式」是一個集「語意樣式標準化」「文字設計」「高階排版功能」三大概念的Sass、JavaScript排版框架。其專為漢字網頁提供的美觀而標準化的環境,不僅符合傳統閱讀習慣、更為螢幕閱讀提供了既成標準,得以完整解決現今漢字網頁設計的排版需求。

「漢字標準格式」完整支援繁體中文、簡體中文及日文等三個採用漢字的語言文字。

[檢視範例測試頁 →] (http://ethantw.github.io/Han/latest/)

安裝

  • NPM npm install --save han-css
  • Bower bower install --save Han
  • Component component install ethantw/Han
  • Rails gem install 'hanzi-rails'詳細說明

定製

「漢字標準格式」提供多項定製功能,可經由變數設定、模組引用等方式定製專屬的樣式表。詳情請見使用手冊

使用CDN文件

若毋須特別定製,你也可以直接使用以預設値編譯的CDN外連樣式表、腳本及網頁字體,以求高速下載及快取。此服務由cdnjs.com提供

<link rel="stylesheet" media="all" href="//cdnjs.cloudflare.com/ajax/libs/Han/3.2.1/han.min.css">

腳本,

<script src="//cdnjs.cloudflare.com/ajax/libs/Han/3.2.1/han.min.js"></script>

Web字體,

  • WOFF //cdnjs.cloudflare.com/ajax/libs/Han/3.2.1/font/han.woff
  • OTF //cdnjs.cloudflare.com/ajax/libs/Han/3.2.1/font/han.otf

使用方式

  1. 在網頁所有樣式表引用經編譯的han.min.css(或使用Sass)。
  2. 依需求選用腳本han.min.js,並在<html>元素標籤上加入類別han-init以啓用DOM-ready渲染。
  3. 或依需求定製渲染方式,詳見使用手冊

可選用的腳本

「漢字標準格式」具低耦合、高度語意化等特性,樣式表與腳本各司其職、相互依賴性極低,並有多級樣式回退(fallback),故可依需求選用腳本。

常見問題

瀏覽器支援

  • Google Chrome(最新版)
  • Mozilla Firefox(最新版)
  • Opera Next(最新版)
  • Apple Safari 7+
  • Internet Explorer 10+

開發環境

歡迎參與「漢字標準格式」的開發。下列清單展示了部分常用的開發指令。

  • 安裝需要的開發模組:sudo npm i
  • 啓動開發環境:npm startgulp dev(包含本機運行及自動編譯)
  • 編譯發布文件:gulp build
  • 測試han.jsAPI:gulp test(PhantomJS)
  • 更新依賴模組:npm update && gulp dep

「漢字標準格式」版本:v3.2.1
本頁最後修改於:2015年5月1日 1:44(GMT+8)

About

「漢字標準格式」印刷品般的漢字排版框架 Han.css: the CSS typography framework optimised for Hanzi.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 33.5%
  • HTML 33.3%
  • CSS 29.4%
  • LiveScript 3.8%