rabbit 1.0.9 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/GPL +19 -20
- data/Rakefile +25 -10
- data/bin/rabbit +20 -844
- data/bin/rabbit-command +25 -36
- data/bin/rabbit-slide +22 -0
- data/bin/rabbit-theme +22 -0
- data/bin/rabbit-theme-manager +30 -30
- data/data/account.kou.gpg +0 -0
- data/data/locale/en/LC_MESSAGES/rabbit.mo +0 -0
- data/data/locale/fr/LC_MESSAGES/rabbit.mo +0 -0
- data/data/locale/ja/LC_MESSAGES/rabbit.mo +0 -0
- data/doc/_config.yml +8 -0
- data/doc/_includes/en.menu.html +8 -0
- data/doc/_includes/ja.menu.html +8 -0
- data/doc/_layouts/en.html +19 -16
- data/doc/_layouts/ja.html +19 -16
- data/doc/_plugins/converters/rd.rb +1 -1
- data/doc/_plugins/support_symlink.rb +11 -0
- data/doc/en/development.rd +2 -2
- data/doc/en/how-to-make/index.rd +5 -5
- data/doc/en/how-to-make/rd.rd +1 -1
- data/doc/en/index.rd +6 -12
- data/doc/en/sample/index.rd +3 -3
- data/doc/en/slides.rd +2 -0
- data/doc/en/usage.rd +14 -356
- data/doc/en/usage/rabbit.rd +360 -0
- data/doc/en/users.rd +3 -1
- data/doc/images/screenshots/en/blue-circle-raw.png +0 -0
- data/doc/images/screenshots/en/blue-circle.png +0 -0
- data/doc/images/screenshots/en/clear-blue-raw.png +0 -0
- data/doc/images/screenshots/en/clear-blue.png +0 -0
- data/doc/images/screenshots/en/cozmixng-raw.png +0 -0
- data/doc/images/screenshots/en/cozmixng.png +0 -0
- data/doc/images/screenshots/en/dark-gradation-raw.png +0 -0
- data/doc/images/screenshots/en/dark-gradation.png +0 -0
- data/doc/images/screenshots/en/day-white.png +0 -0
- data/doc/images/screenshots/en/debian-raw.png +0 -0
- data/doc/images/screenshots/en/debian.png +0 -0
- data/doc/images/screenshots/en/green-circle-raw.png +0 -0
- data/doc/images/screenshots/en/green-circle.png +0 -0
- data/doc/images/screenshots/en/night-black.png +0 -0
- data/doc/images/screenshots/en/rabbit-raw.png +0 -0
- data/doc/images/screenshots/en/rabbit.png +0 -0
- data/doc/images/screenshots/en/ranguba-raw.png +0 -0
- data/doc/images/screenshots/en/ranguba.png +0 -0
- data/doc/images/screenshots/en/red-frame-raw.png +0 -0
- data/doc/images/screenshots/en/red-frame.png +0 -0
- data/doc/images/screenshots/en/ruby-gnome2-raw.png +0 -0
- data/doc/images/screenshots/en/ruby-gnome2.png +0 -0
- data/doc/images/screenshots/en/rubykaigi2011-raw.png +0 -0
- data/doc/images/screenshots/en/rubykaigi2011.png +0 -0
- data/doc/images/screenshots/ja/blue-circle-raw.png +0 -0
- data/doc/images/screenshots/ja/blue-circle.png +0 -0
- data/doc/images/screenshots/ja/clear-blue-raw.png +0 -0
- data/doc/images/screenshots/ja/clear-blue.png +0 -0
- data/doc/images/screenshots/ja/cozmixng-raw.png +0 -0
- data/doc/images/screenshots/ja/cozmixng.png +0 -0
- data/doc/images/screenshots/ja/dark-gradation-raw.png +0 -0
- data/doc/images/screenshots/ja/dark-gradation.png +0 -0
- data/doc/images/screenshots/ja/day-white.png +0 -0
- data/doc/images/screenshots/ja/debian-raw.png +0 -0
- data/doc/images/screenshots/ja/debian.png +0 -0
- data/doc/images/screenshots/ja/green-circle-raw.png +0 -0
- data/doc/images/screenshots/ja/green-circle.png +0 -0
- data/doc/images/screenshots/ja/night-black.png +0 -0
- data/doc/images/screenshots/ja/rabbit-raw.png +0 -0
- data/doc/images/screenshots/ja/rabbit.png +0 -0
- data/doc/images/screenshots/ja/ranguba-raw.png +0 -0
- data/doc/images/screenshots/ja/ranguba.png +0 -0
- data/doc/images/screenshots/ja/red-frame-raw.png +0 -0
- data/doc/images/screenshots/ja/red-frame.png +0 -0
- data/doc/images/screenshots/ja/ruby-gnome2-raw.png +0 -0
- data/doc/images/screenshots/ja/ruby-gnome2.png +0 -0
- data/doc/images/screenshots/ja/rubykaigi2011-raw.png +0 -0
- data/doc/images/screenshots/ja/rubykaigi2011.png +0 -0
- data/doc/index.html.en +1 -1
- data/doc/index.html.ja +1 -1
- data/doc/ja/about.rd +3 -3
- data/doc/ja/development.rd +2 -2
- data/doc/ja/how-to-make/index.rd +5 -5
- data/doc/ja/index.rd +10 -16
- data/doc/ja/install/macports.rd +1 -1
- data/doc/ja/news.rd +4 -4
- data/doc/ja/sample/index.rd +3 -3
- data/doc/ja/usage.rd +13 -358
- data/doc/ja/usage/rabbit.rd +362 -0
- data/doc/ja/users.rd +1 -1
- data/lib/rabbit/action.rb +2 -2
- data/lib/rabbit/author-configuration.rb +73 -0
- data/lib/rabbit/canvas.rb +0 -14
- data/lib/rabbit/command/rabbit-slide.rb +571 -0
- data/lib/rabbit/command/rabbit-theme.rb +381 -0
- data/lib/rabbit/command/rabbit.rb +898 -0
- data/lib/rabbit/config.rb +40 -0
- data/lib/rabbit/console.rb +124 -55
- data/lib/rabbit/gem-finder.rb +61 -0
- data/lib/rabbit/gettext.rb +6 -79
- data/lib/rabbit/html/generator.rb +1 -0
- data/lib/rabbit/image.rb +1 -1
- data/lib/rabbit/logger.rb +12 -2
- data/lib/rabbit/logger/base.rb +33 -32
- data/lib/rabbit/logger/stderr.rb +1 -1
- data/lib/rabbit/menu.rb +1 -1
- data/lib/rabbit/parser.rb +2 -0
- data/lib/rabbit/parser/ext/image.rb +14 -20
- data/lib/rabbit/path-manipulatable.rb +40 -0
- data/lib/rabbit/rabbit.rb +18 -8
- data/lib/rabbit/renderer/base.rb +3 -4
- data/lib/rabbit/renderer/color.rb +0 -1
- data/lib/rabbit/slideshare.rb +116 -0
- data/lib/rabbit/source/base.rb +1 -1
- data/lib/rabbit/stock.rb +1 -1
- data/lib/rabbit/task.rb +18 -0
- data/lib/rabbit/task/slide.rb +162 -0
- data/lib/rabbit/task/theme.rb +122 -0
- data/lib/rabbit/theme-browser/tree.rb +1 -1
- data/lib/rabbit/theme/applier.rb +9 -0
- data/lib/rabbit/theme/background-image-toolkit/background-image-toolkit.rb +1 -2
- data/lib/rabbit/theme/blue-bar/blue-bar.rb +0 -11
- data/lib/rabbit/theme/clear-blue/clear-blue.rb +0 -11
- data/lib/rabbit/theme/cozmixng/cozmixng.rb +0 -11
- data/lib/rabbit/theme/day-white/day-white.rb +0 -6
- data/lib/rabbit/theme/default/default.rb +7 -1
- data/lib/rabbit/theme/enishi-green/property.rb +2 -2
- data/lib/rabbit/theme/entry.rb +85 -27
- data/lib/rabbit/theme/image-slide-number/image-slide-number.rb +4 -1
- data/lib/rabbit/theme/lightning-monochrome/lightning-monochrome.rb +0 -1
- data/lib/rabbit/theme/lightning-simple/lightning-simple.rb +0 -1
- data/lib/rabbit/theme/nari/nari.rb +6 -16
- data/lib/rabbit/theme/nari/property.rb +3 -0
- data/lib/rabbit/theme/night-black/night-black.rb +0 -6
- data/lib/rabbit/theme/pdf/pdf.rb +0 -4
- data/lib/rabbit/theme/rabbit/rabbit.rb +0 -6
- data/lib/rabbit/theme/ranguba/ranguba.rb +0 -12
- data/lib/rabbit/theme/ruby-gnome2/ruby-gnome2.rb +7 -4
- data/lib/rabbit/theme/rubykaigi2011/rubykaigi2011.rb +2 -9
- data/lib/rabbit/theme/searcher.rb +38 -16
- data/lib/rabbit/theme/syntax-highlighting/property.rb +2 -2
- data/lib/rabbit/version.rb +19 -0
- data/po/en/rabbit.po +1605 -1425
- data/po/fr/rabbit.po +1756 -1684
- data/po/ja/rabbit.po +2198 -2097
- data/po/rabbit.pot +1556 -1419
- metadata +34 -100
- data/bin/rabbirack +0 -99
- data/bin/rabbiter +0 -108
- data/bin/rabrick +0 -95
- data/bin/rabwii +0 -77
- data/lib/rabbit/default-config.rb +0 -24
- data/lib/rabbit/div/comment-i.erb +0 -7
- data/lib/rabbit/div/comment.erb +0 -45
- data/lib/rabbit/div/css.erb +0 -1
- data/lib/rabbit/div/js.erb +0 -1
- data/lib/rabbit/div/log.erb +0 -5
- data/lib/rabbit/div/main-i.erb +0 -24
- data/lib/rabbit/div/main.css +0 -40
- data/lib/rabbit/div/main.erb +0 -33
- data/lib/rabbit/div/navi-i.erb +0 -6
- data/lib/rabbit/div/navi.erb +0 -6
- data/lib/rabbit/div/prototype.js +0 -4320
- data/lib/rabbit/div/slide-i.erb +0 -2
- data/lib/rabbit/div/slide.erb +0 -5
- data/lib/rabbit/div/tofu.rb +0 -309
- data/lib/rabbit/middleware/config.ru +0 -42
- data/lib/rabbit/middleware/controller.rb +0 -63
- data/lib/rabbit/middleware/public/stylesheets/rabbirack.css +0 -12
- data/lib/rabbit/middleware/views/index.haml +0 -13
- data/lib/rabbit/middleware/views/layout.haml +0 -8
- data/lib/rabbit/post-setup.rb +0 -8
- data/lib/rabbit/pre-clean.rb +0 -2
- data/lib/rabbit/pre-distclean.rb +0 -2
- data/lib/rabbit/theme/twitter-comment/property.rb +0 -4
- data/lib/rabbit/theme/twitter-comment/twitter-comment.rb +0 -15
- data/lib/rabbit/twitter.rb +0 -239
- data/sample/theme-bench-en.hiki +0 -100
- data/sample/theme-bench-en.rab +0 -127
- data/sample/theme-bench.hiki +0 -101
- data/sample/theme-bench.rab +0 -128
- data/setup.rb +0 -1585
- data/update-mo.rb +0 -20
- data/update-po.rb +0 -57
@@ -20,7 +20,13 @@ include_theme("default-description")
|
|
20
20
|
include_theme("image")
|
21
21
|
include_theme("table")
|
22
22
|
include_theme("newline-in-slides")
|
23
|
-
|
23
|
+
|
24
|
+
unless print?
|
25
|
+
include_theme("image-slide-number")
|
26
|
+
if canvas.allotted_time
|
27
|
+
include_theme("image-timer")
|
28
|
+
end
|
29
|
+
end
|
24
30
|
|
25
31
|
include_theme("per-slide-background-color")
|
26
32
|
|
@@ -1,3 +1,3 @@
|
|
1
1
|
@category = N_("Theme")
|
2
|
-
@title = N_("
|
3
|
-
@description = N_("
|
2
|
+
@title = N_("Enishi Green")
|
3
|
+
@description = N_("EnishTech green based theme")
|
data/lib/rabbit/theme/entry.rb
CHANGED
@@ -1,16 +1,34 @@
|
|
1
|
+
# Copyright (C) 2005-2012 Kouhei Sutou <kou@cozmixng.org>
|
2
|
+
#
|
3
|
+
# This program is free software; you can redistribute it and/or modify
|
4
|
+
# it under the terms of the GNU General Public License as published by
|
5
|
+
# the Free Software Foundation; either version 2 of the License, or
|
6
|
+
# (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
+
# GNU General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU General Public License along
|
14
|
+
# with this program; if not, write to the Free Software Foundation, Inc.,
|
15
|
+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
16
|
+
|
1
17
|
require 'erb'
|
2
18
|
|
3
19
|
require 'rabbit/rabbit'
|
20
|
+
require "rabbit/gem-finder"
|
4
21
|
|
5
22
|
module Rabbit
|
6
23
|
module Theme
|
7
24
|
class Entry
|
8
25
|
extend ERB::DefMethod
|
9
26
|
|
27
|
+
include Enumerable
|
10
28
|
include ERB::Util
|
11
29
|
include GetText
|
12
|
-
|
13
|
-
|
30
|
+
|
31
|
+
THEME_BASE_NAME = "theme"
|
14
32
|
PROPERTY_BASE_NAME = "property"
|
15
33
|
|
16
34
|
class << self
|
@@ -47,8 +65,8 @@ module Rabbit
|
|
47
65
|
attr_reader :dependencies, :parameters
|
48
66
|
attr_accessor :logger
|
49
67
|
|
50
|
-
def initialize(theme_dir, name)
|
51
|
-
@logger =
|
68
|
+
def initialize(logger, theme_dir, name)
|
69
|
+
@logger = logger
|
52
70
|
@theme_dir = theme_dir
|
53
71
|
@name = name
|
54
72
|
@title = @name
|
@@ -68,10 +86,6 @@ module Rabbit
|
|
68
86
|
File.writable?(property_file)
|
69
87
|
end
|
70
88
|
|
71
|
-
def theme_file
|
72
|
-
File.join(@theme_dir, "#{@name}.rb")
|
73
|
-
end
|
74
|
-
|
75
89
|
def <=>(other)
|
76
90
|
@name <=> other.name
|
77
91
|
end
|
@@ -81,7 +95,12 @@ module Rabbit
|
|
81
95
|
end
|
82
96
|
|
83
97
|
def full_path(target)
|
84
|
-
|
98
|
+
if have_data_dir?
|
99
|
+
File.join(data_dir, target)
|
100
|
+
else
|
101
|
+
# backward compatibility
|
102
|
+
File.join(@theme_dir, target)
|
103
|
+
end
|
85
104
|
end
|
86
105
|
|
87
106
|
def category
|
@@ -89,19 +108,28 @@ module Rabbit
|
|
89
108
|
end
|
90
109
|
|
91
110
|
def image_theme?
|
92
|
-
|
111
|
+
have_data_dir?
|
112
|
+
end
|
113
|
+
|
114
|
+
def data_dir
|
115
|
+
File.join(@theme_dir, "data")
|
93
116
|
end
|
94
117
|
|
95
118
|
def files
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
119
|
+
if have_data_dir?
|
120
|
+
Dir.glob(File.join(data_dir, "*")).sort
|
121
|
+
else
|
122
|
+
# backward compatibility
|
123
|
+
rejected_files = [theme_file, property_file]
|
124
|
+
Dir[File.join(@theme_dir, "*")].delete_if do |name|
|
125
|
+
rejected_files.include?(name)
|
126
|
+
end.sort
|
127
|
+
end
|
100
128
|
end
|
101
129
|
|
102
130
|
private
|
103
131
|
def property_file
|
104
|
-
|
132
|
+
File.join(@theme_dir, "#{PROPERTY_BASE_NAME}.rb")
|
105
133
|
end
|
106
134
|
|
107
135
|
def parse_property
|
@@ -115,11 +143,27 @@ module Rabbit
|
|
115
143
|
end
|
116
144
|
end
|
117
145
|
end
|
146
|
+
|
147
|
+
def have_data_dir?
|
148
|
+
File.directory?(data_dir)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
class FileEntry < Entry
|
153
|
+
def theme_file
|
154
|
+
File.join(@theme_dir, "#{@name}.rb")
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
class ImageFileEntry < FileEntry
|
159
|
+
def image_theme?
|
160
|
+
true
|
161
|
+
end
|
118
162
|
end
|
119
163
|
|
120
164
|
class DirectoryEntry < Entry
|
121
|
-
def
|
122
|
-
|
165
|
+
def theme_file
|
166
|
+
File.join(@theme_dir, "#{THEME_BASE_NAME}.rb")
|
123
167
|
end
|
124
168
|
end
|
125
169
|
|
@@ -129,25 +173,39 @@ module Rabbit
|
|
129
173
|
end
|
130
174
|
end
|
131
175
|
|
132
|
-
class
|
133
|
-
def initialize(
|
134
|
-
|
176
|
+
class GemEntry < Entry
|
177
|
+
def initialize(logger, name)
|
178
|
+
finder = GemFinder.new(logger)
|
179
|
+
@spec = finder.find(name, "rabbit-theme-")
|
180
|
+
theme_dir = nil
|
181
|
+
theme_dir = @spec.gem_dir if @spec
|
182
|
+
super(logger, theme_dir, name)
|
135
183
|
end
|
136
184
|
|
137
|
-
def
|
138
|
-
|
185
|
+
def available?
|
186
|
+
@theme_dir and super
|
187
|
+
end
|
188
|
+
|
189
|
+
def theme_file
|
190
|
+
File.join(@theme_dir, "#{THEME_BASE_NAME}.rb")
|
191
|
+
end
|
192
|
+
|
193
|
+
def full_path(target)
|
194
|
+
File.join(data_dir, target)
|
139
195
|
end
|
140
196
|
|
141
197
|
def files
|
142
|
-
|
198
|
+
Dir.glob(File.join(data_dir, "*")).sort
|
143
199
|
end
|
200
|
+
end
|
144
201
|
|
145
|
-
|
146
|
-
|
202
|
+
class ImageGemEntry < GemEntry
|
203
|
+
def available?
|
204
|
+
@theme_dir and File.directory?(data_dir)
|
147
205
|
end
|
148
206
|
|
149
|
-
|
150
|
-
|
207
|
+
def image_theme?
|
208
|
+
true
|
151
209
|
end
|
152
210
|
end
|
153
211
|
end
|
@@ -3,7 +3,10 @@ add_image_path("rabbit-images")
|
|
3
3
|
proc_name = "image-slide-number"
|
4
4
|
|
5
5
|
@image_slide_number_image ||= "mini-usa-taro.png"
|
6
|
-
@image_slide_number_show_text
|
6
|
+
if !defined?(@image_slide_number_show_text) or
|
7
|
+
@image_slide_number_show_text.nil?
|
8
|
+
@image_slide_number_show_text = true
|
9
|
+
end
|
7
10
|
@image_slide_number_font_size ||= @xx_small_font_size
|
8
11
|
@image_slide_number_text_color ||= "white"
|
9
12
|
if !defined?(@image_slide_number_show_flag) or
|
@@ -48,10 +48,12 @@ add_image_path("rabbit-images")
|
|
48
48
|
@font_family = find_font_family("Times")
|
49
49
|
@monospace_font_family = find_font_family("Times")
|
50
50
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
add_image_path("nari-images")
|
52
|
+
@image_slide_number_image ||= "gc_kun.png"
|
53
|
+
@image_slide_number_show_text = false
|
54
|
+
@image_slide_number_start_image = "nari-start-flag.png"
|
55
|
+
@image_slide_number_goal_image = "nari-goal-flag.png"
|
56
|
+
@image_timer_image ||= "chibi_nari.png"
|
55
57
|
|
56
58
|
include_theme("default")
|
57
59
|
include_theme("newline-in-title")
|
@@ -86,18 +88,6 @@ match(Slide, Body) do |bodies|
|
|
86
88
|
end
|
87
89
|
end
|
88
90
|
|
89
|
-
add_image_path("nari-images")
|
90
|
-
unless print?
|
91
|
-
@image_slide_number_image ||= "gc_kun.png"
|
92
|
-
@image_slide_number_start_image = "nari-start-flag.png"
|
93
|
-
@image_slide_number_goal_image = "nari-goal-flag.png"
|
94
|
-
include_theme("image-slide-number")
|
95
|
-
if canvas.allotted_time
|
96
|
-
@image_timer_image ||= "chibi_nari.png"
|
97
|
-
include_theme("image-timer")
|
98
|
-
end
|
99
|
-
end
|
100
|
-
|
101
91
|
@slide_footer_info_left_text ||= canvas.title
|
102
92
|
@slide_footer_info_right_text ||= "Powered by Rabbit #{Rabbit::VERSION}"
|
103
93
|
include_theme("slide-footer-info")
|
@@ -4,8 +4,6 @@
|
|
4
4
|
@image_caption_color = @default_foreground
|
5
5
|
@table_caption_color = @default_foreground
|
6
6
|
|
7
|
-
@slide_number_uninstall = true
|
8
|
-
|
9
7
|
@default_item1_mark_color = "#a00000"
|
10
8
|
@default_item1_mark_type = "circle"
|
11
9
|
@default_item2_mark_color = "#a00000"
|
@@ -19,7 +17,3 @@
|
|
19
17
|
@table_body_fill_color = "#101010"
|
20
18
|
|
21
19
|
include_theme("default")
|
22
|
-
|
23
|
-
@image_slide_number_show_text = true
|
24
|
-
include_theme("image-slide-number")
|
25
|
-
include_theme("image-timer")
|
data/lib/rabbit/theme/pdf/pdf.rb
CHANGED
@@ -4,15 +4,11 @@ rescue LoadError
|
|
4
4
|
end
|
5
5
|
|
6
6
|
if canvas.allotted_time
|
7
|
-
@image_slide_number_image = "mini-usa-taro.png"
|
8
|
-
@image_slide_number_show_text = true
|
9
|
-
|
10
7
|
@image_slide_number_margin_left = @margin_left
|
11
8
|
@image_slide_number_margin_right = @margin_right
|
12
9
|
@image_slide_number_margin_bottom = @margin_bottom
|
13
10
|
include_theme("image-slide-number")
|
14
11
|
|
15
|
-
@image_timer_image = "mini-kame-taro.png"
|
16
12
|
@image_timer_margin_left = @margin_left
|
17
13
|
@image_timer_margin_right = @margin_right
|
18
14
|
@image_timer_margin_bottom = @margin_bottom
|
@@ -35,12 +35,6 @@ include_theme("rabbit-headline-logo")
|
|
35
35
|
@title_shadow_color = "#c09090cc"
|
36
36
|
include_theme("title-shadow")
|
37
37
|
|
38
|
-
@slide_number_uninstall = true
|
39
|
-
include_theme("slide-number")
|
40
|
-
|
41
|
-
@image_slide_number_show_text = true
|
42
|
-
include_theme("image-slide-number")
|
43
|
-
|
44
38
|
include_theme("rabbit-powered-by")
|
45
39
|
include_theme("rabbit-icon")
|
46
40
|
|
@@ -49,8 +49,6 @@ end
|
|
49
49
|
@default_description_item1_mark_color = ranguba_color
|
50
50
|
@default_block_quote_item1_mark_color = ranguba_color
|
51
51
|
|
52
|
-
@slide_number_uninstall = !print?
|
53
|
-
|
54
52
|
include_theme("default")
|
55
53
|
|
56
54
|
@icon_images = ["ranguba-mark.png"]
|
@@ -65,16 +63,6 @@ end
|
|
65
63
|
end
|
66
64
|
include_theme("slide-logo")
|
67
65
|
|
68
|
-
unless print?
|
69
|
-
@image_slide_number_image ||= "mini-usa-taro.png"
|
70
|
-
@image_slide_number_show_text = true
|
71
|
-
include_theme("image-slide-number")
|
72
|
-
if canvas.allotted_time
|
73
|
-
@image_timer_image ||= "mini-kame-taro.png"
|
74
|
-
include_theme("image-timer")
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
66
|
@slide_footer_info_left_text ||= canvas.title.gsub(/\n+/, ' ')
|
79
67
|
@slide_footer_info_right_text ||= "Powered by Rabbit #{Rabbit::VERSION}"
|
80
68
|
include_theme("slide-footer-info")
|
@@ -34,10 +34,6 @@ match("**", Emphasis) do |ems|
|
|
34
34
|
ems.prop_set("foreground", @ruby_gnome2_emphasis_color)
|
35
35
|
end
|
36
36
|
|
37
|
-
@image_slide_number_image = "mini-usa-taro.png"
|
38
|
-
@image_slide_number_show_text = true
|
39
|
-
include_theme("image-slide-number")
|
40
|
-
|
41
37
|
if print?
|
42
38
|
@powered_by_text = "Powered by Rabbit #{VERSION}, Ruby-GNOME2 and COZMIXNG"
|
43
39
|
end
|
@@ -48,6 +44,13 @@ end
|
|
48
44
|
]
|
49
45
|
include_theme("powered-by")
|
50
46
|
|
47
|
+
unless print?
|
48
|
+
include_theme("image-slide-number")
|
49
|
+
if canvas.allotted_time
|
50
|
+
include_theme("image-timer")
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
51
54
|
@lightning_talk_proc_name = "lightning-ruby-gnome2"
|
52
55
|
@lightning_talk_as_large_as_possible = true
|
53
56
|
include_theme("lightning-talk-toolkit")
|
@@ -24,7 +24,8 @@ fill_color = "#ffffff4d"
|
|
24
24
|
@table_head_fill_color = dark_color
|
25
25
|
@table_header_font_props[:color] = "white"
|
26
26
|
|
27
|
-
@
|
27
|
+
@image_slide_number_start_flag_color = dark_color
|
28
|
+
@image_slide_number_goal_flag_color = dark_color
|
28
29
|
|
29
30
|
include_theme("default")
|
30
31
|
|
@@ -45,11 +46,3 @@ background_image = "rubykaigi2011-background-white.jpg"
|
|
45
46
|
@slide_background_image = background_image
|
46
47
|
include_theme("title-slide-background-image")
|
47
48
|
include_theme("slide-background-image")
|
48
|
-
|
49
|
-
if canvas.allotted_time
|
50
|
-
include_theme("image-slide-number")
|
51
|
-
@image_slide_number_show_text = true
|
52
|
-
@image_slide_number_start_flag_color = dark_color
|
53
|
-
@image_slide_number_goal_flag_color = dark_color
|
54
|
-
include_theme("image-timer")
|
55
|
-
end
|
@@ -41,17 +41,25 @@ module Rabbit
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def find_theme(theme_name=name, only_image=false)
|
44
|
-
if
|
45
|
-
|
46
|
-
|
47
|
-
|
44
|
+
if theme_name == "."
|
45
|
+
if only_image
|
46
|
+
entry = ImageDirectoryEntry.new(@logger, ".", ".")
|
47
|
+
else
|
48
|
+
entry = DirectoryEntry.new(@logger, ".", ".")
|
49
|
+
end
|
50
|
+
return entry if entry.available?
|
48
51
|
end
|
49
52
|
|
50
53
|
unless only_image
|
51
|
-
entry =
|
54
|
+
entry = FileEntry.new(@logger, base_directory, theme_name)
|
52
55
|
return entry if entry.available?
|
53
56
|
end
|
54
57
|
|
58
|
+
if only_image
|
59
|
+
collector = "collect_image_theme"
|
60
|
+
else
|
61
|
+
collector = "collect_all_theme"
|
62
|
+
end
|
55
63
|
found_entry = nil
|
56
64
|
__send__(collector) do |entry|
|
57
65
|
if theme_name == entry.name
|
@@ -60,7 +68,16 @@ module Rabbit
|
|
60
68
|
end
|
61
69
|
end
|
62
70
|
|
63
|
-
|
71
|
+
if found_entry.nil?
|
72
|
+
if only_image
|
73
|
+
entry = ImageGemEntry.new(@logger, theme_name)
|
74
|
+
else
|
75
|
+
entry = GemEntry.new(@logger, theme_name)
|
76
|
+
end
|
77
|
+
return entry if entry.available?
|
78
|
+
raise LoadError, "can't find theme: #{theme_name}."
|
79
|
+
end
|
80
|
+
|
64
81
|
found_entry
|
65
82
|
end
|
66
83
|
|
@@ -93,11 +110,12 @@ module Rabbit
|
|
93
110
|
end
|
94
111
|
|
95
112
|
def collect_theme(&block)
|
96
|
-
_collect_theme(theme_load_path, DirectoryEntry, &block)
|
113
|
+
_collect_theme(theme_load_path, [FileEntry, DirectoryEntry], &block)
|
97
114
|
end
|
98
115
|
|
99
116
|
def collect_image_theme(&block)
|
100
|
-
_collect_theme(image_load_path,
|
117
|
+
_collect_theme(image_load_path, [ImageFileEntry, ImageDirectoryEntry],
|
118
|
+
"image_dir", &block)
|
101
119
|
end
|
102
120
|
|
103
121
|
def theme_load_path
|
@@ -108,21 +126,25 @@ module Rabbit
|
|
108
126
|
Config::IMAGE_PATH + $LOAD_PATH
|
109
127
|
end
|
110
128
|
|
111
|
-
def _collect_theme(path,
|
129
|
+
def _collect_theme(path, entry_classes, converter=nil, &block)
|
112
130
|
converter ||= "theme_dir"
|
113
131
|
themes = []
|
114
|
-
|
132
|
+
theme_names = {}
|
115
133
|
path.each do |dir|
|
116
134
|
base_name = __send__(converter, dir)
|
117
135
|
if File.directory?(base_name)
|
118
136
|
Dir.foreach(base_name) do |theme|
|
119
137
|
next if /\A..?\z/ =~ theme
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
138
|
+
next if theme_names.has_key?(theme)
|
139
|
+
theme_dir = File.join(File.expand_path(base_name), theme)
|
140
|
+
entry_classes.each do |entry_class|
|
141
|
+
entry = entry_class.new(@logger, theme_dir, theme)
|
142
|
+
if entry.available?
|
143
|
+
block.call(entry) if block
|
144
|
+
themes << entry
|
145
|
+
theme_names[theme] = true
|
146
|
+
break
|
147
|
+
end
|
126
148
|
end
|
127
149
|
end
|
128
150
|
end
|