forked from tajmone/pandoc-goodies
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GFM-Alerts.html
549 lines (530 loc) · 32.4 KB
/
GFM-Alerts.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>GFM-Alerts Test</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<style>
a.sourceLine { display: inline-block; line-height: 1.25; }
a.sourceLine { pointer-events: none; color: inherit; text-decoration: inherit; }
a.sourceLine:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode { white-space: pre; position: relative; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
code.sourceCode { white-space: pre-wrap; }
a.sourceLine { text-indent: -1em; padding-left: 1em; }
}
pre.numberSource a.sourceLine
{ position: relative; left: -4em; }
pre.numberSource a.sourceLine::before
{ content: attr(title);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; pointer-events: all; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
a.sourceLine::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
</style>
<link rel="stylesheet" href="github.css" />
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<header id="title-block-header">
<h1 class="title">GFM-Alerts PP-Macros Test</h1>
</header>
<p>This is a run test of the <strong>GFM-Alerts</strong> pp-macros set.</p>
<h1 id="files-list">Files List</h1>
<ul>
<li>macros files:
<ul>
<li><a href="../macros/GFM-Alerts.pp"><code>GFM-Alerts.pp</code></a> — macros definition module.</li>
<li><a href="../macros/GFM-Alerts.css"><code>GFM-Alerts.css</code></a> — CSS style for GFM-Alerts elements.</li>
</ul></li>
<li>extra files:
<ul>
<li><a href="./github.css"><code>github.css</code></a> — basic document CSS styling.</li>
</ul></li>
</ul>
<h1 id="macros-list">Macros list</h1>
<ul>
<li><code>!GFMAlertsInlineCSS</code> — Inject required CSS</li>
<li><code>!GFMAlert( CONTENTS )</code> — <strong>Alert</strong> (blue)</li>
<li><code>!GFMError( CONTENTS )</code> — <strong>Warning</strong> (red)</li>
<li><code>!GFMWarn( CONTENTS )</code> — <strong>Error</strong> (yellow)</li>
<li><code>!GFMSuccess( CONTENTS )</code> — <strong>Success</strong> (green)</li>
<li><code>!GFMAlertNote( CONTENTS )</code> — <strong>Note</strong> (grey)</li>
<li><code>!GFMAlertPlain( CONTENTS )</code> — same as Note (alias of <code>!GFMAlertNote</code>)</li>
</ul>
<h1 id="add-alerts-css">Add Alerts CSS</h1>
<p>We need the CSS definition for viewing alerts. We’ll use the <code>!GFMAlertsInlineCSS</code> macro to inject the contents of <code>GFM-Alerts.css</code> as an inline stylesheet:</p>
<pre><code>!GFMAlertsInlineCSS</code></pre>
<p>this macro emits the following raw html:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb2-1" title="1"><span class="kw"><style</span><span class="ot"> type=</span><span class="st">"text/css"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb2-2" title="2"><span class="co">/*! "GFM-Alerts.css" v2.0 | 2017/11/21 | MIT License (MIT)</span></a>
<a class="sourceLine" id="cb2-3" title="3"><span class="co"> Adapted by Tristano Ajmone from "flash.scss" of Primer CSS by GitHub Inc.:</span></a>
<a class="sourceLine" id="cb2-4" title="4"></a>
<a class="sourceLine" id="cb2-5" title="5"><span class="co"> https://github.com/primer/primer/blob/master/modules/primer-alerts/lib/flash.scss</span></a>
<a class="sourceLine" id="cb2-6" title="6"><span class="co"> http://primercss.io/archive/alerts/</span></a>
<a class="sourceLine" id="cb2-7" title="7"></a>
<a class="sourceLine" id="cb2-8" title="8"><span class="co"> Copyright (c) 2017 Tristano Ajmone.</span></a>
<a class="sourceLine" id="cb2-9" title="9"><span class="co"> Copyright (c) 2017 GitHub Inc.</span></a>
<a class="sourceLine" id="cb2-10" title="10"><span class="co">*/</span></a>
<a class="sourceLine" id="cb2-11" title="11"><span class="fu">.Alert</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-12" title="12"><span class="fu">.Warning</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-13" title="13"><span class="fu">.Error</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-14" title="14"><span class="fu">.Success</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-15" title="15"><span class="fu">.Note</span> {</a>
<a class="sourceLine" id="cb2-16" title="16"> <span class="kw">padding</span>: <span class="dv">11</span><span class="dt">px</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-17" title="17"> <span class="kw">margin-bottom</span>: <span class="dv">24</span><span class="dt">px</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-18" title="18"> <span class="kw">border-style</span>: <span class="dv">solid</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-19" title="19"> <span class="kw">border-width</span>: <span class="dv">1</span><span class="dt">px</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-20" title="20"> <span class="kw">border-radius</span>: <span class="dv">4</span><span class="dt">px</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-21" title="21">}</a>
<a class="sourceLine" id="cb2-22" title="22"><span class="fu">.Alert</span> p<span class="op">,</span></a>
<a class="sourceLine" id="cb2-23" title="23"><span class="fu">.Warning</span> p<span class="op">,</span></a>
<a class="sourceLine" id="cb2-24" title="24"><span class="fu">.Error</span> p<span class="op">,</span></a>
<a class="sourceLine" id="cb2-25" title="25"><span class="fu">.Success</span> p<span class="op">,</span></a>
<a class="sourceLine" id="cb2-26" title="26"><span class="fu">.Note</span> p {</a>
<a class="sourceLine" id="cb2-27" title="27"> <span class="kw">margin-top</span>: <span class="dv">0</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-28" title="28">}</a>
<a class="sourceLine" id="cb2-29" title="29"><span class="fu">.Alert</span> p<span class="in">:last-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-30" title="30"><span class="fu">.Warning</span> p<span class="in">:last-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-31" title="31"><span class="fu">.Error</span> p<span class="in">:last-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-32" title="32"><span class="fu">.Success</span> p<span class="in">:last-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-33" title="33"><span class="fu">.Note</span> p<span class="in">:last-child</span> {</a>
<a class="sourceLine" id="cb2-34" title="34"> <span class="kw">margin-bottom</span>: <span class="dv">0</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-35" title="35">}</a>
<a class="sourceLine" id="cb2-36" title="36"></a>
<a class="sourceLine" id="cb2-37" title="37"><span class="fu">.Alert</span> {</a>
<a class="sourceLine" id="cb2-38" title="38"> <span class="kw">color</span>: <span class="cn">#224466</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-39" title="39"> <span class="kw">background-color</span>: <span class="cn">#E2EEF9</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-40" title="40"> <span class="kw">border-color</span>: <span class="cn">#BAC6D3</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-41" title="41">}</a>
<a class="sourceLine" id="cb2-42" title="42"></a>
<a class="sourceLine" id="cb2-43" title="43"><span class="fu">.Warning</span> {</a>
<a class="sourceLine" id="cb2-44" title="44"> <span class="kw">color</span>: <span class="cn">#4C4A42</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-45" title="45"> <span class="kw">background-color</span>: <span class="cn">#FFF9EA</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-46" title="46"> <span class="kw">border-color</span>: <span class="cn">#DFD8C2</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-47" title="47">}</a>
<a class="sourceLine" id="cb2-48" title="48"></a>
<a class="sourceLine" id="cb2-49" title="49"><span class="fu">.Error</span> {</a>
<a class="sourceLine" id="cb2-50" title="50"> <span class="kw">color</span>: <span class="cn">#991111</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-51" title="51"> <span class="kw">background-color</span>: <span class="cn">#FCDEDE</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-52" title="52"> <span class="kw">border-color</span>: <span class="cn">#D2B2B2</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-53" title="53">}</a>
<a class="sourceLine" id="cb2-54" title="54"></a>
<a class="sourceLine" id="cb2-55" title="55"><span class="fu">.Success</span> {</a>
<a class="sourceLine" id="cb2-56" title="56"> <span class="kw">color</span>: <span class="cn">#22662C</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-57" title="57"> <span class="kw">background-color</span>: <span class="cn">#E2F9E5</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-58" title="58"> <span class="kw">border-color</span>: <span class="cn">#BAD3BE</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-59" title="59">}</a>
<a class="sourceLine" id="cb2-60" title="60"></a>
<a class="sourceLine" id="cb2-61" title="61"><span class="fu">.Note</span> {</a>
<a class="sourceLine" id="cb2-62" title="62"> <span class="kw">color</span>: <span class="cn">#2F363D</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-63" title="63"> <span class="kw">background-color</span>: <span class="cn">#F6F8FA</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-64" title="64"> <span class="kw">border-color</span>: <span class="cn">#D5D8DA</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-65" title="65">}</a>
<a class="sourceLine" id="cb2-66" title="66"></a>
<a class="sourceLine" id="cb2-67" title="67"><span class="fu">.Alert</span> h1<span class="op">,</span></a>
<a class="sourceLine" id="cb2-68" title="68"><span class="fu">.Alert</span> h2<span class="op">,</span></a>
<a class="sourceLine" id="cb2-69" title="69"><span class="fu">.Alert</span> h3<span class="op">,</span></a>
<a class="sourceLine" id="cb2-70" title="70"><span class="fu">.Alert</span> h4<span class="op">,</span></a>
<a class="sourceLine" id="cb2-71" title="71"><span class="fu">.Alert</span> h5<span class="op">,</span></a>
<a class="sourceLine" id="cb2-72" title="72"><span class="fu">.Alert</span> h6 {</a>
<a class="sourceLine" id="cb2-73" title="73"> <span class="kw">color</span>: <span class="cn">#224466</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-74" title="74"> <span class="kw">margin-bottom</span>: <span class="dv">0</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-75" title="75">}</a>
<a class="sourceLine" id="cb2-76" title="76"></a>
<a class="sourceLine" id="cb2-77" title="77"><span class="fu">.Warning</span> h1<span class="op">,</span></a>
<a class="sourceLine" id="cb2-78" title="78"><span class="fu">.Warning</span> h2<span class="op">,</span></a>
<a class="sourceLine" id="cb2-79" title="79"><span class="fu">.Warning</span> h3<span class="op">,</span></a>
<a class="sourceLine" id="cb2-80" title="80"><span class="fu">.Warning</span> h4<span class="op">,</span></a>
<a class="sourceLine" id="cb2-81" title="81"><span class="fu">.Warning</span> h5<span class="op">,</span></a>
<a class="sourceLine" id="cb2-82" title="82"><span class="fu">.Warning</span> h6 {</a>
<a class="sourceLine" id="cb2-83" title="83"> <span class="kw">color</span>: <span class="cn">#4C4A42</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-84" title="84"> <span class="kw">margin-bottom</span>: <span class="dv">0</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-85" title="85">}</a>
<a class="sourceLine" id="cb2-86" title="86"></a>
<a class="sourceLine" id="cb2-87" title="87"><span class="fu">.Error</span> h1<span class="op">,</span></a>
<a class="sourceLine" id="cb2-88" title="88"><span class="fu">.Error</span> h2<span class="op">,</span></a>
<a class="sourceLine" id="cb2-89" title="89"><span class="fu">.Error</span> h3<span class="op">,</span></a>
<a class="sourceLine" id="cb2-90" title="90"><span class="fu">.Error</span> h4<span class="op">,</span></a>
<a class="sourceLine" id="cb2-91" title="91"><span class="fu">.Error</span> h5<span class="op">,</span></a>
<a class="sourceLine" id="cb2-92" title="92"><span class="fu">.Error</span> h6 {</a>
<a class="sourceLine" id="cb2-93" title="93"> <span class="kw">color</span>: <span class="cn">#991111</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-94" title="94"> <span class="kw">margin-bottom</span>: <span class="dv">0</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-95" title="95">}</a>
<a class="sourceLine" id="cb2-96" title="96"></a>
<a class="sourceLine" id="cb2-97" title="97"><span class="fu">.Success</span> h1<span class="op">,</span></a>
<a class="sourceLine" id="cb2-98" title="98"><span class="fu">.Success</span> h2<span class="op">,</span></a>
<a class="sourceLine" id="cb2-99" title="99"><span class="fu">.Success</span> h3<span class="op">,</span></a>
<a class="sourceLine" id="cb2-100" title="100"><span class="fu">.Success</span> h4<span class="op">,</span></a>
<a class="sourceLine" id="cb2-101" title="101"><span class="fu">.Success</span> h5<span class="op">,</span></a>
<a class="sourceLine" id="cb2-102" title="102"><span class="fu">.Success</span> h6 {</a>
<a class="sourceLine" id="cb2-103" title="103"> <span class="kw">color</span>: <span class="cn">#22662C</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-104" title="104"> <span class="kw">margin-bottom</span>: <span class="dv">0</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-105" title="105">}</a>
<a class="sourceLine" id="cb2-106" title="106"></a>
<a class="sourceLine" id="cb2-107" title="107"><span class="fu">.Note</span> h1<span class="op">,</span></a>
<a class="sourceLine" id="cb2-108" title="108"><span class="fu">.Note</span> h2<span class="op">,</span></a>
<a class="sourceLine" id="cb2-109" title="109"><span class="fu">.Note</span> h3<span class="op">,</span></a>
<a class="sourceLine" id="cb2-110" title="110"><span class="fu">.Note</span> h4<span class="op">,</span></a>
<a class="sourceLine" id="cb2-111" title="111"><span class="fu">.Note</span> h5<span class="op">,</span></a>
<a class="sourceLine" id="cb2-112" title="112"><span class="fu">.Note</span> h6 {</a>
<a class="sourceLine" id="cb2-113" title="113"> <span class="kw">color</span>: <span class="cn">#2F363D</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-114" title="114"> <span class="kw">margin-bottom</span>: <span class="dv">0</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-115" title="115">}</a>
<a class="sourceLine" id="cb2-116" title="116"></a>
<a class="sourceLine" id="cb2-117" title="117"><span class="fu">.Alert</span> h1<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-118" title="118"><span class="fu">.Alert</span> h2<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-119" title="119"><span class="fu">.Alert</span> h3<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-120" title="120"><span class="fu">.Alert</span> h4<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-121" title="121"><span class="fu">.Alert</span> h5<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-122" title="122"><span class="fu">.Alert</span> h6<span class="in">:first-child</span> {</a>
<a class="sourceLine" id="cb2-123" title="123"> <span class="kw">margin-top</span>: <span class="dv">0</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-124" title="124">}</a>
<a class="sourceLine" id="cb2-125" title="125"></a>
<a class="sourceLine" id="cb2-126" title="126"><span class="fu">.Warning</span> h1<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-127" title="127"><span class="fu">.Warning</span> h2<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-128" title="128"><span class="fu">.Warning</span> h3<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-129" title="129"><span class="fu">.Warning</span> h4<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-130" title="130"><span class="fu">.Warning</span> h5<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-131" title="131"><span class="fu">.Warning</span> h6<span class="in">:first-child</span> {</a>
<a class="sourceLine" id="cb2-132" title="132"> <span class="kw">margin-top</span>: <span class="dv">0</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-133" title="133">}</a>
<a class="sourceLine" id="cb2-134" title="134"></a>
<a class="sourceLine" id="cb2-135" title="135"><span class="fu">.Error</span> h1<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-136" title="136"><span class="fu">.Error</span> h2<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-137" title="137"><span class="fu">.Error</span> h3<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-138" title="138"><span class="fu">.Error</span> h4<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-139" title="139"><span class="fu">.Error</span> h5<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-140" title="140"><span class="fu">.Error</span> h6<span class="in">:first-child</span> {</a>
<a class="sourceLine" id="cb2-141" title="141"> <span class="kw">margin-top</span>: <span class="dv">0</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-142" title="142">}</a>
<a class="sourceLine" id="cb2-143" title="143"></a>
<a class="sourceLine" id="cb2-144" title="144"><span class="fu">.Success</span> h1<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-145" title="145"><span class="fu">.Success</span> h2<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-146" title="146"><span class="fu">.Success</span> h3<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-147" title="147"><span class="fu">.Success</span> h4<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-148" title="148"><span class="fu">.Success</span> h5<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-149" title="149"><span class="fu">.Success</span> h6<span class="in">:first-child</span> {</a>
<a class="sourceLine" id="cb2-150" title="150"> <span class="kw">margin-top</span>: <span class="dv">0</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-151" title="151">}</a>
<a class="sourceLine" id="cb2-152" title="152"></a>
<a class="sourceLine" id="cb2-153" title="153"><span class="fu">.Note</span> h1<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-154" title="154"><span class="fu">.Note</span> h2<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-155" title="155"><span class="fu">.Note</span> h3<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-156" title="156"><span class="fu">.Note</span> h4<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-157" title="157"><span class="fu">.Note</span> h5<span class="in">:first-child</span><span class="op">,</span></a>
<a class="sourceLine" id="cb2-158" title="158"><span class="fu">.Note</span> h6<span class="in">:first-child</span> {</a>
<a class="sourceLine" id="cb2-159" title="159"> <span class="kw">margin-top</span>: <span class="dv">0</span><span class="op">;</span></a>
<a class="sourceLine" id="cb2-160" title="160">}</a>
<a class="sourceLine" id="cb2-161" title="161"></a>
<a class="sourceLine" id="cb2-162" title="162"><span class="co">/*# sourceMappingURL=GFM-Alerts.css.map */</span></a>
<a class="sourceLine" id="cb2-163" title="163"></a>
<a class="sourceLine" id="cb2-164" title="164"><span class="kw"></style></span></a></code></pre></div>
<style type="text/css">
/*! "GFM-Alerts.css" v2.0 | 2017/11/21 | MIT License (MIT)
Adapted by Tristano Ajmone from "flash.scss" of Primer CSS by GitHub Inc.:
https://github.com/primer/primer/blob/master/modules/primer-alerts/lib/flash.scss
http://primercss.io/archive/alerts/
Copyright (c) 2017 Tristano Ajmone.
Copyright (c) 2017 GitHub Inc.
*/
.Alert,
.Warning,
.Error,
.Success,
.Note {
padding: 11px;
margin-bottom: 24px;
border-style: solid;
border-width: 1px;
border-radius: 4px;
}
.Alert p,
.Warning p,
.Error p,
.Success p,
.Note p {
margin-top: 0;
}
.Alert p:last-child,
.Warning p:last-child,
.Error p:last-child,
.Success p:last-child,
.Note p:last-child {
margin-bottom: 0;
}
.Alert {
color: #224466;
background-color: #E2EEF9;
border-color: #BAC6D3;
}
.Warning {
color: #4C4A42;
background-color: #FFF9EA;
border-color: #DFD8C2;
}
.Error {
color: #991111;
background-color: #FCDEDE;
border-color: #D2B2B2;
}
.Success {
color: #22662C;
background-color: #E2F9E5;
border-color: #BAD3BE;
}
.Note {
color: #2F363D;
background-color: #F6F8FA;
border-color: #D5D8DA;
}
.Alert h1,
.Alert h2,
.Alert h3,
.Alert h4,
.Alert h5,
.Alert h6 {
color: #224466;
margin-bottom: 0;
}
.Warning h1,
.Warning h2,
.Warning h3,
.Warning h4,
.Warning h5,
.Warning h6 {
color: #4C4A42;
margin-bottom: 0;
}
.Error h1,
.Error h2,
.Error h3,
.Error h4,
.Error h5,
.Error h6 {
color: #991111;
margin-bottom: 0;
}
.Success h1,
.Success h2,
.Success h3,
.Success h4,
.Success h5,
.Success h6 {
color: #22662C;
margin-bottom: 0;
}
.Note h1,
.Note h2,
.Note h3,
.Note h4,
.Note h5,
.Note h6 {
color: #2F363D;
margin-bottom: 0;
}
.Alert h1:first-child,
.Alert h2:first-child,
.Alert h3:first-child,
.Alert h4:first-child,
.Alert h5:first-child,
.Alert h6:first-child {
margin-top: 0;
}
.Warning h1:first-child,
.Warning h2:first-child,
.Warning h3:first-child,
.Warning h4:first-child,
.Warning h5:first-child,
.Warning h6:first-child {
margin-top: 0;
}
.Error h1:first-child,
.Error h2:first-child,
.Error h3:first-child,
.Error h4:first-child,
.Error h5:first-child,
.Error h6:first-child {
margin-top: 0;
}
.Success h1:first-child,
.Success h2:first-child,
.Success h3:first-child,
.Success h4:first-child,
.Success h5:first-child,
.Success h6:first-child {
margin-top: 0;
}
.Note h1:first-child,
.Note h2:first-child,
.Note h3:first-child,
.Note h4:first-child,
.Note h5:first-child,
.Note h6:first-child {
margin-top: 0;
}
/*# sourceMappingURL=GFM-Alerts.css.map */
</style>
<h1 id="alerts-tests">Alerts Tests</h1>
<h2 id="default-alert">Default Alert</h2>
<p>macro used:</p>
<pre><code>!GFMAlert(**Default** --- Lorem ipsum dolor sit amet, pri cu libris dicunt.)</code></pre>
<p>raw html output:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb4-1" title="1"><span class="kw"><div</span><span class="ot"> class=</span><span class="st">"Alert"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb4-2" title="2">**Default** --- Lorem ipsum dolor sit amet, pri cu libris dicunt.</a>
<a class="sourceLine" id="cb4-3" title="3"><span class="kw"></div></span></a></code></pre></div>
<p>result preview:</p>
<div class="Alert">
<p><strong>Default</strong> — Lorem ipsum dolor sit amet, pri cu libris dicunt.</p>
</div>
<h2 id="warning-alert">Warning Alert</h2>
<p>macro used:</p>
<pre><code>!GFMWarn(**Warning** --- Lorem ipsum dolor sit amet, pri cu libris dicunt.)</code></pre>
<p>raw html output:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb6-1" title="1"><span class="kw"><div</span><span class="ot"> class=</span><span class="st">"Warning"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb6-2" title="2">**Warning** --- Lorem ipsum dolor sit amet, pri cu libris dicunt.</a>
<a class="sourceLine" id="cb6-3" title="3"><span class="kw"></div></span></a></code></pre></div>
<p>result preview:</p>
<div class="Warning">
<p><strong>Warning</strong> — Lorem ipsum dolor sit amet, pri cu libris dicunt.</p>
</div>
<h2 id="error-alert">Error Alert</h2>
<p>macro used:</p>
<pre><code>!GFMError(**Error** --- Lorem ipsum dolor sit amet, pri cu libris dicunt.)</code></pre>
<p>raw html output:</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb8-1" title="1"><span class="kw"><div</span><span class="ot"> class=</span><span class="st">"Error"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb8-2" title="2">**Error** --- Lorem ipsum dolor sit amet, pri cu libris dicunt.</a>
<a class="sourceLine" id="cb8-3" title="3"><span class="kw"></div></span></a></code></pre></div>
<p>result preview:</p>
<div class="Error">
<p><strong>Error</strong> — Lorem ipsum dolor sit amet, pri cu libris dicunt.</p>
</div>
<h2 id="success-alert">Success Alert</h2>
<p>macro used:</p>
<pre><code>!GFMSuccess(**Success** --- Lorem ipsum dolor sit amet, pri cu libris dicunt.)</code></pre>
<p>raw html output:</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb10-1" title="1"><span class="kw"><div</span><span class="ot"> class=</span><span class="st">"Success"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb10-2" title="2">**Success** --- Lorem ipsum dolor sit amet, pri cu libris dicunt.</a>
<a class="sourceLine" id="cb10-3" title="3"><span class="kw"></div></span></a></code></pre></div>
<p>result preview:</p>
<div class="Success">
<p><strong>Success</strong> — Lorem ipsum dolor sit amet, pri cu libris dicunt.</p>
</div>
<h2 id="note-alert">Note Alert</h2>
<blockquote>
<p><strong>NOTE</strong>: This Alert is not part of GitHub’s original set of Alerts; I’ve added it.</p>
</blockquote>
<p>macro used:</p>
<pre><code>!GFMAlertNote(**Note** --- Lorem ipsum dolor sit amet, pri cu libris dicunt.)</code></pre>
<p>raw html output:</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb12-1" title="1"><span class="kw"><div</span><span class="ot"> class=</span><span class="st">"Note"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb12-2" title="2">**Note** --- Lorem ipsum dolor sit amet, pri cu libris dicunt.</a>
<a class="sourceLine" id="cb12-3" title="3"><span class="kw"></div></span></a></code></pre></div>
<p>result preview:</p>
<div class="Note">
<p><strong>Note</strong> — Lorem ipsum dolor sit amet, pri cu libris dicunt.</p>
</div>
<h2 id="plain-alert">Plain Alert</h2>
<blockquote>
<p><strong>NOTE</strong>: <code>!GFMAlertPlain</code> is just an alias of <code>!GFMAlertNote</code>! The latter is the preferred syntax because it resembles the actual class name used in the <code><div></code> tag.</p>
</blockquote>
<p>macro used:</p>
<pre><code>!GFMAlertPlain(**Plain** --- Lorem ipsum dolor sit amet, pri cu libris dicunt.)</code></pre>
<p>raw html output:</p>
<div class="sourceCode" id="cb14"><pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb14-1" title="1"><span class="kw"><div</span><span class="ot"> class=</span><span class="st">"Note"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb14-2" title="2">**Plain** --- Lorem ipsum dolor sit amet, pri cu libris dicunt.</a>
<a class="sourceLine" id="cb14-3" title="3"><span class="kw"></div></span></a></code></pre></div>
<p>result preview:</p>
<div class="Note">
<p><strong>Plain</strong> — Lorem ipsum dolor sit amet, pri cu libris dicunt.</p>
</div>
<hr />
<h1 id="pandoc-new-fenced-divs">Pandoc New Fenced Divs</h1>
<p>Pandoc 2.0 introduced the <a href="http://pandoc.org/MANUAL.html#extension-fenced_divs" title="Link to pandoc documentation on 'fenced-divs'"><code>fenced_divs</code></a> extension which allows special fenced syntax for native Div blocks. Pandoc markdown flavour supports this extension by default, and it can optionally be enabled for other markdown flavours too.</p>
<p>Fenced divs can be used instead of PP Alert macros, achieving the same effect:</p>
<p>macro used:</p>
<pre><code>::: Warning ::::::
**Warning** --- This is a Warning-Alert.
::::::::::::::::::
</code></pre>
<p>result preview:</p>
<div class="Warning">
<p><strong>Warning</strong> — This is a Warning-Alert.</p>
</div>
<p>… where you only need to insert after the opening <code>:::</code> the class name of the desired GFM-Alert — ie: one of:</p>
<ul>
<li><code>.Alert</code></li>
<li><code>.Warning</code></li>
<li><code>.Error</code></li>
<li><code>.Success</code></li>
<li><code>.Note</code></li>
</ul>
<h2 id="advantages">Advantages</h2>
<p>Using fenced divs has the advantage of not injecting raw HTML into the document, allowing conversion to other formats too. Furthermore, the fenced divs syntax allows to specify multiple classes and an identifier:</p>
<p>macro used:</p>
<pre><code>::: { .Success #custom-id .other-class } ::::::
**Success** --- This is a Success-Alert.
::::::::::::::::::
</code></pre>
<p>result preview:</p>
<div id="custom-id" class="Success other-class">
<p><strong>Success</strong> — This is a Success-Alert.</p>
</div>
<p>… which in the final HTML produces the following <code><div></code> tag:</p>
<div class="sourceCode" id="cb17"><pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb17-1" title="1"><span class="kw"><div</span><span class="ot"> id=</span><span class="st">"custom-id"</span><span class="ot"> class=</span><span class="st">"Success other-class"</span><span class="kw">></span></a></code></pre></div>
</body>
</html>