NameX

Started by Diego Andrés, August 05, 2022, 11:39:45 PM

Previous topic - Next topic

@rjen

That is because we have now implemented a separate css file that holds all colors for TP in css variants: tp-colors.css

Copy that css from default to you theme folder

Then locate the shoutbox background variables and update them as you please in the new css.
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

jsx

Hi @@rjen

Quote from: @rjen on January 30, 2024, 12:26:17 AMCopy that css from default to you theme folder

Should I copy the tp-colors.css file to Themes/NameX/css/custom?

And as I understand it, in app.css from NameX this code should remain? Should I remove it?

.tp_shoutbody_layout2:nth-of-type(2n + 1), .tp_shoutbody_layout3:nth-of-type(2n + 1) {
background: var(--tp_shout-bgodd) !important;
}
.tp_shoutbody_layout2:nth-of-type(2n), .tp_shoutbody_layout3:nth-of-type(2n) {
background: var(--tp_shout-bgeven) !important;
}
.tp_shoutbody_layout2 > span, .tp_shoutbody_layout3 > span {
color: var(--tp_shout-textcolor) !important;
}

Should this code also remain in the theme_colors.css file from NameX?

--tp_shout-bgodd: hsl(var(--windowbg-bg), 25%, 15%);
    --tp_shout-bgeven: var(--body-bg);
    --tp_shout-textcolor: var(--body-txt-color);

@rjen

The idea is to make it easier to adapt the colors in other themes, but since you already changed you theme css you will have to undo thos changes again...

The proceed for a new theme would be:
1) make a copy of tp-colors.css into the new theme css folder

2) In that copy you should make the changes you desire (effectively those are the changes you made to the app.css and the theme_colors.css before)

Since you already made changes to the theme...
3) You can then undo your changes to app.css and theme_colors.css
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

jsx

Ok, but I don't know why the shoutbox background doesn't change to dark when I switch the theme to dark mode.

I added these codes to tp-colors.css

--tp_shout-bgodd: hsl(var(--windowbg-bg), 25%, 15%);
--tp_shout-bgeven: var(--body-bg);
--tp_shout-textcolor: var(--body-txt-color);

@rjen

Quote from: jsx on February 18, 2024, 01:34:27 PMOk, but I don't know why the shoutbox background doesn't change to dark when I switch the theme to dark mode.


neither do I... and I have to time to look into that now
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Diego Andrés

1.3.2 - 19 February 2024
  • Bug Fix Fixed issues with dark mode or color variants when forum is closed to guests or in maintenance.
     Full Changelog: v1.3.1...v1.3.2

SMF Tricks - Free & Premium Responsive Themes for SMF.

jsx

Quote from: @rjen on February 18, 2024, 01:59:37 PM
Quote from: jsx on February 18, 2024, 01:34:27 PMOk, but I don't know why the shoutbox background doesn't change to dark when I switch the theme to dark mode.


neither do I... and I have to time to look into that now

Ok, I'm waiting for news.

@rjen

May take a week or two. On holiday..

You better try to fix it yourself.
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

jsx

I will wait.

Hi @Diego Andrés do you have any idea?

Diego Andrés

I'm not really following that discussion too much.
From a quick glance it seems you might be missing to add the variable you want to replace inside the dark.css or target it with the correct attribute like Bugo pointed out in a different post but about variants.

SMF Tricks - Free & Premium Responsive Themes for SMF.

FredK

Great theme, just what I was looking for (this or Repulse but I presume the answer will be the same). I need to change the colour scheme (mainly the background and bars) to resemble an outdated phpBB3 forum. Could you please give me a pointer where I need to make the changes? Unfortunately my knowledge is near zero here. It would be much appreciated.

Diego Andrés

You can edit css/custom/theme_colors.css to modify colors. Use the browser inspector tool to locate the specific things you need/want to change.

For example, you can change this variable value to modify the background color:
--body-bg: hsl(var(--primary-color-hue), 40%, 85%);
However, both NameX and Repulse have implications with the variants if you are using them, meaning that the hue would remain as the only change across colors, so you'd need to adjust only the lightness and saturation of the color (if you want to keep using both hsl and variants).
If you don't want to use variants, feel free to replace the entire color with whatever you want, like:
--body-bg: red;
Another (and the best way to do it), is to create a css/custom/custom_edits.css file and overwrite the CSS or variables in there, but this is not required if you don't feel comfortable with all of that stuff.

SMF Tricks - Free & Premium Responsive Themes for SMF.

@rjen

Quote from: jsx on February 18, 2024, 01:34:27 PMOk, but I don't know why the shoutbox background doesn't change to dark when I switch the theme to dark mode.

I added these codes to tp-colors.css

    --tp_shout-bgodd: hsl(var(--windowbg-bg), 25%, 15%);
    --tp_shout-bgeven: var(--body-bg);
    --tp_shout-textcolor: var(--body-txt-color);

well, I just did the following

1. Downloaded tp-colors.css from the default theme
2. Added these lines at the bottom of the file

    --tp_shout-bgodd: hsl(var(--windowbg-bg), 25%, 15%);
    --tp_shout-bgeven: var(--body-bg);
    --tp_shout-textcolor: var(--body-txt-color);

3. Uploaded the file into the css folder for the theme: /Themes/NameX_v1.3.2/css

And it works in Dark and in Light mode.

Make sure to blank out these settings..
You cannot view this attachment.
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

nuvar

I think in the mobile version, clicking on the "more" button above each post does not work at all

Diego Andrés

I don't recall a 'more' button, which one are you referring to?

SMF Tricks - Free & Premium Responsive Themes for SMF.

Arantor

Presumably the one next to quotes, that also has things like report to moderator in it.

Diego Andrés

Oh, then likely something else broke it on his forum, it should certainly work as it's pretty much the default behavior from the curve2 theme.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Advertisement: