Skip to content

Commit

Permalink
Merge pull request #224 from obilodeau/callout-icons
Browse files Browse the repository at this point in the history
Source callout icons now work. Fixes #168
  • Loading branch information
obilodeau authored Nov 14, 2018
2 parents 0b30572 + 241eb27 commit 5894f6e
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 1 deletion.
1 change: 0 additions & 1 deletion examples/source-callouts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

== Callout

// FIXME Callout with `:icons: font` not styled as a numbered ball (#168)
[source, rust]
----
fn main() {
Expand Down
9 changes: 9 additions & 0 deletions templates/asciidoctor_revealjs.css.slim
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,12 @@ css:
.reveal div.right {
float: right;
}

/* callouts */
.conum[data-value] {display:inline-block;color:#fff!important;background-color:rgba(50,150,50,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
.conum[data-value] *{color:#fff!important}
.conum[data-value]+b{display:none}
.conum[data-value]:after{content:attr(data-value)}
pre .conum[data-value]{position:relative;top:-.125em}
b.conum *{color:inherit!important}
.conum:not([data-value]):empty{display:none}
72 changes: 72 additions & 0 deletions test/doctest/document.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ <h1>The Dangerous and Thrilling Documentation Chronicles</h1>
.reveal div.right {
float: right;
}

/* callouts */
.conum[data-value] {display:inline-block;color:#fff!important;background-color:rgba(50,150,50,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
.conum[data-value] *{color:#fff!important}
.conum[data-value]+b{display:none}
.conum[data-value]:after{content:attr(data-value)}
pre .conum[data-value]{position:relative;top:-.125em}
b.conum *{color:inherit!important}
.conum:not([data-value]):empty{display:none}
</style>
<link href="reveal.js/lib/css/zenburn.css" rel="stylesheet">
<script>
Expand Down Expand Up @@ -181,6 +190,15 @@ <h1>The Dangerous and Thrilling Documentation Chronicles</h1>
.reveal div.right {
float: right;
}

/* callouts */
.conum[data-value] {display:inline-block;color:#fff!important;background-color:rgba(50,150,50,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
.conum[data-value] *{color:#fff!important}
.conum[data-value]+b{display:none}
.conum[data-value]:after{content:attr(data-value)}
pre .conum[data-value]{position:relative;top:-.125em}
b.conum *{color:inherit!important}
.conum:not([data-value]):empty{display:none}
</style>
<link href="reveal.js/lib/css/zenburn.css" rel="stylesheet">
<script>
Expand Down Expand Up @@ -330,6 +348,15 @@ <h1>The Dangerous and Thrilling Documentation Chronicles</h1>
.reveal div.right {
float: right;
}

/* callouts */
.conum[data-value] {display:inline-block;color:#fff!important;background-color:rgba(50,150,50,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
.conum[data-value] *{color:#fff!important}
.conum[data-value]+b{display:none}
.conum[data-value]:after{content:attr(data-value)}
pre .conum[data-value]{position:relative;top:-.125em}
b.conum *{color:inherit!important}
.conum:not([data-value]):empty{display:none}
</style>
<link href="reveal.js/lib/css/zenburn.css" rel="stylesheet">
<script>
Expand Down Expand Up @@ -479,6 +506,15 @@ <h1>Document Title</h1>
.reveal div.right {
float: right;
}

/* callouts */
.conum[data-value] {display:inline-block;color:#fff!important;background-color:rgba(50,150,50,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
.conum[data-value] *{color:#fff!important}
.conum[data-value]+b{display:none}
.conum[data-value]:after{content:attr(data-value)}
pre .conum[data-value]{position:relative;top:-.125em}
b.conum *{color:inherit!important}
.conum:not([data-value]):empty{display:none}
</style>
<link href="reveal.js/lib/css/zenburn.css" rel="stylesheet">
<script>
Expand Down Expand Up @@ -628,6 +664,15 @@ <h1>Document Title</h1>
.reveal div.right {
float: right;
}

/* callouts */
.conum[data-value] {display:inline-block;color:#fff!important;background-color:rgba(50,150,50,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
.conum[data-value] *{color:#fff!important}
.conum[data-value]+b{display:none}
.conum[data-value]:after{content:attr(data-value)}
pre .conum[data-value]{position:relative;top:-.125em}
b.conum *{color:inherit!important}
.conum:not([data-value]):empty{display:none}
</style>
<link href="reveal.js/lib/css/zenburn.css" rel="stylesheet">
<script>
Expand Down Expand Up @@ -776,6 +821,15 @@ <h1>Document Title</h1>
.reveal div.right {
float: right;
}

/* callouts */
.conum[data-value] {display:inline-block;color:#fff!important;background-color:rgba(50,150,50,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
.conum[data-value] *{color:#fff!important}
.conum[data-value]+b{display:none}
.conum[data-value]:after{content:attr(data-value)}
pre .conum[data-value]{position:relative;top:-.125em}
b.conum *{color:inherit!important}
.conum:not([data-value]):empty{display:none}
</style>
<link href="reveal.js/lib/css/zenburn.css" rel="stylesheet">
<script>
Expand Down Expand Up @@ -926,6 +980,15 @@ <h1>Document Title</h1>
.reveal div.right {
float: right;
}

/* callouts */
.conum[data-value] {display:inline-block;color:#fff!important;background-color:rgba(50,150,50,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
.conum[data-value] *{color:#fff!important}
.conum[data-value]+b{display:none}
.conum[data-value]:after{content:attr(data-value)}
pre .conum[data-value]{position:relative;top:-.125em}
b.conum *{color:inherit!important}
.conum:not([data-value]):empty{display:none}
</style>
<link href="reveal.js/lib/css/zenburn.css" rel="stylesheet">
<script>
Expand Down Expand Up @@ -1076,6 +1139,15 @@ <h2>Cavern Glow</h2>
.reveal div.right {
float: right;
}

/* callouts */
.conum[data-value] {display:inline-block;color:#fff!important;background-color:rgba(50,150,50,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
.conum[data-value] *{color:#fff!important}
.conum[data-value]+b{display:none}
.conum[data-value]:after{content:attr(data-value)}
pre .conum[data-value]{position:relative;top:-.125em}
b.conum *{color:inherit!important}
.conum:not([data-value]):empty{display:none}
</style>
<link href="reveal.js/lib/css/zenburn.css" rel="stylesheet">
<script>
Expand Down

0 comments on commit 5894f6e

Please sign in to comment.