-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Enable a minimal theme option for simpler admonition style (#106)
* MAINT: review of docs and minor maintenance * ENH: enable a minimal theme for admonition styles * update colour scheme * doc: add docs on new minimal theme option * docs: update docs with new minimal theme option * set docs to default value False for proof_minimal_theme
- Loading branch information
Showing
7 changed files
with
269 additions
and
1 deletion.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
install | ||
syntax | ||
options | ||
testing | ||
zreferences | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Options | ||
|
||
This package has the option to choose a more **minimal** color scheme. | ||
|
||
The aim is to create admonitions that are clearly different to the core text with | ||
colors that do not over emphasises the admonition such as | ||
|
||
```{figure} _static/img/definition-minimal.png | ||
``` | ||
|
||
compared to the current default | ||
|
||
```{figure} _static/img/definition.png | ||
``` | ||
|
||
To enable the `minimal` color scheme you can use the following. | ||
|
||
## Jupyter Book Project | ||
|
||
Add `proof_minimal_theme = True` to your `_config.yml` | ||
|
||
```yaml | ||
sphinx: | ||
config: | ||
proof_minimal_theme: true | ||
``` | ||
## Sphinx Project | ||
Add `proof_minimal_theme = True` to your `conf.py` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,222 @@ | ||
/********************************************* | ||
* Variables * | ||
*********************************************/ | ||
:root { | ||
--theorem-border-color: rgba(68,138,255,.1); | ||
--axiom-border-color: #ffc107; | ||
--criterion-border-color: #fd7e14; | ||
--lemma-border-color: #36cf03; | ||
--definition-border-color: #007bff; | ||
--remark-border-color: #79ff6f; | ||
--conjecture-border-color: #775f15; | ||
--corollary-border-color: #c500c1; | ||
--example-border-color: #f9377b; | ||
--property-border-color: #fdf914; | ||
--obseration-border-color: #7707ff; | ||
--proposition-border-color: #4f7aa8; | ||
--assumption-border-color: #07fffb; | ||
|
||
/* --note-title-color: rgba(68,138,255,.1); | ||
--note-border-color: #007bff; | ||
--warning-title-color: rgba(220,53,69,.1); | ||
--warning-border-color: #dc3545; | ||
--hint-title-color: rgba(255,193,7,.2); | ||
--hint-border-color: #ffc107; | ||
--caution-title-color: rgba(253,126,20,.1); | ||
--caution-border-color: #fd7e14; */ | ||
|
||
--grey-title-color: rgba(204,204,204,.2); | ||
--grey-border-color: #ccc; | ||
} | ||
|
||
/********************************************* | ||
* Main body * | ||
*********************************************/ | ||
|
||
/* Remove content box */ | ||
div.proof p.admonition-title::before { | ||
content: none; | ||
} | ||
|
||
/********************************************* | ||
* Proof * | ||
*********************************************/ | ||
div#proof{ | ||
padding: .4rem .6rem .4rem 2rem !important; | ||
border-color: var(--grey-border-color); | ||
background-color: none; | ||
} | ||
|
||
/********************************************* | ||
* Theorem * | ||
*********************************************/ | ||
div.theorem { | ||
border-color: var(--theorem-border-color); | ||
background-color: none; | ||
} | ||
|
||
div.theorem p.admonition-title { | ||
background-color: transparent; | ||
} | ||
|
||
/********************************************* | ||
* Axiom * | ||
*********************************************/ | ||
div.axiom { | ||
border-color: var(--axiom-border-color); | ||
background-color: none; | ||
} | ||
|
||
div.axiom p.admonition-title { | ||
background-color: transparent; | ||
} | ||
|
||
/********************************************* | ||
* Criterion * | ||
*********************************************/ | ||
div.criterion { | ||
border-color: var(--criterion-border-color); | ||
background-color: none; | ||
} | ||
|
||
div.criterion p.admonition-title { | ||
background-color: transparent; | ||
} | ||
|
||
/********************************************* | ||
* Lemma * | ||
*********************************************/ | ||
div.lemma { | ||
border-color: var(--lemma-border-color); | ||
background-color: none; | ||
} | ||
|
||
div.lemma p.admonition-title { | ||
background-color: transparent; | ||
} | ||
|
||
/********************************************* | ||
* Definition * | ||
*********************************************/ | ||
div.definition { | ||
border-color: var(--definition-border-color); | ||
background-color: none; | ||
} | ||
|
||
div.definition p.admonition-title { | ||
background-color: transparent; | ||
} | ||
|
||
/********************************************* | ||
* Remark * | ||
*********************************************/ | ||
div.remark { | ||
border-color: var(--remark-border-color); | ||
background-color: none; | ||
} | ||
|
||
div.remark p.admonition-title { | ||
background-color: transparent; | ||
} | ||
|
||
/********************************************* | ||
* Conjecture * | ||
*********************************************/ | ||
div.conjecture { | ||
border-color: var(--conjecture-border-color); | ||
background-color: none; | ||
} | ||
|
||
div.conjecture p.admonition-title { | ||
background-color: transparent; | ||
} | ||
|
||
/********************************************* | ||
* Corollary * | ||
*********************************************/ | ||
div.corollary { | ||
border-color: var(--corollary-border-color); | ||
background-color: none; | ||
} | ||
|
||
div.corollary p.admonition-title { | ||
background-color: transparent; | ||
} | ||
|
||
/********************************************* | ||
* Algorithm * | ||
*********************************************/ | ||
div.algorithm { | ||
border: none; | ||
background-color: none; | ||
} | ||
|
||
div.algorithm p.admonition-title { | ||
background-color: transparent; | ||
border-top: .15rem solid var(--grey-border-color); | ||
border-bottom: .15rem solid var(--grey-border-color); | ||
} | ||
|
||
div.algorithm div.section { | ||
font-family: SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace; | ||
font-size: .85rem; | ||
} | ||
|
||
/********************************************* | ||
* Example * | ||
*********************************************/ | ||
div.example { | ||
border-color: var(--example-border-color); | ||
background-color: none; | ||
} | ||
|
||
div.example p.admonition-title { | ||
background-color: transparent; | ||
} | ||
|
||
/********************************************* | ||
* Property * | ||
*********************************************/ | ||
div.property { | ||
border-color: var(--property-border-color); | ||
background-color: none; | ||
} | ||
|
||
div.property p.admonition-title { | ||
background-color: transparent; | ||
} | ||
|
||
/********************************************* | ||
* Observation * | ||
*********************************************/ | ||
div.observation { | ||
border-color: var(--observation-border-color); | ||
background-color: none; | ||
} | ||
|
||
div.observation p.admonition-title { | ||
background-color: transparent; | ||
} | ||
|
||
/********************************************* | ||
* Proposition * | ||
*********************************************/ | ||
div.proposition { | ||
border-color: var(--proposition-border-color); | ||
background-color: none; | ||
} | ||
|
||
div.proposition p.admonition-title { | ||
background-color: transparent; | ||
} | ||
/********************************************* | ||
* Assumption * | ||
*********************************************/ | ||
div.assumption { | ||
border-color: var(--assumption-border-color); | ||
background-color: none; | ||
} | ||
|
||
div.assumption p.admonition-title { | ||
background-color: transparent; | ||
} |