plugin/rubykaigi.rb in tdiary-contrib-4.1.1 vs plugin/rubykaigi.rb in tdiary-contrib-4.1.2

- old
+ new

@@ -7,10 +7,16 @@ # # Copyright (C) TADA Tadashi <t@tdtds.jp> # Distributed under GPL. # +def rubykaigi2014( role = 'attendee', size = nil ) + r = role.split(/[ _]+/).join('-') + s = "@#{h size}" unless size.nil? + %Q|<a href="http://rubykaigi.org/2014/" style="display:block;margin:8px auto;text-align:center;"><img src="http://rubykaigi.org/2014/images/badge-for-#{h r}#{s}.png" alt="RubyKaigi 2014 #{h r}"></a>| +end + def rubykaigi2013( role = 'attendee', size = nil ) r = role.split(/[ _]+/).map{|s| s.capitalize}.join s = "@#{h size}" unless size.nil? %Q|<a href="http://rubykaigi.org/2013/" style="display:block;margin:8px auto;text-align:center;"><img src="http://rubykaigi.org/2013/images/badge#{h r}#{s}.png" alt="RubyKaigi 2013 #{h r}"></a>| end @@ -81,10 +87,10 @@ 3 else role = 'attendee' 0 end - %Q|<div style="text-align: center; margin-top: 0.5em; margin-bottom: 0.5em;"><a href="http://jp.rubyist.net/RubyKaigi2008/"><img src="http://rubykaigi.tdiary.net/images/20080617_#{img}.png" width="160" height="79" alt="RubyKaigi2008#{h role.capitalize}" style="border-width: 0px;"></a></div>| + %Q|<div style="text-align: center; margin-top: 0.5em; margin-bottom: 0.5em;"><a href="http://jp.rubyist.net/RubyKaigi2008/"><img src="http://userimages.tdiary.net/rubykaigi/20080617_#{img}.png" width="160" height="79" alt="RubyKaigi2008#{h role.capitalize}" style="border-width: 0px;"></a></div>| end def sappororubykaigi02( role = 'attendee' ) %Q|<div style="text-align: center; margin-top: 0.5em; margin-bottom: 0.5em;"><a href="http://regional.rubykaigi.org/sapporo02/"><img src="http://ruby-sapporo.org/sappororubykaigi02/#{h role}.gif" width="160" height="90" alt="SapporoRubyKaigi02#{h role.capitalize}" style="border-width: 0px;"></a></div>| end