Forum index template using as board template

Started by privacy123, February 19, 2023, 06:40:35 AM

Previous topic - Next topic

privacy123

Hello,

I am using SMF 2.1.3. Now I'm trying to edit the default template to fit my need.
First I edited some language strings. Then I cloned the template and figured out, that not every file is cloned but only all css-files, all image files but only modified language files and modified php files (in my case: index.template).

I would like to have the template from main index (gradient boxes)
You cannot view this attachment.
at board index too:
You cannot view this attachment.

During looking at page source and playing around with dev tools I figured out that I would either
- find the file which is creating
<div class="windowbg">and replace it with
<div class="up_contain">- or modify index.css in template file to apply styles from up_contain to windowbg too - which would, I am afraid, apply to private message index an some other pages unwanted too.

Which would be the be prefered solution for this?

Best regards.

Arantor

So the relevant line from .up_contain is:
background-image: linear-gradient(to bottom, #fff 0%, #f1f3f5 95%);
I don't think I'd slap that directly on .windowbg because .windowbg is used *everywhere*. But you could put it on #topic_container .windowbg:

#topic_container .windowbg {
    background-image: linear-gradient(to bottom, #fff 0%, #f1f3f5 95%);
}

I don't know off hand if you'd find posts waiting approval are a bit weird but sticky/locked at least will behave with this as this will override the background they'd normally get otherwise.
Holder of controversial views, all of which my own.


privacy123

Thanks Arantor,

this sounds like a suitable solution. I'll test this. Waiting approval is a feature I'm not using, sticky/locked is surely something I could apply this solution too.

Arantor

Well, what would you do with the sticky/locked topics? The solution I gave will apply it to those too without any extra work (replacing the background colours these have by default), but if you wanted something different that's doable too, depending on what you wanted to do - the gradient effect you wanted explicitly includes a *colour* so if you wanted to apply something for the others, you'd need to find colours for them too.
Holder of controversial views, all of which my own.


privacy123

Quote from: Arantor on February 19, 2023, 06:53:30 AMWell, what would you do with the sticky/locked topics? The solution I gave will apply it to those too without any extra work (replacing the background colours these have by default), but if you wanted something different that's doable too, depending on what you wanted to do - the gradient effect you wanted explicitly includes a *colour* so if you wanted to apply something for the others, you'd need to find colours for them too.

Which implies, that

#topic_container .windowbg.sticky {
background-image: linear-gradient(to bottom, #fff 0%, #cfdce8 95%);
}

solves the problem for sticky topics :) (tested)

Arantor

I know it does, I explicitly tested this before I put the code in. It covers all the permutations of sticky/locked, because #topic_container .windowbg has a higher precedence than either .windowbg.sticky or .windowbg.locked.
Holder of controversial views, all of which my own.


Advertisement: