Changeset 20539 for platform/tdiary/plugin
- Timestamp:
- 10/03/08 02:18:38 (2 months ago)
- Files:
-
- 1 modified
-
platform/tdiary/plugin/github_badge.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
platform/tdiary/plugin/github_badge.rb
r20535 r20539 3 3 # 4 4 # usage: 5 # github_badge(github_username) 6 # - github_username: user name on github.com 5 # github_badge(username, list_length, head, theme, title, show_all) 6 # - username: user name on github.com 7 # - list_length: project list length 8 # - theme: specify theme for badge. "white" or "black". 9 # - title: top text display on the badge. 10 # - show_all: 'Show All' message. 7 11 # 8 12 # Copyright (c) 2008 KAKUTANI Shintaro <http://kakutani.com/> 9 13 # Distributed under the GPL 10 14 11 def github_badge( github_username, list_length = 10, github_head = "div", github_theme = "white", github_title = "My Projects", show_all = "Show all" )15 def github_badge( username, list_length = 10, head = "div", theme = "white", title = "My Projects", show_all = "Show all" ) 12 16 return (<<-EOS).chomp 13 17 <div id="github-badge"></div> 14 18 <script type="text/javascript" charset="utf-8"> 15 GITHUB_USERNAME="#{ github_username }";16 GITHUB_LIST_LENGTH=#{ list_length};17 GITHUB_THEME="#{ github_theme}";18 GITHUB_TITLE="#{ github_title}"19 GITHUB_SHOW_ALL = " Show all"19 GITHUB_USERNAME="#{ username }"; 20 GITHUB_LIST_LENGTH=#{ list_length }; 21 GITHUB_THEME="#{ theme }"; 22 GITHUB_TITLE="#{ title }" 23 GITHUB_SHOW_ALL = "#{ show_all }" 20 24 </script> 21 25 <script src="http://drnicjavascript.rubyforge.org/github_badge/dist/github-badge-launcher.js" type="text/javascript"></script>
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)