Modifying the Lavender Theme
-
Recently, I uploaded a preview of my forum migration process on facebook, received a couple of comments, one of which hits me the most..
This is the image preview I uploaded:

And the comments i received
- -> are we able to make each column/section a different color? coz to me it still looks like a wall of text separated into 3 columns of more text hahahahaha
Is it possible for me to customise the theme according to the comments? I kinda agree with the observation made. Can anybody guide me which file / area to change?
-
You can do this by adding a class to each category-item on home that includes the category id. Something like
<div class="col-lg-4 col-md-6 col-xs-12 category-item category-class-{categories.cid}" data-cid="1" data-numrecentreplies="2" ></div>Then in you css you can give different colors to different category boxes.
.category-class-1 { background-color:red; } -
You can do this by adding a class to each category-item on home that includes the category id. Something like
<div class="col-lg-4 col-md-6 col-xs-12 category-item category-class-{categories.cid}" data-cid="1" data-numrecentreplies="2" ></div>Then in you css you can give different colors to different category boxes.
.category-class-1 { background-color:red; }Hi @baris, thanks for your quick reply^^
Need you to hold my hands here,
- Where do I add the ?
<div class="col-lg-4 col-md-6 col-xs-12 category-item category-class-{categories.cid}" data-cid="1" data-numrecentreplies="2" ></div>- I assume adding the
.category-class-1 { background-color:red; }is inside NodeBB ACP -> Themes -> Customise -> Custom CSS ?
-
Yeah the css goes into custom css or your themes css.
The html is just for your home.tpl. That is from lavender's home.tpl.
-
Yeah the css goes into custom css or your themes css.
The html is just for your home.tpl. That is from lavender's home.tpl.
@baris
Managed to find the following line<div class="<!-- IF categories.class -->{categories.class}<!-- ELSE -->col-md-3 col-sm-6 col-xs-12<!-- ENDIF categories.class --> category-item" data-cid="{categories.cid}" data-numRecentReplies="{categories.numRecentReplies}">in
./node_modules/nodebb-theme-lavender/templates/home.tplSo I proceed to change it to
<div class="<!-- IF categories.class -->{categories.class}<!-- ELSE -->col-md-3 col-sm-6 col-xs-12<!-- ENDIF categories.class --> category-item category-class-{categories.cid}" data-cid="{categories.cid}" data-numRecentReplies="{categories.numRecentReplies}">?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
Arma3 Theme im doing for a friend 