You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* admonitions with icons and FontAwesome
Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
* updated important and warning icons per review
Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
Copy file name to clipboardExpand all lines: test.md
+16-98Lines changed: 16 additions & 98 deletions
Original file line number
Diff line number
Diff line change
@@ -372,15 +372,15 @@ The new styles (with icons) are defined a way that will not impact notes
372
372
previously formatted with the original styles (prefixed text), so notes in your
373
373
published documents won't be adversely affected.
374
374
375
-
Both styles are desribed below with examples.
375
+
Examples of both styles are shown below.
376
376
377
377
### Examples (original styles, prefix words)
378
378
379
379
Admonitions with prefixed text use the following class tags, as shown in the examples.
380
380
381
381
* **Note:** No class tag is needed for standard notes.
382
-
* **Important:** Use the `warning` class.
383
-
* **Warning:** Use the `danger` class.
382
+
* **Important:** Use the `important` class.
383
+
* **Warning:** Use the `warning` class.
384
384
385
385
386
386
> **Note**: This is a note using the old note style
@@ -394,18 +394,18 @@ Admonitions with prefixed text use the following class tags, as shown in the exa
394
394
395
395
> It's not safe out there, take this Moby with you
396
396
>
397
-
> Add the `warning` class to your blockquotes if you want to tell users
397
+
> Add the `important` class to your blockquotes if you want to tell users
398
398
to be careful about something.
399
-
{: .warning}
399
+
{: .important}
400
400
401
401
> Ouch, don't do that!
402
402
>
403
-
> Use the `danger` class to let people know this is dangerous or they
403
+
> Use the `warning` class to let people know this is dangerous or they
404
404
should pay close attention to this part of the road.
405
405
>
406
406
> You can also add more paragraphs here if your explanation is
407
407
super complex.
408
-
{: .danger}
408
+
{: .warning}
409
409
410
410
>**This is a crazy note**
411
411
>
@@ -421,110 +421,28 @@ Admonitions with prefixed text use the following class tags, as shown in the exa
421
421
>
422
422
> And another sentence to top it all off.
423
423
424
-
### Admonitions with Glyphicons
425
-
426
-
Let's experiment with some cute [Bootstrap
427
-
Glypicons](http://getbootstrap.com/components/) instead of prefixed text labels. Three new classes have been added to [`_scss/notes.scss`](https://github.com/docker/docker.github.io/blob/master/_scss/_notes.scss):
428
-
429
-
<span><i class="glyphicon glyphicon-ok-sign"></i> Note text can go here.</span> (Notes use the `note-vanilla` class tag.)
430
-
431
-
<span><i class="glyphicon glyphicon-exclamation-sign"></i> Text that describes **Important** admonitions can go here.</span> (Important admonitions use the `warning-vanilla`.)
432
-
433
-
<span><i class="glyphicon glyphicon-ban-circle"></i> Text that describes a **Warning** situation can go here.</span> (Warning admonitions use the `danger-vanilla`.)
434
-
435
-
The associated pseudo-class definitions for`p:first-child::before` for the new classes all use a null valuein`content`, instead of a prefixed word. For example, the standard `warning` class to denote something "Important" uses this:
436
-
437
-
```none
438
-
blockquote.warning > p:first-child::before {
439
-
content: 'Important: ';
440
-
}
441
-
```
442
-
443
-
whereas, `warning-vanilla` uses this:
444
-
445
-
```none
446
-
blockquote.warning > p:first-child::before {
447
-
content: '';
448
-
}
449
-
```
450
-
451
-
So far so good!
452
-
453
-
### Overhead of using Glyphicons
454
-
455
-
The problem is there doesn't seem to be a way to call the icons from the CSS.
456
-
You need to add the HTML to call icons directly in the markdown. Examples shown
457
-
below use inline HTML to call the appropriate glypicon for the admonition type,
458
-
with this pattern: `<i class="glyphicon GlypiconName"></i> `.
> You include a small description here telling users to be on the lookout
480
429
>
481
-
> This is an example of a note using the `note-vanilla` tag, which gives you an icon instead of stock prefixed text so that you can write your own title.
430
+
> This is an example of a note using the `{: .note-vanilla}` tag to get an icon instead of a "Note" prefix, and write your own note title.
482
431
{: .note-vanilla}
483
432
484
-
> <i class="glyphicon glyphicon-ok-sign"></i> Glyphicon terms of use
485
-
>
486
-
> If we do implement the Glyphicons, we just need to include a link back to [Glyphicons](http://glyphicons.com/) per the use agreement.
487
-
>
488
-
> This is another example of a `note-vanilla` tag.
489
-
{: .note-vanilla}
490
433
491
-
><i class="glyphicon glyphicon-exclamation-sign"></i> It's not safe out there, take this Moby with you
492
-
>
493
-
> Use the `warning-vanilla` class to get an icon and spice it up yourself with a custom title. Prefix the warning in markdown with `<i class="glyphicon glyphicon-exclamation-sign"></i>` to get the warning icon.
494
-
{: .warning-vanilla}
495
-
496
-
><i class="glyphicon glyphicon-exclamation-sign"></i> Leave a space before your custom text
434
+
> It's not safe out there, take this Moby with you
497
435
>
498
-
>With all Glyphicons style notes, make sure the icon isn't smashed up against your custom text. Be sure to leave a space _after_ the `</i>` and _before_ the closing backtick: `<i class="glyphicon GlypiconName"></i> `
499
-
{: .warning-vanilla}
436
+
>Use `{: .important-vanilla}` after your important to get an "important" icon.
437
+
{: .important-vanilla}
500
438
501
-
><i class="glyphicon glyphicon-ban-circle"></i> Ouch, don't touch that hot Docker engine!
439
+
> Ouch, don't touch that hot Docker engine!
502
440
>
503
-
> Use the `danger-vanilla` class to get an icon and spice it up yourself with a custom title. Prefix the warning in markdown with `<i class="glyphicon glyphicon-ban-circle"></i>` to get the danger icon.
441
+
> Use `{: .warning-vanilla}` after your warning to get an icon instead of a "Warning" prefix.
504
442
>
505
443
> You can also add more paragraphs here if your explanation is
506
444
super complex.
507
-
{: .danger-vanilla}
508
-
509
-
### Test Liquid admonitions
510
-
511
-
We are experimenting with a different solution that uses Liquid variables. The following note makes a call to file `content/admonitions/notes.html`, where the Liquid variables are defined to format admonitions. We haven't gotten this totally working yet, and are assessing whether it's a more elegant solution or not.
512
-
513
-
{% include content/admonitions/notes.html type="warning" title="Do not do this" text="Multiline text is okay!
514
-
515
-
* See?
516
-
* It's fine!" %}
517
-
518
-
## Comments
519
-
520
-
You can use XML style comments, which show up in the HTML "view source", or
521
-
Liquid ones, which don't. You'll need to view the source of this file to see
522
-
both styles.
523
-
524
-
<!-- This comment will show up in the HTML source -->
0 commit comments