diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2017-09-21 13:36:03 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2017-09-21 13:36:03 +0300 |
commit | 89ded935badf78b306b674fe35d23bb81dd51828 (patch) | |
tree | 4575bc1b3c0ef883ffd6be970ec445099bbec865 /lib | |
parent | ce323833e9e85d2b7555498aa23de381366d9ca8 (diff) |
Use font awesome icons in alerts
Diffstat (limited to 'lib')
-rw-r--r-- | lib/filters/admonition.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/filters/admonition.rb b/lib/filters/admonition.rb index 4bf5a080..141b93d7 100644 --- a/lib/filters/admonition.rb +++ b/lib/filters/admonition.rb @@ -13,9 +13,9 @@ class AdmonitionFilter < Nanoc::Filter } FONT_AWESOME_MAPPING = { - 'note' => 'pencil', - 'tip' => 'info-circle', - 'warning' => 'exclamation-triangle', + 'note' => 'info-circle', + 'tip' => 'pencil', + 'caution' => 'exclamation-triangle', 'danger' => 'bolt', } @@ -35,6 +35,7 @@ class AdmonitionFilter < Nanoc::Filter def generate(kind, content) %[<div class="admonition-wrapper #{kind}">] + %[<div class="admonition alert alert-#{BOOTSTRAP_MAPPING[kind]}">] + + %[<i class="fa fa-#{FONT_AWESOME_MAPPING[kind]} fa-fw" aria-hidden="true"></i>] + content + %[</div></div>] end |