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.
This commit is contained in:
parent
e7b045eada
commit
f4f9af06c9
4 changed files with 33 additions and 1 deletions
|
@ -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";
|
||||||
|
|
27
app/assets/stylesheets/framework/asciidoctor.scss
Normal file
27
app/assets/stylesheets/framework/asciidoctor.scss
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
title: Enable AsciiDoctor admonition icons
|
||||||
|
merge_request: 7812
|
||||||
|
author: Horacio Sanson
|
|
@ -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.
|
||||||
|
|
Loading…
Reference in a new issue