Switch to "Hugo Relearn" theme
Implements #1462
This is now ready for review.
Note: this is not a 1:1 restoration of how the docs previously looked. I deliberately only adjusted a few things from the new default theme of the new Hugo Theme, so that we can simply rely on the state of the original Theme more again.
Btw. if you are checking this out in a local repository that you had already cloned previously: switching the Git submodule is a little finicky. Something like this should work:
git fetch --all
git checkout --track origin/hugo-theme-relearn
git submodule sync
git submodule update
git submodule foreach git pull origin master
Though this leaves the content of the original submodule present and it will be marked as an uncommitted change.
We could improve on --INTERNAL-MAIN-BG-color as that one overwrites the normal body color - without it, it would be the same color as it is right now... but that can be fixed in a follow-up-pr imo
Do you mean the background color of the dark mode?
the code blocks (diamond background pattern with the border)
What diamond background pattern do you mean?
We could improve on --INTERNAL-MAIN-BG-color as that one overwrites the normal body color - without it, it would be the same color as it is right now... but that can be fixed in a follow-up-pr imo
Do you mean the background color of the dark mode?
Of the content in darkmode, yes. The color seems off
the code blocks (diamond background pattern with the border)
What diamond background pattern do you mean?
The second border of the code block in the old docs to make it more visible
Of the content in darkmode, yes. The color seems off
Ah yes, that is something that I actually wanted to port over from the old theme as well.
The second border of the code block in the old docs to make it more visible
Yes, but that was just the style of the original Hugo Learn theme. It was not an addition done by ourselves. I would rather keep the style of the Hugo Relearn theme. Hugo Relearn also uses Hugo's native code highlighting and not Highlight.js anymore. This is why there is now also a compeletely new color scheme for the code - I chose onedark as this one is close-ish to the atome-one-dark we had previously. I don't like the default Monokai theme.
Of the content in darkmode, yes. The color seems off
Ah yes, that is something that I actually wanted to port over from the old theme as well.
Done in 188c033
<meta name="viewport" content="width=device-width,initial-scale=1"> is missing
Does it really need this information (name and chage date): Leo Feyer 10.02.2025
On the following page it has code-tags (e.g. 4.13) in the title and in the navigation.
https://docs.contao.org/manual/de/migration/
.TableOfContents code {
background-color: transparent;
border: none;
font-size: inherit;
padding: 0;
}
#R-topbar a:hover :is(code) {
text-decoration: none;
}
h2 code {
font-size: inherit;
}
Does it really need this information (name and chage date):
Leo Feyer 10.02.2025
It's just there by default in the new Theme, but we can remove it.
Border color is missing. https://docs.contao.org/manual/de/layout/modulverwaltung/benutzermodule/
@media screen and (prefers-color-scheme: dark) {
&:root {
…
--BLOCK-QUOTE-BORDER-color: #41454d;
…
}
}
Display issue after "CSS des Newsletters". https://docs.contao.org/manual/de/core-erweiterung/newsletter/newsletter-verwaltung/
Mermaid is not working, for exampe the illustration on this site. https://docs.contao.org/dev/getting-started/initial-setup/managed-edition/
<meta name="viewport" content="width=device-width,initial-scale=1">is missing
Fixed in 84b05b15
Does it really need this information (name and chage date):
Leo Feyer 10.02.2025It's just there by default in the new Theme, but we can remove it.
Done in de3b21d5
On the following page it has
code-tags (e.g. 4.13) in the title and in the navigation.
The code tags are normal - but in the new theme their font-sizes are not relative anymore. I have adjusted this in b61d1481
Border color is missing. https://docs.contao.org/manual/de/layout/modulverwaltung/benutzermodule/
I was unaware we have full HTML code in the docs. I think we should replace that with screenshots instead 🤔 The old theme had some basic form styling - but the new one does not. Anyways, I have adjusted the bare minimum in a9a9fc73
Display issue after "CSS des Newsletters". https://docs.contao.org/manual/de/core-erweiterung/newsletter/newsletter-verwaltung/
Fixed in 7d548816 and 9bb1e32
Mermaid is not working, for exampe the illustration on this site. https://docs.contao.org/dev/getting-started/initial-setup/managed-edition/
Fixed in cdcc3088