From a1549bfcf793625da875d3e1aa0a5a022b0f598f Mon Sep 17 00:00:00 2001 From: Kevin Bonham Date: Thu, 9 Apr 2020 09:50:47 -0400 Subject: [PATCH 1/2] add example admonition css to example build --- test/examples/src/assets/custom.css | 9 +++++++++ test/examples/src/man/style.md | 15 +++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/test/examples/src/assets/custom.css b/test/examples/src/assets/custom.css index 4502c59dad..0ad130d2ff 100644 --- a/test/examples/src/assets/custom.css +++ b/test/examples/src/assets/custom.css @@ -3,3 +3,12 @@ center.raw-html-block { color: red; } + +.admonition.is-category-myadmonition > .admonition-header { + background-color: rgba(152,78,163,0.8); + } + +.admonition.is-category-myadmonition > .admonition-body { +background-color: rgba(152,78,163,0.2); +} + \ No newline at end of file diff --git a/test/examples/src/man/style.md b/test/examples/src/man/style.md index e88c5d3f3c..254bd410d5 100644 --- a/test/examples/src/man/style.md +++ b/test/examples/src/man/style.md @@ -25,6 +25,21 @@ Also, custom admonition classes can be used: !!! myadmonition "My Admonition Class" In the HTML output, this admonition has `is-category-myadmonition` applied to it. + Its style can be changed by adding styles to `.admonition-header` and `.admonition-body` + in a custom css file and adding it to the build with, for example: + + ```julia + makedocs( + # ... + format=Documenter.HTML(; + #... + assets=["assets/custom.css"] + ) + ) + ``` + + [See here](https://github.com/JuliaDocs/Documenter.jl/blob/master/test/examples/src/assets/custom.css) + for an example `custom.css` file. But otherwise From 8015b1edb355a736f40b5c4630076dce464c4e8c Mon Sep 17 00:00:00 2001 From: Morten Piibeleht Date: Fri, 10 Apr 2020 10:50:07 +1200 Subject: [PATCH 2/2] Update test/examples/src/man/style.md --- test/examples/src/man/style.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/examples/src/man/style.md b/test/examples/src/man/style.md index 254bd410d5..d215087f25 100644 --- a/test/examples/src/man/style.md +++ b/test/examples/src/man/style.md @@ -38,8 +38,8 @@ Also, custom admonition classes can be used: ) ``` - [See here](https://github.com/JuliaDocs/Documenter.jl/blob/master/test/examples/src/assets/custom.css) - for an example `custom.css` file. + See [`test/examples/src/assets/custom.css`](https://github.com/JuliaDocs/Documenter.jl/blob/master/test/examples/src/assets/custom.css) + for an example of a custom CSS file. But otherwise