News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

NameX

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

Previous topic - Next topic

Diego Andrés

Quote from: user58389239 on May 11, 2023, 06:14:37 PMOne question as I'm getting into it...what is the purpose/value of this checkbox?
Use JavaScript to change the color:
This will change the variant of the theme using JavaScript and auto-update for the profile.


I am not sure why one would check it.

The variants are integrated into the theme using the SMF in-built variants system.
Enabling the use of javascript for changing the color, will allow the users to change color without leaving the page and it will still save the changes to their profile.

SMF Tricks - Free & Premium Responsive Themes for SMF.

mcmuroni

Hi Diego!

It's really a great theme you made there. But for somehow I have this problem with my custom logo. I entered the logo path and verything works fine on the index and admin sites. But when I click on any threat in any board the logo is replaced with the alternate text. I checked the path with the developer tool from crome. The path is correct.
I tried these in a test enviroment I recently have made a large upgrade vom 2.019 to 2.1.3 so I'am still testing.
Do you have any hints for me.

Diego Andrés

Could you leave the link to your site and/or some screenshots of this issue?

SMF Tricks - Free & Premium Responsive Themes for SMF.

mcmuroni

It looks like this.
The logo disappear when I go from the index to any board.

user58389239

mcmuroni, what URL are you using for your logo image?

DeadMan...

If your site is using https then you have to make sure the url path for the image is also https.
I tell it how I see it... Don't like it? Hit Alt+F4!

mcmuroni

Oh man I'm such an idiot! Sometimes by trying to solve a problem the thinking goses complicated. It wasn't the https but your sugesstions pushed me in the right direction. Problem solved. thanks a lot.

user58389239

Hi,
I'd like to add my own color variant, or change one of the existing color variants to my own. Can you please provide instructions to do this? I tried adding it or changing it on variants.css but It doesn't show up in the color picker tab.

Diego Andrés

If you are already adding the color in the variants css, all you are missing is to add the variant in NameX/themecustoms/Init.php

public static function variants(array &$variants) : void
{
$variants = [
'red',
'green',
'blue',
'yellow',
'purple',
'pink',
];
}

Also you might want to add the text string in: NameX/languages/ThemeCustoms/main.english.php
Something like this: $txt['variant_color'] = 'Color';

SMF Tricks - Free & Premium Responsive Themes for SMF.

user58389239

Diego,

Amazing, that did the trick, thank you!

One other question...can you tell me how I could override the background color on this "Stats" section? It's using the header background color, I would like it to be its own:


Diego Andrés

In css/custom/app.css
#info_center_blocks #block-forum_stats div span.totals
Change the variable in here:
background: var(--header-bg);
Although, the theme could get updated in the future, so I recommend adding custom edits in a new file (it will be autoloaded), in NameX/css/custom/custom_edits.css.
I suppose windowbg might do the trick for you?

#info_center_blocks #block-forum_stats div span.totals {
    background: var(--windowbg-bg);
}

SMF Tricks - Free & Premium Responsive Themes for SMF.

user58389239

Diego, you are amazing! Thank you so much for your incredibly fast support. That did the trick.

Thanks also for your tip about putting custom edits in a new file. I haven't been doing that but I will move them there.

user58389239

#172
Two more questions for you, if you don't mind:
1. If I've made changes to theme_colors.css should I try and move those to the custom_edits.css?
2. I'm trying to figure out how to change the color of sticky topics that are also locked. I see the setting for sticky topics, which doesn't seem to affect it if it's also locked. (In other words I want sticky color to take precedence over locked color)

Diego Andrés

1- Might or might not work. But do try and let me know  ;D.
2- I've posted about this somewhere... I'll look it up later, or re-do the code changes it during the weekend.

SMF Tricks - Free & Premium Responsive Themes for SMF.

user58389239

Found it in the comment history here, you are right. Here is the code that worked for me:

#topic_container .windowbg.sticky {
  background: CHANGE-THIS;
}

user58389239

How do I change the background color for the login button only? I see there is a CSS class li.button_login but I'm not sure how to change it in the custom_edits.css. I tried a couple things but it wasn't working right.

Diego Andrés

It would be this:

#top_info > li.button_login

SMF Tricks - Free & Premium Responsive Themes for SMF.

user58389239

Brilliant, thanks for the quick reply!

user58389239

Is the sceditor-popup controlled by the NameX theme or is that a default thing?

On our old theme, when you clicked "More" for more Smileys/Emojis, it would open a new window. In the new theme, it opens a modal, and confusingly the "Close" button isn't visible, so I'm not sure a user would know how to get out of it. (You have to scroll down in the modal to see the close button).

Can you tell me either 1) Can I make it a pop-up instead of a Modal and/or 2) Can I move the "Close" button to the top?

I've attached a couple screenshots to show what I'm referring to

Diego Andrés

It's the default behavior by SMF, comes from the default theme.
You're right that it seems wonky and busted... Might be worth reviewing it's current behavior again.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Advertisement: