From 2922e1a267482a7717bafa33dc6ac9dc321d6b37 Mon Sep 17 00:00:00 2001
From: douden <49307154+douden@users.noreply.github.com>
Date: Sat, 11 Jan 2025 23:03:30 +0100
Subject: [PATCH 1/7] change .gitmodules
---
.gitmodules | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/.gitmodules b/.gitmodules
index 9108e02..3d765c1 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -45,3 +45,7 @@
path = book/external/Sphinx-launch-buttons
url = https://github.com/TeachBooks/Sphinx-launch-buttons.git
branch = manual
+[submodule "book/external/Sphinx-Named-Colors"]
+ path = book/external/Sphinx-Named-Colors
+ url = https://github.com/TeachBooks/Sphinx-Named-Colors.git
+ branch = manual
\ No newline at end of file
From da3392afd9d5e66cc6874fdb35643a07a7af3699 Mon Sep 17 00:00:00 2001
From: douden <49307154+douden@users.noreply.github.com>
Date: Sat, 11 Jan 2025 23:20:31 +0100
Subject: [PATCH 2/7] Added alll stuff for Named Colors
---
.gitmodules | 2 +-
book/_config.yml | 3 +
book/_toc.yml | 2 +-
book/external/Sphinx-Named-Colors | 1 +
book/features/custom_colors.md | 170 ------------------------------
requirements.txt | 5 +-
6 files changed, 10 insertions(+), 173 deletions(-)
create mode 160000 book/external/Sphinx-Named-Colors
delete mode 100644 book/features/custom_colors.md
diff --git a/.gitmodules b/.gitmodules
index 3d765c1..5d6b1fe 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -48,4 +48,4 @@
[submodule "book/external/Sphinx-Named-Colors"]
path = book/external/Sphinx-Named-Colors
url = https://github.com/TeachBooks/Sphinx-Named-Colors.git
- branch = manual
\ No newline at end of file
+ branch = manual
diff --git a/book/_config.yml b/book/_config.yml
index e1f3110..bcd5678 100644
--- a/book/_config.yml
+++ b/book/_config.yml
@@ -19,6 +19,8 @@ sphinx:
- teachbooks_sphinx_grasple
- sphinx_image_inverter
- sphinx_exercise
+ - sphinx_proof
+ - sphinx_named_colors
config:
html_js_files:
- https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js
@@ -47,6 +49,7 @@ sphinx:
tex:
macros:
"newcolor": ['\definecolor{newcolor}{RGB}{111, 29, 119}{\color{newcolor}#1}',1]
+ named_colors_custom_colors: {'onlylight':[165,21,160],'lightanddark':[45,180,117,204,158,110]}
local_extensions:
apastyle: _ext/
bracket_citation_style: _ext/
diff --git a/book/_toc.yml b/book/_toc.yml
index fe6582c..89eb15e 100644
--- a/book/_toc.yml
+++ b/book/_toc.yml
@@ -79,7 +79,7 @@ parts:
- file: external/Sphinx-TUDelft-theme/README.md
- file: external/teachbooks-sphinx-tippy/README.md
- file: features/apa
- - file: features/custom_colors.md
+ - file: external/Sphinx-Named-Colors/README.md
- file: features/students
sections:
- file: external/annotater/README.md
diff --git a/book/external/Sphinx-Named-Colors b/book/external/Sphinx-Named-Colors
new file mode 160000
index 0000000..fda4027
--- /dev/null
+++ b/book/external/Sphinx-Named-Colors
@@ -0,0 +1 @@
+Subproject commit fda40274420c46a05cee1de839ee4726a3816aed
diff --git a/book/features/custom_colors.md b/book/features/custom_colors.md
deleted file mode 100644
index c5ddb7d..0000000
--- a/book/features/custom_colors.md
+++ /dev/null
@@ -1,170 +0,0 @@
-# Custom colors
-
-```{admonition} User types
-:class: tip
-This page is useful for user type 4 and 5.
-```
-
-Within these online books sometimes extra/new colors are wished for. In this page is shown how this can be achieved.
-
-## Using `definecolor`
-
-::::{warning}
-This method only works for $\LaTeX$ colors.
-::::
-
-::::{warning}
-In this case the color remains the same in ligt and dark mode.
-::::
-
-### Code in `_config.yml`
-
-```yaml
-sphinx:
- config:
- mathjax3_config:
- tex:
- macros:
- "newcolor": ['\definecolor{newcolor}{RGB}{111, 29, 119}{\color{newcolor}#1}',1]
-```
-
-### Code in content
-
-```latex
-:::{math}
-\newcolor{\LaTeX}
-:::
-```
-
-### Result
-
-:::{math}
-\newcolor{\LaTeX}
-:::
-
-## Using CSS
-
-In this case one has three options:
-
-1. Light and dark mode the same color
-1. Light and dark mode different colors using two color definitions
-1. Light and dark mode different colors using a color filter
-
-### Light and dark mode the same color
-
-::::{note}
-This method has the benefit that the custom color can be used also within html and css elements.
-::::
-
-#### Code in `_static/color.css`
-
-```css
-:root {
- --newcolor: rgb(111, 29, 119);
-}
-
-.newcolor {color: var(--newcolor);}
-```
-
-#### Code in content
-
-```latex
-:::{math}
-\class{newcolor}{\LaTeX}
-:::
-```
-
-```html
-
HTML text
-```
-
-#### Result
-
-:::{math}
-\class{newcolor-same}{\LaTeX}
-:::
-
-HTML text
-
-### Light and dark mode different colors using two color definitions
-
-::::{note}
-This method has the benefit that the custom colors can be used also within html and css elements with automatic changes when the mode changes from Light to dark or vice versa.
-::::
-
-
-#### Code in `_static/color.css`
-
-```css
-:root {
- --newcolor: rgb(111, 29, 119);
-}
-
-html[data-theme="dark"] {
- --newcolor: rgb(255, 167, 255)
-}
-
-.newcolor {color: var(--newcolor);}
-```
-
-#### Code in content
-
-```latex
-:::{math}
-\class{newcolor}{\LaTeX}
-:::
-```
-
-```html
-HTML text
-```
-
-#### Result
-
-:::{math}
-\class{newcolor}{\LaTeX}
-:::
-
-HTML text
-
-(filter)=
-### Light and dark mode different colors using a color filter
-
-::::{warning}
-This method has the drawback that the custom colors can only be used as a class.
-::::
-
-#### Code in `_static/color.css`
-
-```css
-:root {
- --newcolor: rgb(111, 29, 119);
-}
-
-.newcolor {color: var(--newcolor);}
-
-html[data-theme="dark"] .newcolor {
- filter: invert(1) hue-rotate(180deg) saturate(1.5);
-}
-
-```
-
-#### Code in content
-
-```latex
-:::{math}
-\class{newcolor}{\LaTeX}
-:::
-```
-
-```html
-HTML text
-```
-
-#### Result
-
-:::{math}
-\class{newcolor-filter}{\LaTeX}
-:::
-
-HTML text
diff --git a/requirements.txt b/requirements.txt
index ff54450..ebf15b1 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -12,4 +12,7 @@ sphinx-image-inverter
sphinx-thebe ~= 0.9.9
docutils==0.17.1
-sphinx-exercise
\ No newline at end of file
+sphinx-exercise
+
+sphinx-proof
+git+https://github.com/TeachBooks/Sphinx-Named-Colors.git
\ No newline at end of file
From 272c6f1392ab568bb5bbbe3878a34a813e9364e3 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 14 Jan 2025 07:13:17 +0000
Subject: [PATCH 3/7] Bump book/external/Sphinx-Named-Colors from `fda4027` to
`0f1231c`
Bumps [book/external/Sphinx-Named-Colors](https://github.com/TeachBooks/Sphinx-Named-Colors) from `fda4027` to `0f1231c`.
- [Commits](https://github.com/TeachBooks/Sphinx-Named-Colors/compare/fda40274420c46a05cee1de839ee4726a3816aed...0f1231c38451ca29c5e9509bb8c3098a2865ceb3)
---
updated-dependencies:
- dependency-name: book/external/Sphinx-Named-Colors
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
---
book/external/Sphinx-Named-Colors | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/book/external/Sphinx-Named-Colors b/book/external/Sphinx-Named-Colors
index fda4027..0f1231c 160000
--- a/book/external/Sphinx-Named-Colors
+++ b/book/external/Sphinx-Named-Colors
@@ -1 +1 @@
-Subproject commit fda40274420c46a05cee1de839ee4726a3816aed
+Subproject commit 0f1231c38451ca29c5e9509bb8c3098a2865ceb3
From a65d33b53ad8640a4b08185bd84dca1b805eac0a Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 14 Jan 2025 07:13:19 +0000
Subject: [PATCH 4/7] Bump book/external/Sphinx-Image-Inverter from `6789ae2`
to `20d8d6d`
Bumps [book/external/Sphinx-Image-Inverter](https://github.com/TeachBooks/Sphinx-Image-Inverter) from `6789ae2` to `20d8d6d`.
- [Release notes](https://github.com/TeachBooks/Sphinx-Image-Inverter/releases)
- [Commits](https://github.com/TeachBooks/Sphinx-Image-Inverter/compare/6789ae2128e183874f758b05b897580aba587689...20d8d6d1280edbb2e6df9639fe66c28b58d2e63c)
---
updated-dependencies:
- dependency-name: book/external/Sphinx-Image-Inverter
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
---
book/external/Sphinx-Image-Inverter | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/book/external/Sphinx-Image-Inverter b/book/external/Sphinx-Image-Inverter
index 6789ae2..20d8d6d 160000
--- a/book/external/Sphinx-Image-Inverter
+++ b/book/external/Sphinx-Image-Inverter
@@ -1 +1 @@
-Subproject commit 6789ae2128e183874f758b05b897580aba587689
+Subproject commit 20d8d6d1280edbb2e6df9639fe66c28b58d2e63c
From 213af064fd590c31292b8a229952f952658b0b8a Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 14 Jan 2025 07:13:21 +0000
Subject: [PATCH 5/7] Bump book/external/template from `1ea38ab` to `536a00b`
Bumps [book/external/template](https://github.com/TeachBooks/template) from `1ea38ab` to `536a00b`.
- [Commits](https://github.com/TeachBooks/template/compare/1ea38abf8b30e9076fe315d258655ecf679e4bf2...536a00b2e9c96356a90ddd22fbfea20b42de735c)
---
updated-dependencies:
- dependency-name: book/external/template
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
---
book/external/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/book/external/template b/book/external/template
index 1ea38ab..536a00b 160000
--- a/book/external/template
+++ b/book/external/template
@@ -1 +1 @@
-Subproject commit 1ea38abf8b30e9076fe315d258655ecf679e4bf2
+Subproject commit 536a00b2e9c96356a90ddd22fbfea20b42de735c
From 958bc0bb291ee0ab84e431feacc0d118a4cf6a7f Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 14 Jan 2025 09:33:13 +0000
Subject: [PATCH 6/7] Bump book/external/Sphinx-Named-Colors from `0f1231c` to
`8e47df5`
Bumps [book/external/Sphinx-Named-Colors](https://github.com/TeachBooks/Sphinx-Named-Colors) from `0f1231c` to `8e47df5`.
- [Commits](https://github.com/TeachBooks/Sphinx-Named-Colors/compare/0f1231c38451ca29c5e9509bb8c3098a2865ceb3...8e47df55cc6258a951716fad1bb58e2e70e8a168)
---
updated-dependencies:
- dependency-name: book/external/Sphinx-Named-Colors
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
---
book/external/Sphinx-Named-Colors | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/book/external/Sphinx-Named-Colors b/book/external/Sphinx-Named-Colors
index 0f1231c..8e47df5 160000
--- a/book/external/Sphinx-Named-Colors
+++ b/book/external/Sphinx-Named-Colors
@@ -1 +1 @@
-Subproject commit 0f1231c38451ca29c5e9509bb8c3098a2865ceb3
+Subproject commit 8e47df55cc6258a951716fad1bb58e2e70e8a168
From 6d5ae1b73178ce2e7e52f8af1b3c19cc95c55e49 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 14 Jan 2025 09:42:11 +0000
Subject: [PATCH 7/7] Bump book/external/Sphinx-Named-Colors from `8e47df5` to
`730c036`
Bumps [book/external/Sphinx-Named-Colors](https://github.com/TeachBooks/Sphinx-Named-Colors) from `8e47df5` to `730c036`.
- [Commits](https://github.com/TeachBooks/Sphinx-Named-Colors/compare/8e47df55cc6258a951716fad1bb58e2e70e8a168...730c036c4842de4a7bdae52d40ee106ac72bc8c7)
---
updated-dependencies:
- dependency-name: book/external/Sphinx-Named-Colors
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
---
book/external/Sphinx-Named-Colors | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/book/external/Sphinx-Named-Colors b/book/external/Sphinx-Named-Colors
index 8e47df5..730c036 160000
--- a/book/external/Sphinx-Named-Colors
+++ b/book/external/Sphinx-Named-Colors
@@ -1 +1 @@
-Subproject commit 8e47df55cc6258a951716fad1bb58e2e70e8a168
+Subproject commit 730c036c4842de4a7bdae52d40ee106ac72bc8c7