Resaltar mejor los temas fijados

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 Me gusta

You can certainly apply whatever CSS you like to make that so via admin, customize.

3 Me gusta

Ah ok, i’ll have to do some homework then on CSS because it’s not my strength.

Thanks for the direction :slight_smile:

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 Me gusta

¿Cuál sería la forma de lograr lo mismo para los temas fijados visibles en la vista de Categoría (configurada como Categoría y Más recientes)?

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 Me gusta

Gracias @dax, es una buena solución, aunque tenemos una rotación bastante rápida de temas fijados, lo que lo hace un poco menos conveniente.

Hola, lo intenté pero parece que algo está mal. Este es el resultado que obtengo…

¿Alguna idea de por qué el título del hilo está siendo ocultado?

Es porque añadimos mucho relleno a los títulos para darles un área de clic grande. Puedes ajustarlo un poco para evitar el solapamiento con

.topic-list .main-link a.title {
    padding: 6px 0;
}
6 Me gusta

Hola Kris. Intenté agregar ese código y no pareció hacer ninguna diferencia…

¿Quizás me estoy perdiendo algo? También intenté cambiar los números, pero eso tampoco pareció hacer nada.

Sería útil un enlace a tu sitio y a ese tema en particular.

1 me gusta

Aquí está el hilo en cuestión…

Prueba con:


.latest-topic-list-item .main-link a.title {
    padding: 6px 0;
}

4 Me gusta

@dax eso parece haber funcionado, al menos en la vista de categorías para escritorio. En la vista de categorías en móvil, todavía está ocurriendo…

Además, ¿hay alguna forma de que funcione en la vista más reciente? Hasta ahora solo está funcionando en la vista de categorías.

Prueba con

.mobile-view .topic-list .main-link a.title {
    padding: 3px 0;
}

¿Has leído esto?

También necesitas agregar

[data-topic-id="9582"] {
    background: #fffff0;
}
1 me gusta

Sí, pero no me gustó especialmente que se resaltara todo el hilo, incluyendo todos los mensajes. Intentaba solo que el título del tema estuviera resaltado bajo la categoría y la última vista, pero no el hilo en sí. Si no hay otra forma, lo haré así.

Por cierto, ese código móvil parece haber solucionado el problema allí.