Json_Blob
(Jason Costanza)
20 בנובמבר, 2018, 2:14am
1
Hello
I run a discourse forum for my cycling team. And I find that pinned topics don’t really stand out much. I naturally find myself looking for some seperation or divider, bold titles on the threads, highlighting… something.
Currently aside from the little pin icon, they look exactly like standard topics which I find a little lack-luster.
Note the top two topics are pinned, but they’re listed just like everything else. I’d love to see simply a good, heavy divider between pinned topics and everything else but I’m open to other ideas. I just feel like right now they blend in to the mix and don’t call attention to themselves at all once they’re “read”.
Thoughts?
2 לייקים
You can certainly apply whatever CSS you like to make that so via admin, customize.
3 לייקים
Json_Blob
(Jason Costanza)
20 בנובמבר, 2018, 6:20am
3
Ah ok, i’ll have to do some homework then on CSS because it’s not my strength.
Thanks for the direction
dax
(Daniela)
20 בנובמבר, 2018, 10:27am
4
To highlight pinned topics on the latest page just add in your /admin/customize/themes
:
.topic-list-item.pinned {
background: #ffffc9;
}
You can of course customize with CSS the pinned topics as you prefer once you know the class to use
12 לייקים
loginerror
(Maciej Kuźmicz)
17 באפריל, 2019, 12:41pm
5
What would be the way to achieve the same for the pinned topics visible in the Category view (set to Category and Latest)?
dax
(Daniela)
17 באפריל, 2019, 2:15pm
6
There is no status class (.pinned
) in this case. To target a pinned topic you need to use the id
, eg
[data-topic-id="8"] {
background: #ffffc9;
}
The CSS above target the topic globally everywhere, on /latest
, on /categories
and on topic, see:
To target only the categories + latest page you need to add the appropriate class
.navigation-categories.categories-list [data-topic-id="8"] {
background: #ffffc9;
}
In this way the topic will be highlighted only on that page.
PS: to find the topic ID the simplest way is to open the dev console on your browser with F12:
6 לייקים
loginerror
(Maciej Kuźmicz)
17 באפריל, 2019, 2:26pm
7
Thanks @dax , it’s a nice solution, although we do have a rather quick rotation of pinned topics which makes it a bit less convenient.
Hi, I tried this but something seems to be wrong. This is the result I get…
Any idea why the thread title is being covered up?
It’s because we add a lot of padding to titles to give them a big click target. You can adjust this a little bit to avoid the overlap with
.topic-list .main-link a.title {
padding: 6px 0;
}
6 לייקים
Hi Kris. I did try to add that code in and it didn’t seem to do anything different…
Is there maybe something I am missing? I tried changing the numbers too, but that didn’t seem to do anything.
dax
(Daniela)
9 באוגוסט, 2019, 9:31am
11
A link to your site and to that particular topic would be useful.
לייק 1
Here is the thread in question…
Exchange Expansion Many of you in the community have been asking for a while now what we have been doing to get Peercoin listed on more exchanges. Lack of access to more exchanges with high trading volume has been one of Peercoin’s biggest problem...
Reading time: 2 mins 🕑
Likes: 14 ❤
dax
(Daniela)
12 באוגוסט, 2019, 10:40am
13
Try with:
.latest-topic-list-item .main-link a.title {
padding: 6px 0;
}
4 לייקים
@dax that seems to have worked, at least for desktop on categories view. On categories view on mobile it is still doing it…
Also, is there anyway to get it to work on latest view? So far it is just working on category view.
dax
(Daniela)
19 באוגוסט, 2019, 4:59pm
15
Try with
.mobile-view .topic-list .main-link a.title {
padding: 3px 0;
}
Have you read here?
There is no status class (.pinned) in this case. To target a pinned topic you need to use the id, eg
[data-topic-id="8"] {
background: #ffffc9;
}
The CSS above target the topic globally everywhere, on /latest, on /categories and on topic, see:
[image]
[image]
[image]
To target only the categories + latest page you need to add the appropriate class
.navigation-categories.categories-list [data-topic-id="8"] {
background: #ffffc9;
}
In this way the topic will be highlighted only on…
You need to add also
[data-topic-id="9582"] {
background: #fffff0;
}
לייק 1
Daniela:
Have you read here?
Yes, but I didn’t particularly like the entire thread being highlighted, including all the posts. I was trying to only make the topic title highlighted under category and latest view, but not the thread itself. If there is no other way then I will do that.
By the way, that mobile code seems to have fixed the problem there.