Skip to content

Commit 2e0a284

Browse files
committed
Top-level main.css for all asciidoctor styles
Properly separate tocbot from asciidoctor styles and use main.css to include both.
1 parent 3febec3 commit 2e0a284

File tree

3 files changed

+25
-19
lines changed

3 files changed

+25
-19
lines changed

gradle/docs.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ asciidoctor {
8585
}
8686
resources {
8787
from(sourceDir) {
88-
include 'images/**', 'tocbot-3.0.2/**'
88+
include 'images/*', 'stylesheets/*', 'tocbot-3.0.2/*'
8989
}
9090
}
9191
logDocuments = true
@@ -104,7 +104,7 @@ asciidoctor {
104104
sectnums: '',
105105
'source-highlighter': 'coderay@', // TODO switch to 'rouge' once supported by the html5 backend
106106
stylesdir: 'stylesheets/',
107-
stylesheet: 'spring.css',
107+
stylesheet: 'main.css',
108108
'spring-version': project.version
109109

110110
}

src/docs/asciidoc/stylesheets/spring.css renamed to src/docs/asciidoc/stylesheets/asciidoctor-spring.css

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,4 @@
11
@import url(https://fonts.googleapis.com/css?family=Varela+Round|Montserrat:400,700);
2-
@import url('../tocbot-3.0.2/tocbot.css');
3-
4-
/* See https://github.com/asciidoctor/asciidoctor/issues/699#issuecomment-321066006 */
5-
/* ================================================================================ */
6-
#tocbot a.toc-link.node-name--H1{ font-style: italic }
7-
@media screen{
8-
#tocbot > ul.toc-list{ margin-bottom: 0.5em; margin-left: 0.125em }
9-
#tocbot ul.sectlevel0, #tocbot a.toc-link.node-name--H1 + ul{
10-
padding-left: 0 }
11-
#tocbot a.toc-link{ height:100% }
12-
.is-collapsible{ max-height:3000px; overflow:hidden; }
13-
.is-collapsed{ max-height:0 }
14-
.is-active-link{ font-weight:700 }
15-
}
16-
@media print{
17-
#tocbot a.toc-link.node-name--H4{ display:none }
18-
}
192
/* ================================================================================ */
203

214
/*! normalize.css v2.1.2 | MIT License | git.io/normalize */
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/* https://github.com/bclozel/asciidoctor-stylesheet-factory/tree/spring */
2+
/* ===================================================================== */
3+
4+
@import url('stylesheets/asciidoctor-spring.css');
5+
6+
/* https://github.com/asciidoctor/asciidoctor/issues/699#issuecomment-321066006 */
7+
/* ============================================================================ */
8+
9+
@import url('tocbot-3.0.2/tocbot.css');
10+
11+
#tocbot a.toc-link.node-name--H1{ font-style: italic }
12+
@media screen{
13+
#tocbot > ul.toc-list{ margin-bottom: 0.5em; margin-left: 0.125em }
14+
#tocbot ul.sectlevel0, #tocbot a.toc-link.node-name--H1 + ul{
15+
padding-left: 0 }
16+
#tocbot a.toc-link{ height:100% }
17+
.is-collapsible{ max-height:3000px; overflow:hidden; }
18+
.is-collapsed{ max-height:0 }
19+
.is-active-link{ font-weight:700 }
20+
}
21+
@media print{
22+
#tocbot a.toc-link.node-name--H4{ display:none }
23+
}

0 commit comments

Comments
 (0)