Skip to content

Commit

Permalink
Merge pull request #5 from TeachBooks/main
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
douden authored Dec 24, 2024
2 parents 12ee718 + 47c1e7b commit 35ecbdd
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Upgrade Dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade sigstore cryptography
pip install --upgrade sigstore cryptography==43.0.3
- name: Sign the dists with Sigstore
uses: sigstore/[email protected]
with:
Expand Down
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ The default theme in JupyterBooks is usually not desired and need to be changed

This extension applies styling changes, being

- particular colours for:
- particular colours (different colors for light and dark themes) for:
- admonitions (e.g. hint, note, tip, error, etc.),
- proofs (e.g. theorem, axiom, lemma, corollary, etc.),
- exercises,
- buttons,
- badges,
- custom components.
- custom components,
- $\LaTeX$
- particular icons for:
- proofs (e.g. theorem, axiom, lemma, corollary, etc.),
- exercises,
Expand Down Expand Up @@ -70,6 +71,27 @@ sphinx:

By following the steps above, the theme will be applied automatically. To see the examples of usage visit the [TeachBooks manual](https://teachbooks.io/manual/intro.html).

To use the defined colors inside $\LaTeX$ rendered with MathJax, one should use the command
```
\class{<color>}{<math>}
```
where `<color>` is one of the following colors:

- red
- blue
- green
- raspberry
- yellow
- darkGreen
- orange
- cyan
- gray
- purple
- pink
- darkBlue

and `<math>` is the $\LaTeX$ that should be rendered in the color `<color>`.

If a Delft University of Technology logo should not be set (i.e. use logos defined by the user), include the following in your `_config.yml` file:
```
sphinx:
Expand Down
54 changes: 53 additions & 1 deletion src/sphinx_tudelft_theme/static/tudelft_style.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,45 @@
--darkBlue-min: #0C234010;
--darkBlue-mid: #0C234025;
}

html[data-theme="dark"] {
--raspberry: #ffa7f5;
--raspberry-min: #ffa7f503;
--raspberry-mid: #ffa7f520;
--yellow: #a43a00;
--yellow-min: #a43a0005;
--yellow-mid: #a43a0020;
--darkGreen: #00bd87;
--darkGreen-min: #00bd8710;
--darkGreen-mid: #00bd8725;
--blue: #09baff;
--blue-min: #09baff10;
--blue-mid: #09baff25;
--orange: #ff581f;
--orange-min: #ff581f10;
--orange-mid: #ff581f25;
--cyan: #00a7ef;
--cyan-min: #00a7ef10;
--cyan-mid: #00a7ef25;
--gray: #828282;
--gray-min: #82828205;
--gray-mid: #82828220;
--purple: #ffa7ff;
--purple-min: #ffa7ff05;
--purple-mid: #ffa7ff20;
--pink: #ff47ab;
--pink-min: #ff47ab10;
--pink-mid: #ff47ab25;
--red: #ff7161;
--red-min: #ff716110;
--red-mid: #ff716125;
--green: #008000;
--green-min: #00800010;
--green-mid: #00800025;
--darkBlue: #c1e3ff;
--darkBlue-min: #c1e3ff10;
--darkBlue-mid: #c1e3ff25;
}

/* BLOCK COMPONENTS (admonitions, proofs, exercises) */

Expand Down Expand Up @@ -545,4 +584,17 @@
color: #FFFFFF !important;
background-color: var(--black) !important;
border-color: var(--black) !important;
}
}

.red {color: var(--red);}
.blue {color: var(--blue);}
.green {color: var(--green);}
.raspberry {color: var(--raspberry);}
.yellow {color: var(--yellow);}
.darkGreen {color: var(--darkGreen);}
.orange {color: var(--orange);}
.cyan {color: var(--cyan);}
.gray {color: var(--gray);}
.purple {color: var(--purple);}
.pink {color: var(--pink);}
.darkBlue {color: var(--darkBlue);}

0 comments on commit 35ecbdd

Please sign in to comment.