rabbit-theme-clear-code 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/GFDL +451 -0
- data/GPL +674 -0
- data/README.rd +38 -0
- data/Rakefile +60 -0
- data/config.yaml +5 -0
- data/data/clear-code-headline-background.png +0 -0
- data/data/clear-code-headline-background.svg +2115 -0
- data/data/clear-code-icon-with-shadow.svg +1960 -0
- data/data/clear-code-icon-without-shadow.svg +1920 -0
- data/data/clear-code-icon.png +0 -0
- data/theme.rb +77 -0
- metadata +75 -0
Binary file
|
data/theme.rb
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
@font_family = find_font_family("MotoyaLMaru") || @font_family
|
4
|
+
|
5
|
+
@title_slide_title_font_size = @x_large_font_size * 0.75
|
6
|
+
|
7
|
+
include_theme("newline-in-slides")
|
8
|
+
|
9
|
+
@slide_logo_image = "clear-code-headline-background.png"
|
10
|
+
|
11
|
+
@block_quote_image_background_alpha = 0.3
|
12
|
+
|
13
|
+
include_theme("clear-blue")
|
14
|
+
|
15
|
+
@icon_images = ["clear-code-icon.png"]
|
16
|
+
include_theme("icon")
|
17
|
+
|
18
|
+
@lightning_talk_proc_name = "lightning-clear-code"
|
19
|
+
@lightning_talk_as_large_as_possible = true
|
20
|
+
include_theme("lightning-talk-toolkit")
|
21
|
+
|
22
|
+
include_theme("title-on-image-toolkit")
|
23
|
+
|
24
|
+
match(Slide) do |slides|
|
25
|
+
slides.each do |slide|
|
26
|
+
if slide.lightning_talk? and
|
27
|
+
slide.body.elements.collect {|element| element.class} != [Image]
|
28
|
+
slide.lightning_talk
|
29
|
+
elsif slide.title_on_image?
|
30
|
+
params = {}
|
31
|
+
# slide.title_on_image(params)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
match(Slide, Body) do |bodies|
|
37
|
+
bodies.each do |body|
|
38
|
+
if body.elements.collect {|element| element.class} == [Paragraph]
|
39
|
+
body.elements.each do |element|
|
40
|
+
element.horizontal_centering = true
|
41
|
+
if element.text.size > 50
|
42
|
+
element.prop_set("size", @large_font_size)
|
43
|
+
else
|
44
|
+
element.prop_set("size", @x_large_font_size)
|
45
|
+
end
|
46
|
+
# element.as_large_as_possible("one-paragraph")
|
47
|
+
end
|
48
|
+
end
|
49
|
+
body.margin_left *= 0.7
|
50
|
+
body.margin_right *= 0.7
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
match("**", BlockQuote) do |quotes|
|
55
|
+
quotes.each do |quote|
|
56
|
+
quote.each do |element|
|
57
|
+
# element.align = :center
|
58
|
+
element.prop_set("size", @small_font_size)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
match("**", CustomTag) do |tags|
|
64
|
+
tags.each do |tag|
|
65
|
+
case tag.name
|
66
|
+
when "center"
|
67
|
+
tag.parent.horizontal_centering = true
|
68
|
+
if tag.parent.parent.elements.any? {|element| element.is_a?(Image)}
|
69
|
+
tag.parent.margin_bottom *= 10
|
70
|
+
end
|
71
|
+
when "right"
|
72
|
+
tag.parent.align = "right"
|
73
|
+
when "x-large"
|
74
|
+
tag.parent.prop_set("size", @x_large_font_size)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
metadata
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rabbit-theme-clear-code
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Kouhei Sutou
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-08-28 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rabbit
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
description: The Rabbit theme for ClearCode Inc.
|
31
|
+
email:
|
32
|
+
- kou@clear-code.com
|
33
|
+
executables: []
|
34
|
+
extensions: []
|
35
|
+
extra_rdoc_files: []
|
36
|
+
files:
|
37
|
+
- config.yaml
|
38
|
+
- Rakefile
|
39
|
+
- theme.rb
|
40
|
+
- GPL
|
41
|
+
- GFDL
|
42
|
+
- README.rd
|
43
|
+
- data/clear-code-icon-with-shadow.svg
|
44
|
+
- data/clear-code-headline-background.svg
|
45
|
+
- data/clear-code-icon-without-shadow.svg
|
46
|
+
- data/clear-code-icon.png
|
47
|
+
- data/clear-code-headline-background.png
|
48
|
+
homepage: http://theme.rabbit-shockers.org/clear-code/
|
49
|
+
licenses:
|
50
|
+
- GPLv3+
|
51
|
+
- GFDL
|
52
|
+
- CC BY-SA 3.0
|
53
|
+
post_install_message:
|
54
|
+
rdoc_options: []
|
55
|
+
require_paths:
|
56
|
+
- lib
|
57
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
requirements: []
|
70
|
+
rubyforge_project:
|
71
|
+
rubygems_version: 1.8.23
|
72
|
+
signing_key:
|
73
|
+
specification_version: 3
|
74
|
+
summary: ClearCode theme
|
75
|
+
test_files: []
|