Skip to content

Commit

Permalink
build demo_index.html for Greasemonkey userscript test.
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangxin committed Jul 15, 2011
1 parent 6fbf118 commit 5ffd2db
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/screencast.html
/index.html
/demo*.html
/errata.html
*.json
4 changes: 4 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ SCAST_TMPL = File.expand_path('html/templates/scast.erb')
INDEX_TMPL = File.expand_path('html/templates/index.erb')
SCAST_HTML = File.expand_path('screencast.html')
INDEX_HTML = File.expand_path('index.html')
DEMO_INDEX_HTML = File.expand_path('demo_index.html')
ERRATA_HTML = File.expand_path('errata.html')

class ArgsBinding
Expand Down Expand Up @@ -154,6 +155,9 @@ file :html_index => ['README.mkd', INDEX_TMPL] do |t|
mkd2html :title => "《Git权威指南》", :subtitle => "参考资料",
:source => t.prerequisites[0], :template => t.prerequisites[1], :output => INDEX_HTML,
:extra_js => ['html/inc/jquery-1.6.2.min.js', 'html/inc/click_more.js']

mkd2html :title => "《Git权威指南》", :subtitle => "参考资料",
:source => t.prerequisites[0], :template => t.prerequisites[1], :output => DEMO_INDEX_HTML
end

file :html_errata => ['errata.mkd', INDEX_TMPL] do |t|
Expand Down
14 changes: 10 additions & 4 deletions html/inc/click_more.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
/*
* click_more.js
* Copyright 2011, Jiang Xin
*/
// ==UserScript==
// @name Click more for toggle
// @namespace gotgit
// @description Add a toogle effect at the location where anchor with a click-more css.
// @include http://www.ossxp.com/doc/gotgit/demo*
// @require http://code.jquery.com/jquery-1.6.2.min.js
// ==/UserScript==

// Host on https://gist.github.com/1084591
// Copyright 2011, Jiang Xin

$(function(){

Expand Down

0 comments on commit 5ffd2db

Please sign in to comment.