magick_title 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +55 -27
- data/lib/magick_title.rb +14 -0
- data/lib/magick_title/hash.rb +8 -0
- data/lib/magick_title/image.rb +55 -25
- data/lib/magick_title/options.rb +20 -6
- data/lib/magick_title/version.rb +1 -1
- data/magick_title.gemspec +0 -1
- data/test/dummy/Gemfile +1 -1
- data/test/dummy/app.rb +20 -7
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/javascripts/jquery-1.5.1.min.js +16 -0
- data/test/dummy/public/javascripts/jquery-ui-1.8.10.custom.min.js +83 -0
- data/test/dummy/public/stylesheets/eggplant/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/test/dummy/public/stylesheets/eggplant/images/ui-bg_flat_0_eeeeee_40x100.png +0 -0
- data/test/dummy/public/stylesheets/eggplant/images/ui-bg_flat_55_994d53_40x100.png +0 -0
- data/test/dummy/public/stylesheets/eggplant/images/ui-bg_flat_55_fafafa_40x100.png +0 -0
- data/test/dummy/public/stylesheets/eggplant/images/ui-bg_gloss-wave_30_3d3644_500x100.png +0 -0
- data/test/dummy/public/stylesheets/eggplant/images/ui-bg_highlight-soft_100_dcd9de_1x100.png +0 -0
- data/test/dummy/public/stylesheets/eggplant/images/ui-bg_highlight-soft_100_eae6ea_1x100.png +0 -0
- data/test/dummy/public/stylesheets/eggplant/images/ui-bg_highlight-soft_25_30273a_1x100.png +0 -0
- data/test/dummy/public/stylesheets/eggplant/images/ui-bg_highlight-soft_45_5f5964_1x100.png +0 -0
- data/test/dummy/public/stylesheets/eggplant/images/ui-icons_454545_256x240.png +0 -0
- data/test/dummy/public/stylesheets/eggplant/images/ui-icons_734d99_256x240.png +0 -0
- data/test/dummy/public/stylesheets/eggplant/images/ui-icons_8d78a5_256x240.png +0 -0
- data/test/dummy/public/stylesheets/eggplant/images/ui-icons_a8a3ae_256x240.png +0 -0
- data/test/dummy/public/stylesheets/eggplant/images/ui-icons_ebccce_256x240.png +0 -0
- data/test/dummy/public/stylesheets/eggplant/images/ui-icons_ffffff_256x240.png +0 -0
- data/test/dummy/public/stylesheets/eggplant/jquery-ui-1.8.10.custom.css +318 -0
- data/test/dummy/public/stylesheets/styles.css +83 -0
- data/test/dummy/views/index.erb +216 -39
- data/test/dummy/views/layout.erb +3 -1
- data/test/helper.rb +7 -4
- data/test/test_dsl.rb +36 -0
- data/test/test_image.rb +58 -75
- data/test/test_magick_title.rb +9 -0
- data/test/test_options.rb +17 -0
- data/test/test_to_html.rb +77 -0
- metadata +50 -17
- data/test/dummy/public/styles.css +0 -31
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,318 @@
|
|
1
|
+
/*
|
2
|
+
* jQuery UI CSS Framework 1.8.10
|
3
|
+
*
|
4
|
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5
|
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6
|
+
* http://jquery.org/license
|
7
|
+
*
|
8
|
+
* http://docs.jquery.com/UI/Theming/API
|
9
|
+
*/
|
10
|
+
|
11
|
+
/* Layout helpers
|
12
|
+
----------------------------------*/
|
13
|
+
.ui-helper-hidden { display: none; }
|
14
|
+
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
|
15
|
+
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
16
|
+
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
17
|
+
.ui-helper-clearfix { display: inline-block; }
|
18
|
+
/* required comment for clearfix to work in Opera \*/
|
19
|
+
* html .ui-helper-clearfix { height:1%; }
|
20
|
+
.ui-helper-clearfix { display:block; }
|
21
|
+
/* end clearfix */
|
22
|
+
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
23
|
+
|
24
|
+
|
25
|
+
/* Interaction Cues
|
26
|
+
----------------------------------*/
|
27
|
+
.ui-state-disabled { cursor: default !important; }
|
28
|
+
|
29
|
+
|
30
|
+
/* Icons
|
31
|
+
----------------------------------*/
|
32
|
+
|
33
|
+
/* states and images */
|
34
|
+
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
35
|
+
|
36
|
+
|
37
|
+
/* Misc visuals
|
38
|
+
----------------------------------*/
|
39
|
+
|
40
|
+
/* Overlays */
|
41
|
+
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
42
|
+
|
43
|
+
|
44
|
+
/*
|
45
|
+
* jQuery UI CSS Framework 1.8.10
|
46
|
+
*
|
47
|
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
48
|
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
49
|
+
* http://jquery.org/license
|
50
|
+
*
|
51
|
+
* http://docs.jquery.com/UI/Theming/API
|
52
|
+
*
|
53
|
+
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=30273a&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=25&borderColorHeader=231d2b&fcHeader=ffffff&iconColorHeader=a8a3ae&bgColorContent=3d3644&bgTextureContent=12_gloss_wave.png&bgImgOpacityContent=30&borderColorContent=7e7783&fcContent=ffffff&iconColorContent=ffffff&bgColorDefault=dcd9de&bgTextureDefault=03_highlight_soft.png&bgImgOpacityDefault=100&borderColorDefault=dcd9de&fcDefault=665874&iconColorDefault=8d78a5&bgColorHover=eae6ea&bgTextureHover=03_highlight_soft.png&bgImgOpacityHover=100&borderColorHover=d1c5d8&fcHover=734d99&iconColorHover=734d99&bgColorActive=5f5964&bgTextureActive=03_highlight_soft.png&bgImgOpacityActive=45&borderColorActive=7e7783&fcActive=ffffff&iconColorActive=454545&bgColorHighlight=fafafa&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=ffdb1f&fcHighlight=333333&iconColorHighlight=8d78a5&bgColorError=994d53&bgTextureError=01_flat.png&bgImgOpacityError=55&borderColorError=994d53&fcError=ffffff&iconColorError=ebccce&bgColorOverlay=eeeeee&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=80&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=60&thicknessShadow=4px&offsetTopShadow=-4px&offsetLeftShadow=-4px&cornerRadiusShadow=0px
|
54
|
+
*/
|
55
|
+
|
56
|
+
|
57
|
+
/* Component containers
|
58
|
+
----------------------------------*/
|
59
|
+
.ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; }
|
60
|
+
.ui-widget .ui-widget { font-size: 1em; }
|
61
|
+
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; }
|
62
|
+
.ui-widget-content { border: 1px solid #7e7783; background: #3d3644 url(images/ui-bg_gloss-wave_30_3d3644_500x100.png) 50% top repeat-x; color: #ffffff; }
|
63
|
+
.ui-widget-content a { color: #ffffff; }
|
64
|
+
.ui-widget-header { border: 1px solid #231d2b; background: #30273a url(images/ui-bg_highlight-soft_25_30273a_1x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
|
65
|
+
.ui-widget-header a { color: #ffffff; }
|
66
|
+
|
67
|
+
/* Interaction states
|
68
|
+
----------------------------------*/
|
69
|
+
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #dcd9de; background: #dcd9de url(images/ui-bg_highlight-soft_100_dcd9de_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #665874; }
|
70
|
+
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #665874; text-decoration: none; }
|
71
|
+
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #d1c5d8; background: #eae6ea url(images/ui-bg_highlight-soft_100_eae6ea_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #734d99; }
|
72
|
+
.ui-state-hover a, .ui-state-hover a:hover { color: #734d99; text-decoration: none; }
|
73
|
+
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #7e7783; background: #5f5964 url(images/ui-bg_highlight-soft_45_5f5964_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; }
|
74
|
+
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; text-decoration: none; }
|
75
|
+
.ui-widget :active, .ui-widget :focus { outline: none; }
|
76
|
+
|
77
|
+
/* Interaction Cues
|
78
|
+
----------------------------------*/
|
79
|
+
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #ffdb1f; background: #fafafa url(images/ui-bg_flat_55_fafafa_40x100.png) 50% 50% repeat-x; color: #333333; }
|
80
|
+
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #333333; }
|
81
|
+
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #994d53; background: #994d53 url(images/ui-bg_flat_55_994d53_40x100.png) 50% 50% repeat-x; color: #ffffff; }
|
82
|
+
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
|
83
|
+
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
|
84
|
+
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
85
|
+
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
86
|
+
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
87
|
+
|
88
|
+
/* Icons
|
89
|
+
----------------------------------*/
|
90
|
+
|
91
|
+
/* states and images */
|
92
|
+
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_ffffff_256x240.png); }
|
93
|
+
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
|
94
|
+
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_a8a3ae_256x240.png); }
|
95
|
+
.ui-state-default .ui-icon { background-image: url(images/ui-icons_8d78a5_256x240.png); }
|
96
|
+
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_734d99_256x240.png); }
|
97
|
+
.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
|
98
|
+
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_8d78a5_256x240.png); }
|
99
|
+
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ebccce_256x240.png); }
|
100
|
+
|
101
|
+
/* positioning */
|
102
|
+
.ui-icon-carat-1-n { background-position: 0 0; }
|
103
|
+
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
104
|
+
.ui-icon-carat-1-e { background-position: -32px 0; }
|
105
|
+
.ui-icon-carat-1-se { background-position: -48px 0; }
|
106
|
+
.ui-icon-carat-1-s { background-position: -64px 0; }
|
107
|
+
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
108
|
+
.ui-icon-carat-1-w { background-position: -96px 0; }
|
109
|
+
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
110
|
+
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
111
|
+
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
112
|
+
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
113
|
+
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
114
|
+
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
115
|
+
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
116
|
+
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
117
|
+
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
118
|
+
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
119
|
+
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
120
|
+
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
121
|
+
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
122
|
+
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
123
|
+
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
124
|
+
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
125
|
+
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
126
|
+
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
127
|
+
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
128
|
+
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
129
|
+
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
130
|
+
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
131
|
+
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
132
|
+
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
133
|
+
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
134
|
+
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
135
|
+
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
136
|
+
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
137
|
+
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
138
|
+
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
139
|
+
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
140
|
+
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
141
|
+
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
142
|
+
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
143
|
+
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
144
|
+
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
145
|
+
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
146
|
+
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
147
|
+
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
148
|
+
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
149
|
+
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
150
|
+
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
151
|
+
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
152
|
+
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
153
|
+
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
154
|
+
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
155
|
+
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
156
|
+
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
157
|
+
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
158
|
+
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
159
|
+
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
160
|
+
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
161
|
+
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
162
|
+
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
163
|
+
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
164
|
+
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
165
|
+
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
166
|
+
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
167
|
+
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
168
|
+
.ui-icon-extlink { background-position: -32px -80px; }
|
169
|
+
.ui-icon-newwin { background-position: -48px -80px; }
|
170
|
+
.ui-icon-refresh { background-position: -64px -80px; }
|
171
|
+
.ui-icon-shuffle { background-position: -80px -80px; }
|
172
|
+
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
173
|
+
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
174
|
+
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
175
|
+
.ui-icon-folder-open { background-position: -16px -96px; }
|
176
|
+
.ui-icon-document { background-position: -32px -96px; }
|
177
|
+
.ui-icon-document-b { background-position: -48px -96px; }
|
178
|
+
.ui-icon-note { background-position: -64px -96px; }
|
179
|
+
.ui-icon-mail-closed { background-position: -80px -96px; }
|
180
|
+
.ui-icon-mail-open { background-position: -96px -96px; }
|
181
|
+
.ui-icon-suitcase { background-position: -112px -96px; }
|
182
|
+
.ui-icon-comment { background-position: -128px -96px; }
|
183
|
+
.ui-icon-person { background-position: -144px -96px; }
|
184
|
+
.ui-icon-print { background-position: -160px -96px; }
|
185
|
+
.ui-icon-trash { background-position: -176px -96px; }
|
186
|
+
.ui-icon-locked { background-position: -192px -96px; }
|
187
|
+
.ui-icon-unlocked { background-position: -208px -96px; }
|
188
|
+
.ui-icon-bookmark { background-position: -224px -96px; }
|
189
|
+
.ui-icon-tag { background-position: -240px -96px; }
|
190
|
+
.ui-icon-home { background-position: 0 -112px; }
|
191
|
+
.ui-icon-flag { background-position: -16px -112px; }
|
192
|
+
.ui-icon-calendar { background-position: -32px -112px; }
|
193
|
+
.ui-icon-cart { background-position: -48px -112px; }
|
194
|
+
.ui-icon-pencil { background-position: -64px -112px; }
|
195
|
+
.ui-icon-clock { background-position: -80px -112px; }
|
196
|
+
.ui-icon-disk { background-position: -96px -112px; }
|
197
|
+
.ui-icon-calculator { background-position: -112px -112px; }
|
198
|
+
.ui-icon-zoomin { background-position: -128px -112px; }
|
199
|
+
.ui-icon-zoomout { background-position: -144px -112px; }
|
200
|
+
.ui-icon-search { background-position: -160px -112px; }
|
201
|
+
.ui-icon-wrench { background-position: -176px -112px; }
|
202
|
+
.ui-icon-gear { background-position: -192px -112px; }
|
203
|
+
.ui-icon-heart { background-position: -208px -112px; }
|
204
|
+
.ui-icon-star { background-position: -224px -112px; }
|
205
|
+
.ui-icon-link { background-position: -240px -112px; }
|
206
|
+
.ui-icon-cancel { background-position: 0 -128px; }
|
207
|
+
.ui-icon-plus { background-position: -16px -128px; }
|
208
|
+
.ui-icon-plusthick { background-position: -32px -128px; }
|
209
|
+
.ui-icon-minus { background-position: -48px -128px; }
|
210
|
+
.ui-icon-minusthick { background-position: -64px -128px; }
|
211
|
+
.ui-icon-close { background-position: -80px -128px; }
|
212
|
+
.ui-icon-closethick { background-position: -96px -128px; }
|
213
|
+
.ui-icon-key { background-position: -112px -128px; }
|
214
|
+
.ui-icon-lightbulb { background-position: -128px -128px; }
|
215
|
+
.ui-icon-scissors { background-position: -144px -128px; }
|
216
|
+
.ui-icon-clipboard { background-position: -160px -128px; }
|
217
|
+
.ui-icon-copy { background-position: -176px -128px; }
|
218
|
+
.ui-icon-contact { background-position: -192px -128px; }
|
219
|
+
.ui-icon-image { background-position: -208px -128px; }
|
220
|
+
.ui-icon-video { background-position: -224px -128px; }
|
221
|
+
.ui-icon-script { background-position: -240px -128px; }
|
222
|
+
.ui-icon-alert { background-position: 0 -144px; }
|
223
|
+
.ui-icon-info { background-position: -16px -144px; }
|
224
|
+
.ui-icon-notice { background-position: -32px -144px; }
|
225
|
+
.ui-icon-help { background-position: -48px -144px; }
|
226
|
+
.ui-icon-check { background-position: -64px -144px; }
|
227
|
+
.ui-icon-bullet { background-position: -80px -144px; }
|
228
|
+
.ui-icon-radio-off { background-position: -96px -144px; }
|
229
|
+
.ui-icon-radio-on { background-position: -112px -144px; }
|
230
|
+
.ui-icon-pin-w { background-position: -128px -144px; }
|
231
|
+
.ui-icon-pin-s { background-position: -144px -144px; }
|
232
|
+
.ui-icon-play { background-position: 0 -160px; }
|
233
|
+
.ui-icon-pause { background-position: -16px -160px; }
|
234
|
+
.ui-icon-seek-next { background-position: -32px -160px; }
|
235
|
+
.ui-icon-seek-prev { background-position: -48px -160px; }
|
236
|
+
.ui-icon-seek-end { background-position: -64px -160px; }
|
237
|
+
.ui-icon-seek-start { background-position: -80px -160px; }
|
238
|
+
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
239
|
+
.ui-icon-seek-first { background-position: -80px -160px; }
|
240
|
+
.ui-icon-stop { background-position: -96px -160px; }
|
241
|
+
.ui-icon-eject { background-position: -112px -160px; }
|
242
|
+
.ui-icon-volume-off { background-position: -128px -160px; }
|
243
|
+
.ui-icon-volume-on { background-position: -144px -160px; }
|
244
|
+
.ui-icon-power { background-position: 0 -176px; }
|
245
|
+
.ui-icon-signal-diag { background-position: -16px -176px; }
|
246
|
+
.ui-icon-signal { background-position: -32px -176px; }
|
247
|
+
.ui-icon-battery-0 { background-position: -48px -176px; }
|
248
|
+
.ui-icon-battery-1 { background-position: -64px -176px; }
|
249
|
+
.ui-icon-battery-2 { background-position: -80px -176px; }
|
250
|
+
.ui-icon-battery-3 { background-position: -96px -176px; }
|
251
|
+
.ui-icon-circle-plus { background-position: 0 -192px; }
|
252
|
+
.ui-icon-circle-minus { background-position: -16px -192px; }
|
253
|
+
.ui-icon-circle-close { background-position: -32px -192px; }
|
254
|
+
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
255
|
+
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
256
|
+
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
257
|
+
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
258
|
+
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
259
|
+
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
260
|
+
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
261
|
+
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
262
|
+
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
263
|
+
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
264
|
+
.ui-icon-circle-check { background-position: -208px -192px; }
|
265
|
+
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
266
|
+
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
267
|
+
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
268
|
+
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
269
|
+
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
270
|
+
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
271
|
+
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
272
|
+
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
273
|
+
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
274
|
+
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
275
|
+
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
276
|
+
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
277
|
+
|
278
|
+
|
279
|
+
/* Misc visuals
|
280
|
+
----------------------------------*/
|
281
|
+
|
282
|
+
/* Corner radius */
|
283
|
+
.ui-corner-tl { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; }
|
284
|
+
.ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; }
|
285
|
+
.ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; }
|
286
|
+
.ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
|
287
|
+
.ui-corner-top { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; }
|
288
|
+
.ui-corner-bottom { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
|
289
|
+
.ui-corner-right { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
|
290
|
+
.ui-corner-left { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; }
|
291
|
+
.ui-corner-all { -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; }
|
292
|
+
|
293
|
+
/* Overlays */
|
294
|
+
.ui-widget-overlay { background: #eeeeee url(images/ui-bg_flat_0_eeeeee_40x100.png) 50% 50% repeat-x; opacity: .80;filter:Alpha(Opacity=80); }
|
295
|
+
.ui-widget-shadow { margin: -4px 0 0 -4px; padding: 4px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .60;filter:Alpha(Opacity=60); -moz-border-radius: 0px; -webkit-border-radius: 0px; border-radius: 0px; }/*
|
296
|
+
* jQuery UI Slider 1.8.10
|
297
|
+
*
|
298
|
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
299
|
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
300
|
+
* http://jquery.org/license
|
301
|
+
*
|
302
|
+
* http://docs.jquery.com/UI/Slider#theming
|
303
|
+
*/
|
304
|
+
.ui-slider { position: relative; text-align: left; }
|
305
|
+
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
306
|
+
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
307
|
+
|
308
|
+
.ui-slider-horizontal { height: .8em; }
|
309
|
+
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
310
|
+
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
311
|
+
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
312
|
+
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
313
|
+
|
314
|
+
.ui-slider-vertical { width: .8em; height: 100px; }
|
315
|
+
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
316
|
+
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
317
|
+
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
318
|
+
.ui-slider-vertical .ui-slider-range-max { top: 0; }
|
@@ -0,0 +1,83 @@
|
|
1
|
+
@import url('eggplant/jquery-ui-1.8.10.custom.css');
|
2
|
+
|
3
|
+
body {
|
4
|
+
font-family: "HelveticaNeue", Helvetica, Arial, sans-serif;
|
5
|
+
color: #080603;
|
6
|
+
}
|
7
|
+
a {
|
8
|
+
text-decoration: none;
|
9
|
+
color: #68962c;
|
10
|
+
}
|
11
|
+
pre {
|
12
|
+
padding: 4px 7px;
|
13
|
+
background-color: #fafafa;
|
14
|
+
border: 1px solid #f0f0f0;
|
15
|
+
font-family: Courier;
|
16
|
+
font-size: 14px;
|
17
|
+
line-height: 23px;
|
18
|
+
}
|
19
|
+
pre.wrap {
|
20
|
+
white-space: normal;
|
21
|
+
}
|
22
|
+
|
23
|
+
.clear { clear: both; }
|
24
|
+
|
25
|
+
.container {
|
26
|
+
width: 500px;
|
27
|
+
margin: 0 auto;
|
28
|
+
}
|
29
|
+
.header {
|
30
|
+
border-bottom: 1px solid #ddd;
|
31
|
+
}
|
32
|
+
.header a {
|
33
|
+
display: inline-block;
|
34
|
+
padding: 4px 10px;
|
35
|
+
background-color: #eee;
|
36
|
+
}
|
37
|
+
|
38
|
+
.flash {
|
39
|
+
padding: 10px 0;
|
40
|
+
border-bottom: 1px solid #ddd;
|
41
|
+
}
|
42
|
+
.flash.notice {
|
43
|
+
color: #68962c;
|
44
|
+
}
|
45
|
+
.flash.error {
|
46
|
+
color: #c00e0e;
|
47
|
+
}
|
48
|
+
|
49
|
+
|
50
|
+
.option {
|
51
|
+
margin: 1em 0 1em 0;
|
52
|
+
padding-bottom: 1em;
|
53
|
+
border-bottom: 1px solid #eee;
|
54
|
+
}
|
55
|
+
|
56
|
+
button[type=submit] {
|
57
|
+
width: 100%;
|
58
|
+
padding: 13px;
|
59
|
+
text-align: center;
|
60
|
+
cursor: pointer;
|
61
|
+
}
|
62
|
+
|
63
|
+
#red, #green, #blue {
|
64
|
+
float: left;
|
65
|
+
clear: left;
|
66
|
+
width: 300px;
|
67
|
+
margin-bottom: 10px;
|
68
|
+
}
|
69
|
+
#swatch {
|
70
|
+
width: 120px;
|
71
|
+
height: 100px;
|
72
|
+
margin-top: 18px;
|
73
|
+
margin-left: 350px;
|
74
|
+
background-image: none;
|
75
|
+
}
|
76
|
+
#red .ui-slider-range { background: #dd0000; }
|
77
|
+
#red .ui-state-default { border-color: #aa0000; background: #dd0000; }
|
78
|
+
|
79
|
+
#green .ui-slider-range { background: #00dd00; }
|
80
|
+
#green .ui-state-default { border-color: #00aa00; background: #00dd00; }
|
81
|
+
|
82
|
+
#blue .ui-slider-range { background: #0000dd; }
|
83
|
+
#blue .ui-state-default { border-color: #0000aa; background: #0000dd; }
|
data/test/dummy/views/index.erb
CHANGED
@@ -1,66 +1,243 @@
|
|
1
1
|
<% if @success && @image_title %>
|
2
2
|
<h1>Success!</h1>
|
3
3
|
<img src=<%= @image_title.url.inspect %> alt=<%= @image_title.text.inspect %>/>
|
4
|
+
<pre class="wrap">
|
5
|
+
<%= @image_title.convert_command %>
|
6
|
+
</pre>
|
4
7
|
<% elsif @success === false %>
|
5
8
|
<h1>Failed.</h1>
|
6
9
|
<% else %>
|
7
|
-
<%= MagickTitle.say("Hello!").to_html %>
|
8
|
-
|
10
|
+
<%= MagickTitle.say("Hello!", :h1).to_html %>
|
11
|
+
<%= MagickTitle.say("Welcome to MagickTitle!", :h2).to_html %>
|
9
12
|
<% end %>
|
10
13
|
|
11
14
|
|
12
15
|
<h2>Generate an image title!</h2>
|
13
16
|
|
14
|
-
<form action="/" method="
|
17
|
+
<form action="/" method="get">
|
15
18
|
<p>
|
16
19
|
<label for="text">Text:</label><br/>
|
17
20
|
<textarea name="text" id="name" rows="5" cols="50"><%= params[:text] %></textarea>
|
18
21
|
</p>
|
22
|
+
|
19
23
|
<p>
|
20
24
|
<label for="options_font">Font:</label>
|
21
25
|
<select name="options[font]" id="options_font">
|
22
26
|
<% Dir.entries(MagickTitle.options.font_path).reject!{|f| f.match(/\.+$/) }.each do |font| %>
|
23
|
-
<option value="<%= font %>"
|
27
|
+
<option value="<%= font %>"<%= ' selected="selected"' if @options[:font] == font %>><%= font.gsub(/\.[a-z]{3}/, '') %></option>
|
24
28
|
<% end %>
|
25
29
|
</select>
|
26
30
|
</p>
|
27
31
|
|
28
|
-
<p>
|
29
|
-
<label for="options_color">Color:</label>
|
30
|
-
<select name="options[color]" id="options_color">
|
31
|
-
<option value="#ff0000">Red</option>
|
32
|
-
<option value="#0000ff">Blue</option>
|
33
|
-
<option value="#00ff00">Green</option>
|
34
|
-
<option value="#000000">Black</option>
|
35
|
-
<option value="#aaaaaa">Gray</option>
|
36
|
-
</select>
|
37
|
-
</p>
|
38
32
|
|
39
|
-
<
|
40
|
-
<
|
41
|
-
<
|
42
|
-
|
43
|
-
|
44
|
-
<option value="40" selected="selected">40</option>
|
45
|
-
<option value="100">100</option>
|
46
|
-
<option value="200">200</option>
|
47
|
-
</select>
|
48
|
-
</p>
|
33
|
+
<div class="option">
|
34
|
+
<p>Width: <em><span id="value_width"><%= @options[:width] %></span> pixels</em></p>
|
35
|
+
<div id="slider_width"></div>
|
36
|
+
<input type="hidden" name="options[width]" id="options_width" value="<%= @options[:width] %>" />
|
37
|
+
</div>
|
49
38
|
|
50
|
-
<
|
51
|
-
<
|
52
|
-
|
53
|
-
|
54
|
-
<
|
55
|
-
<
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
</
|
39
|
+
<div class="option">
|
40
|
+
<p>Height: <em><span id="value_height"><%= @options[:height].to_i %> pixels</span></em></p>
|
41
|
+
|
42
|
+
<p>
|
43
|
+
<input type="checkbox" id="auto_height" name="auto_height"<%= ' checked="checked"' if @options[:height].to_i == 0 %>/>
|
44
|
+
<label for="auto_height">Trim to minimum height</label>
|
45
|
+
</p>
|
46
|
+
|
47
|
+
<div id="slider_height"></div>
|
48
|
+
<input type="hidden" name="options[height]" id="options_height" value="<%= @options[:height].to_i %>" />
|
49
|
+
|
50
|
+
</div>
|
62
51
|
|
63
|
-
<
|
64
|
-
<
|
52
|
+
<div class="option">
|
53
|
+
<p>Font Size: <em><span id="value_font_size"><%= @options[:font_size] %></span> pixels</em></p>
|
54
|
+
<div id="slider_font_size"></div>
|
55
|
+
<input type="hidden" name="options[font_size]" id="options_font_size" value="<%= @options[:font_size] %>" />
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<div class="option">
|
59
|
+
<p>Kerning: <em><span id="value_kerning"><%= @options[:kerning] %></span></em></p>
|
60
|
+
<div id="slider_kerning"></div>
|
61
|
+
<input type="hidden" name="options[kerning]" id="options_kerning" value="<%= @options[:kerning] %>" />
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<div class="option">
|
65
|
+
<p>Line Height: <em><span id="value_line_height"><%= @options[:line_height] %></span></em></p>
|
66
|
+
<div id="slider_line_height"></div>
|
67
|
+
<input type="hidden" name="options[line_height]" id="options_line_height" value="<%= @options[:line_height] %>" />
|
68
|
+
</div>
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
<div class="option">
|
73
|
+
<p>Color: <input type="text" name="options[color]" id="options_color" value="<%= @options[:color] %>" /></p>
|
74
|
+
|
75
|
+
<div id="red"></div>
|
76
|
+
<div id="green"></div>
|
77
|
+
<div id="blue"></div>
|
78
|
+
|
79
|
+
<div id="swatch" class="ui-widget-content ui-corner-all"></div>
|
80
|
+
|
81
|
+
|
82
|
+
<br class="clear"/>
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
<p>
|
93
|
+
<button type="submit">
|
94
|
+
<%= MagickTitle.say("Magick Title Go!", :button).to_html %>
|
95
|
+
</button>
|
65
96
|
</p>
|
66
|
-
</form>
|
97
|
+
</form>
|
98
|
+
|
99
|
+
<script type="text/javascript">
|
100
|
+
//<![CDATA[
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
function rgbToHex(r, g, b) {
|
105
|
+
var hex = [
|
106
|
+
r.toString( 16 ),
|
107
|
+
g.toString( 16 ),
|
108
|
+
b.toString( 16 )
|
109
|
+
];
|
110
|
+
$.each( hex, function( nr, val ) {
|
111
|
+
if ( val.length === 1 ) {
|
112
|
+
hex[ nr ] = "0" + val;
|
113
|
+
}
|
114
|
+
});
|
115
|
+
return hex.join("").toUpperCase();
|
116
|
+
}
|
117
|
+
|
118
|
+
function hexToRgb(hex) {
|
119
|
+
hex = hex.replace(/^#?/, '');
|
120
|
+
if (hex.length == 3) hex = hex + hex;
|
121
|
+
var r = parseInt(hex.substring(0,2), 16),
|
122
|
+
g = parseInt(hex.substring(2,4), 16),
|
123
|
+
b = parseInt(hex.substring(4,6), 16);
|
124
|
+
return [r, g, b];
|
125
|
+
}
|
126
|
+
|
127
|
+
|
128
|
+
function refreshSwatch() {
|
129
|
+
var red = $("#red").slider("value"),
|
130
|
+
green = $("#green").slider("value"),
|
131
|
+
blue = $("#blue").slider("value"),
|
132
|
+
hex = "#" + rgbToHex(red, green, blue);
|
133
|
+
$("#swatch").css("background-color", hex);
|
134
|
+
return hex;
|
135
|
+
}
|
136
|
+
|
137
|
+
|
138
|
+
$( "#red, #green, #blue" ).slider({
|
139
|
+
orientation: "horizontal",
|
140
|
+
range: "min",
|
141
|
+
max: 255,
|
142
|
+
slide: function() {
|
143
|
+
$("#options_color").val(refreshSwatch());
|
144
|
+
},
|
145
|
+
change: refreshSwatch
|
146
|
+
});
|
147
|
+
|
148
|
+
var rgb = hexToRgb($("#options_color").val());
|
149
|
+
$("#red").slider("value", rgb[0]);
|
150
|
+
$("#green").slider("value", rgb[1]);
|
151
|
+
$("#blue").slider("value", rgb[2]);
|
152
|
+
|
153
|
+
$("#options_color").change(function(evt) {
|
154
|
+
var hex = this.value.split("").pop();
|
155
|
+
console.log(hex);
|
156
|
+
if (hex && !hex.match(/[#A-Fa-f0-9]/)) {
|
157
|
+
console.log('INVALID KEY');
|
158
|
+
}
|
159
|
+
}).keyup(function() {
|
160
|
+
val = $(this).val();
|
161
|
+
// match either 3 or 6 digit hexdecimals
|
162
|
+
if (val.match(/^#?(([A-Fa-f0-9]{3})|(([A-Fa-f0-9]{2}){3}))$/)) {
|
163
|
+
var rgb = hexToRgb(val);
|
164
|
+
$("#red").slider("value", rgb[0]);
|
165
|
+
$("#green").slider("value", rgb[1]);
|
166
|
+
$("#blue").slider("value", rgb[2]);
|
167
|
+
}
|
168
|
+
});
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
$("#slider_width").slider({
|
178
|
+
value: <%= @options[:width] %>,
|
179
|
+
min: 100,
|
180
|
+
max: 800,
|
181
|
+
slide: function( event, ui ) {
|
182
|
+
$("#value_width").text(ui.value);
|
183
|
+
$("#options_width").val(ui.value);
|
184
|
+
}
|
185
|
+
});
|
186
|
+
|
187
|
+
$("#auto_height").change(function(evt) {
|
188
|
+
|
189
|
+
$("#slider_height").toggle(!this.checked);
|
190
|
+
|
191
|
+
if (this.checked) {
|
192
|
+
$("#value_height").text("auto");
|
193
|
+
$("#options_height").val("");
|
194
|
+
} else {
|
195
|
+
var val = $("#slider_height").slider('value');
|
196
|
+
$("#value_height").text(val);
|
197
|
+
$("#options_height").val(val);
|
198
|
+
}
|
199
|
+
|
200
|
+
}).change();
|
201
|
+
|
202
|
+
$("#slider_height").slider({
|
203
|
+
value: <%= 0 == @options[:height].to_i ? 20 : @options[:height] %>,
|
204
|
+
min: 20,
|
205
|
+
max: 100,
|
206
|
+
slide: function( event, ui ) {
|
207
|
+
$("#value_height").text(ui.value + ' pixels');
|
208
|
+
$("#options_height").val(ui.value);
|
209
|
+
}
|
210
|
+
});
|
211
|
+
|
212
|
+
$("#slider_font_size").slider({
|
213
|
+
value: <%= @options[:font_size] %>,
|
214
|
+
min: 10,
|
215
|
+
max: 100,
|
216
|
+
slide: function( event, ui ) {
|
217
|
+
$("#value_font_size").text(ui.value);
|
218
|
+
$("#options_font_size").val(ui.value);
|
219
|
+
}
|
220
|
+
});
|
221
|
+
|
222
|
+
$("#slider_kerning").slider({
|
223
|
+
value: <%= @options[:kerning] %>,
|
224
|
+
min: -50,
|
225
|
+
max: 50,
|
226
|
+
slide: function( event, ui ) {
|
227
|
+
$("#value_kerning").text(ui.value);
|
228
|
+
$("#options_kerning").val(ui.value);
|
229
|
+
}
|
230
|
+
});
|
231
|
+
|
232
|
+
$("#slider_line_height").slider({
|
233
|
+
value: <%= @options[:line_height].to_i %>,
|
234
|
+
min: -100,
|
235
|
+
max: 100,
|
236
|
+
slide: function( event, ui ) {
|
237
|
+
$("#value_line_height").text(ui.value);
|
238
|
+
$("#options_line_height").val(ui.value);
|
239
|
+
}
|
240
|
+
});
|
241
|
+
|
242
|
+
//]]>
|
243
|
+
</script>
|