showoff 0.15.3 → 0.15.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1045e98280df58f247a2bd2cbfc6cfd8737edad
4
- data.tar.gz: 6a2b723b8f401ce9807f27eb0b8b85e6022e5f0e
3
+ metadata.gz: e1365af2ab2a7098157389c2b50e549f2d142db0
4
+ data.tar.gz: 483b890328201a844ea2f69ae1f4123bfae6ecc2
5
5
  SHA512:
6
- metadata.gz: db4bbe7b17021c6365a15cb3281022a642ae6d2c3fb82749a47a74958bbff4206b1e1b0d3d852989764428dfa259bf3ca360efed48d1efc608e49c98584cb5a8
7
- data.tar.gz: 951a2673da40ab2cc7b39eebe4708f9646a3dbd040619aa9cffdd3dde0bad37af14ae1f922ae0b78588ebeaf9199ba7f0cd4209f67874d4916fec78c0601aaa7
6
+ metadata.gz: c65507cec293d851664342e4db7aae7e9d57dda4f47fb8ef132b3637f1454dd7ca47e33b267f33b579ab614818f31beab24415475dc5bcc78610bf5085a80883
7
+ data.tar.gz: 6f72ce0aa88793fe127dabb72c1373d0b0fd02b4371d672e773b2fa3fc4c5c1ffb84eb6c234e2be57c163efbc27589e06ec3203a2821d3334286e6d3aa7a776b
@@ -1,3 +1,3 @@
1
1
  # No namespace here since ShowOff is a class and I'd have to inherit from
2
2
  # Sinatra::Application (which we don't want to load here)
3
- SHOWOFF_VERSION = '0.15.3'
3
+ SHOWOFF_VERSION = '0.15.4'
data/lib/showoff.rb CHANGED
@@ -424,6 +424,8 @@ class ShowOff < Sinatra::Application
424
424
  content += "<canvas class=\"annotations\"></canvas>\n"
425
425
  content += "</div>\n"
426
426
 
427
+ content = final_slide_fixup(content)
428
+
427
429
  final += update_commandline_code(content)
428
430
 
429
431
  if seq
@@ -523,6 +525,30 @@ class ShowOff < Sinatra::Application
523
525
  doc.to_html
524
526
  end
525
527
 
528
+ # TODO: damn, this one is bad. It's named generically so we can add to it if needed.
529
+ #
530
+ # This method is intended to be the dumping ground for the slide fixups that we can't do in
531
+ # other places until we get #615 implemented. Then this method should be refactored away.
532
+ #
533
+ def final_slide_fixup(text)
534
+ # Turn this into a document for munging
535
+ doc = Nokogiri::HTML::DocumentFragment.parse(text)
536
+ slide = doc.at_css 'div.slide'
537
+ content = doc.at_css 'div.content'
538
+
539
+ # move each notes section outside of the content div
540
+ doc.css('div.notes-section').each do |note|
541
+ content.add_next_sibling(note)
542
+ end
543
+
544
+ # this is a list of classes that we want applied *only* to content, and not to the slide,
545
+ # typically so that overly aggressive selectors don't match more than they should.
546
+ blacklist = ['bigtext']
547
+ slide['class'] = slide['class'].split.reject { |klass| blacklist.include? klass }.join(' ')
548
+
549
+ doc.to_html
550
+ end
551
+
526
552
  def process_content_for_all_slides(content, num_slides, opts={})
527
553
  content.gsub!("~~~NUM_SLIDES~~~", num_slides.to_s)
528
554
 
@@ -0,0 +1,274 @@
1
+ /* Flowchart variables */
2
+ /* Sequence Diagram variables */
3
+ /* Gantt chart variables */
4
+ /* Updated with Showoff selector to reduce collisions! */
5
+ .language-render-diagram .mermaid .label {
6
+ color: #333;
7
+ }
8
+ .language-render-diagram .node rect,
9
+ .language-render-diagram .node circle,
10
+ .language-render-diagram .node ellipse,
11
+ .language-render-diagram .node polygon {
12
+ fill: #ECECFF;
13
+ stroke: #CCCCFF;
14
+ stroke-width: 1px;
15
+ }
16
+ .language-render-diagram .edgePath .path {
17
+ stroke: #333333;
18
+ }
19
+ .language-render-diagram .edgeLabel {
20
+ background-color: #e8e8e8;
21
+ }
22
+ .language-render-diagram .cluster rect {
23
+ fill: #ffffde !important;
24
+ rx: 4 !important;
25
+ stroke: #aaaa33 !important;
26
+ stroke-width: 1px !important;
27
+ }
28
+ .language-render-diagram .cluster text {
29
+ fill: #333;
30
+ }
31
+ .language-render-diagram .actor {
32
+ stroke: #CCCCFF;
33
+ fill: #ECECFF;
34
+ }
35
+ .language-render-diagram text.actor {
36
+ fill: black;
37
+ stroke: none;
38
+ }
39
+ .language-render-diagram .actor-line {
40
+ stroke: grey;
41
+ }
42
+ .language-render-diagram .messageLine0 {
43
+ stroke-width: 1.5;
44
+ stroke-dasharray: "2 2";
45
+ marker-end: "url(#arrowhead)";
46
+ stroke: #333;
47
+ }
48
+ .language-render-diagram .messageLine1 {
49
+ stroke-width: 1.5;
50
+ stroke-dasharray: "2 2";
51
+ stroke: #333;
52
+ }
53
+ .language-render-diagram #arrowhead {
54
+ fill: #333;
55
+ }
56
+ .language-render-diagram #crosshead path {
57
+ fill: #333 !important;
58
+ stroke: #333 !important;
59
+ }
60
+ .language-render-diagram .messageText {
61
+ fill: #333;
62
+ stroke: none;
63
+ }
64
+ .language-render-diagram .labelBox {
65
+ stroke: #CCCCFF;
66
+ fill: #ECECFF;
67
+ }
68
+ .language-render-diagram .labelText {
69
+ fill: black;
70
+ stroke: none;
71
+ }
72
+ .language-render-diagram .loopText {
73
+ fill: black;
74
+ stroke: none;
75
+ }
76
+ .language-render-diagram .loopLine {
77
+ stroke-width: 2;
78
+ stroke-dasharray: "2 2";
79
+ marker-end: "url(#arrowhead)";
80
+ stroke: #CCCCFF;
81
+ }
82
+ .language-render-diagram .note {
83
+ stroke: #aaaa33;
84
+ fill: #fff5ad;
85
+ }
86
+ .language-render-diagram .noteText {
87
+ fill: black;
88
+ stroke: none;
89
+ font-family: 'trebuchet ms', verdana, arial;
90
+ font-size: 14px;
91
+ }
92
+ /** Section styling */
93
+ .language-render-diagram .section {
94
+ stroke: none;
95
+ opacity: 0.2;
96
+ }
97
+ .language-render-diagram .section0 {
98
+ fill: rgba(102, 102, 255, 0.49);
99
+ }
100
+ .language-render-diagram .section2 {
101
+ fill: #fff400;
102
+ }
103
+ .language-render-diagram .section1,
104
+ .language-render-diagram .section3 {
105
+ fill: white;
106
+ opacity: 0.2;
107
+ }
108
+ .language-render-diagram .sectionTitle0 {
109
+ fill: #333;
110
+ }
111
+ .language-render-diagram .sectionTitle1 {
112
+ fill: #333;
113
+ }
114
+ .language-render-diagram .sectionTitle2 {
115
+ fill: #333;
116
+ }
117
+ .language-render-diagram .sectionTitle3 {
118
+ fill: #333;
119
+ }
120
+ .language-render-diagram .sectionTitle {
121
+ text-anchor: start;
122
+ font-size: 11px;
123
+ text-height: 14px;
124
+ }
125
+ /* Grid and axis */
126
+ .language-render-diagram .grid .tick {
127
+ stroke: lightgrey;
128
+ opacity: 0.3;
129
+ shape-rendering: crispEdges;
130
+ }
131
+ .language-render-diagram .grid path {
132
+ stroke-width: 0;
133
+ }
134
+ /* Today line */
135
+ .language-render-diagram .today {
136
+ fill: none;
137
+ stroke: red;
138
+ stroke-width: 2px;
139
+ }
140
+ /* Task styling */
141
+ /* Default task */
142
+ .language-render-diagram .task {
143
+ stroke-width: 2;
144
+ }
145
+ .language-render-diagram .taskText {
146
+ text-anchor: middle;
147
+ font-size: 11px;
148
+ }
149
+ .language-render-diagram .taskTextOutsideRight {
150
+ fill: black;
151
+ text-anchor: start;
152
+ font-size: 11px;
153
+ }
154
+ .language-render-diagram .taskTextOutsideLeft {
155
+ fill: black;
156
+ text-anchor: end;
157
+ font-size: 11px;
158
+ }
159
+ /* Specific task settings for the sections*/
160
+ .language-render-diagram .taskText0,
161
+ .language-render-diagram .taskText1,
162
+ .language-render-diagram .taskText2,
163
+ .language-render-diagram .taskText3 {
164
+ fill: white;
165
+ }
166
+ .language-render-diagram .task0,
167
+ .language-render-diagram .task1,
168
+ .language-render-diagram .task2,
169
+ .language-render-diagram .task3 {
170
+ fill: #8a90dd;
171
+ stroke: #534fbc;
172
+ }
173
+ .language-render-diagram .taskTextOutside0,
174
+ .language-render-diagram .taskTextOutside2 {
175
+ fill: black;
176
+ }
177
+ .language-render-diagram .taskTextOutside1,
178
+ .language-render-diagram .taskTextOutside3 {
179
+ fill: black;
180
+ }
181
+ /* Active task */
182
+ .language-render-diagram .active0,
183
+ .language-render-diagram .active1,
184
+ .language-render-diagram .active2,
185
+ .language-render-diagram .active3 {
186
+ fill: #bfc7ff;
187
+ stroke: #534fbc;
188
+ }
189
+ .language-render-diagram .activeText0,
190
+ .language-render-diagram .activeText1,
191
+ .language-render-diagram .activeText2,
192
+ .language-render-diagram .activeText3 {
193
+ fill: black !important;
194
+ }
195
+ /* Completed task */
196
+ .language-render-diagram .done0,
197
+ .language-render-diagram .done1,
198
+ .language-render-diagram .done2,
199
+ .language-render-diagram .done3 {
200
+ stroke: grey;
201
+ fill: lightgrey;
202
+ stroke-width: 2;
203
+ }
204
+ .language-render-diagram .doneText0,
205
+ .language-render-diagram .doneText1,
206
+ .language-render-diagram .doneText2,
207
+ .language-render-diagram .doneText3 {
208
+ fill: black !important;
209
+ }
210
+ /* Tasks on the critical line */
211
+ .language-render-diagram .crit0,
212
+ .language-render-diagram .crit1,
213
+ .language-render-diagram .crit2,
214
+ .language-render-diagram .crit3 {
215
+ stroke: #ff8888;
216
+ fill: red;
217
+ stroke-width: 2;
218
+ }
219
+ .language-render-diagram .activeCrit0,
220
+ .language-render-diagram .activeCrit1,
221
+ .language-render-diagram .activeCrit2,
222
+ .language-render-diagram .activeCrit3 {
223
+ stroke: #ff8888;
224
+ fill: #bfc7ff;
225
+ stroke-width: 2;
226
+ }
227
+ .language-render-diagram .doneCrit0,
228
+ .language-render-diagram .doneCrit1,
229
+ .language-render-diagram .doneCrit2,
230
+ .language-render-diagram .doneCrit3 {
231
+ stroke: #ff8888;
232
+ fill: lightgrey;
233
+ stroke-width: 2;
234
+ cursor: pointer;
235
+ shape-rendering: crispEdges;
236
+ }
237
+ .language-render-diagram .doneCritText0,
238
+ .language-render-diagram .doneCritText1,
239
+ .language-render-diagram .doneCritText2,
240
+ .language-render-diagram .doneCritText3 {
241
+ fill: black !important;
242
+ }
243
+ .language-render-diagram .activeCritText0,
244
+ .language-render-diagram .activeCritText1,
245
+ .language-render-diagram .activeCritText2,
246
+ .language-render-diagram .activeCritText3 {
247
+ fill: black !important;
248
+ }
249
+ .language-render-diagram .titleText {
250
+ text-anchor: middle;
251
+ font-size: 18px;
252
+ fill: black;
253
+ }
254
+ /*
255
+
256
+
257
+ */
258
+ .language-render-diagram .node text {
259
+ font-family: 'trebuchet ms', verdana, arial;
260
+ font-size: 14px;
261
+ }
262
+ .language-render-diagram div.mermaidTooltip {
263
+ position: absolute;
264
+ text-align: center;
265
+ max-width: 200px;
266
+ padding: 2px;
267
+ font-family: 'trebuchet ms', verdana, arial;
268
+ font-size: 12px;
269
+ background: #ffffde;
270
+ border: 1px solid #aaaa33;
271
+ border-radius: 2px;
272
+ pointer-events: none;
273
+ z-index: 100;
274
+ }
@@ -620,6 +620,13 @@ pre.highlight code.language-powershellconsole.nochrome {
620
620
  overflow: hidden;
621
621
  }
622
622
 
623
+ /* Diagram styling: overriding mermaid.css as needed */
624
+ .language-render-diagram,
625
+ .language-render-diagram .noteText,
626
+ .language-render-diagram .node text,
627
+ .language-render-diagram div.mermaidTooltip {
628
+ font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
629
+ }
623
630
 
624
631
 
625
632
  /**********************************