docs icon indicating copy to clipboard operation
docs copied to clipboard

Switch to "Hugo Relearn" theme

Open fritzmg opened this issue 11 months ago • 19 comments

Implements #1462

fritzmg avatar Jan 19 '25 13:01 fritzmg

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.

fritzmg avatar Feb 01 '25 15:02 fritzmg

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.

fritzmg avatar Feb 01 '25 16:02 fritzmg

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?

fritzmg avatar Feb 02 '25 10:02 fritzmg

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

zoglo avatar Feb 02 '25 11:02 zoglo

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.

fritzmg avatar Feb 02 '25 11:02 fritzmg

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

fritzmg avatar Feb 03 '25 16:02 fritzmg

<meta name="viewport" content="width=device-width,initial-scale=1"> is missing

netzarbeiter avatar Feb 12 '25 12:02 netzarbeiter

Does it really need this information (name and chage date): Leo Feyer 10.02.2025

netzarbeiter avatar Feb 12 '25 13:02 netzarbeiter

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;
}

netzarbeiter avatar Feb 12 '25 13:02 netzarbeiter

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.

fritzmg avatar Feb 12 '25 13:02 fritzmg

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;
   …
  }
}

netzarbeiter avatar Feb 12 '25 14:02 netzarbeiter

Display issue after "CSS des Newsletters". https://docs.contao.org/manual/de/core-erweiterung/newsletter/newsletter-verwaltung/

netzarbeiter avatar Feb 12 '25 14:02 netzarbeiter

Mermaid is not working, for exampe the illustration on this site. https://docs.contao.org/dev/getting-started/initial-setup/managed-edition/

netzarbeiter avatar Feb 12 '25 15:02 netzarbeiter

<meta name="viewport" content="width=device-width,initial-scale=1"> is missing

Fixed in 84b05b15

fritzmg avatar Feb 18 '25 17:02 fritzmg

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.

Done in de3b21d5

fritzmg avatar Feb 18 '25 17:02 fritzmg

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

fritzmg avatar Feb 18 '25 17:02 fritzmg

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

fritzmg avatar Feb 18 '25 17:02 fritzmg

Display issue after "CSS des Newsletters". https://docs.contao.org/manual/de/core-erweiterung/newsletter/newsletter-verwaltung/

Fixed in 7d548816 and 9bb1e32

fritzmg avatar Feb 18 '25 17:02 fritzmg

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

fritzmg avatar Feb 18 '25 22:02 fritzmg