Commit f4f9af06 authored by Horacio Sanson's avatar Horacio Sanson

Enable display of admonition icons in Asciidoc.

When rendering Asciidoc documents this merge request enables the diplay of
admonition blocks using font icons. This improves the looks of Asciidoc redered
files.

This uses the font-awesome fonts already present in Gitlab so no large
dependencies are required for this to work.
parent e7b045ea
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
@import "framework/animations.scss"; @import "framework/animations.scss";
@import "framework/avatar.scss"; @import "framework/avatar.scss";
@import "framework/asciidoctor.scss";
@import "framework/blocks.scss"; @import "framework/blocks.scss";
@import "framework/buttons.scss"; @import "framework/buttons.scss";
@import "framework/calendar.scss"; @import "framework/calendar.scss";
......
.admonitionblock td.icon {
width: 1%;
[class^="fa icon-"] {
@extend .fa-2x;
}
.icon-note {
@extend .fa-thumb-tack;
}
.icon-tip {
@extend .fa-lightbulb-o;
}
.icon-warning {
@extend .fa-exclamation-triangle;
}
.icon-caution {
@extend .fa-fire;
}
.icon-important {
@extend .fa-exclamation-circle;
}
}
---
title: Enable AsciiDoctor admonition icons
merge_request: 7812
author: Horacio Sanson
...@@ -6,7 +6,7 @@ module Gitlab ...@@ -6,7 +6,7 @@ module Gitlab
module Asciidoc module Asciidoc
DEFAULT_ADOC_ATTRS = [ DEFAULT_ADOC_ATTRS = [
'showtitle', 'idprefix=user-content-', 'idseparator=-', 'env=gitlab', 'showtitle', 'idprefix=user-content-', 'idseparator=-', 'env=gitlab',
'env-gitlab', 'source-highlighter=html-pipeline' 'env-gitlab', 'source-highlighter=html-pipeline', 'icons=font'
].freeze ].freeze
# Public: Converts the provided Asciidoc markup into HTML. # Public: Converts the provided Asciidoc markup into HTML.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment