Componente de lista de temas MD

Una presentación más ligera de la lista de temas para tu foro Discourse. La columna de publicadores ha sido eliminada, pero se ha agregado información (nombre y avatar del último publicador) en la columna de actividad y debajo del título del tema (nombre del creador del tema y un pequeño emoji para las etiquetas).


Compatibilidad

Este componente de tema es compatible con las funciones de etiquetas y enlaces destacados, así como con cualquier función disponible en la versión original de la lista de temas. Cualquier estilo de presentación de categoría (viñeta, barra, cuadro) debería funcionar con este componente.

El componente de tema se ha probado en varias paletas de colores; funcionará con temas claros, neutros u oscuros.

Lamentablemente, es posible que el componente de tema no funcione con plugins que ya modifican la presentación de la lista de temas, como las Vistas previas de la lista de temas.

¡Háganmelo saber si tienen algún problema!

29 Me gusta

Love this component.
Is there any easy way to make the poster-info div exactly as in the screenshot?
I think this makes it more readable

Author name above :arrow_up:
Relative-date below :arrow_down:
image

2 Me gusta

It’s not a bad idea actually, I might use this by default :thinking:

But for now, you can edit the component, ib the header part, around line 60 to 69

Original

<div class='poster-avatar'>
<a href="{{topic.lastPostUr}}" data-user-card="{{topic.last_poster_username}}">{{avatar topic.lastPoster usernamePath="username" imageSize="medium"}}</a>
</div>
<div class='poster-info'>
<a href="{{topic.lastPostUrl}}">
{{format-date topic.bumpedAt format="tiny"}}
</a>
<br />
<span class='editor'><a href="/users/{{topic.last_poster_username}}" data-auto-route="true" data-user-card="{{topic.last_poster_username}}">{{topic.last_poster_username}}</a></span>
</div>

What you want to use

<div class='poster-avatar'>
<a href="{{topic.lastPostUr}}" data-user-card="{{topic.last_poster_username}}">{{avatar topic.lastPoster usernamePath="username" imageSize="medium"}}</a>
</div>
<div class='poster-info'>
<span class='editor'><a href="/users/{{topic.last_poster_username}}" data-auto-route="true" data-user-card="{{topic.last_poster_username}}">{{topic.last_poster_username}}</a></span>
<br />
<a href="{{topic.lastPostUrl}}">
{{format-date topic.bumpedAt format="tiny"}}
</a>
</div>

You’ll need to edit this after each update but the component will not be upgraded that much.

You could also fork the repository, edit the file and use this version on your forum, if you’re familiar with github

5 Me gusta

I tried this change on my forum and I think it’s a good idea, I pushed an upgrade

If you prefer what we previously used, let me know, I can make an alternate version

6 Me gusta

@Steven did it stoped working with the last update? Its broke here.

1 me gusta

I didn’t notice yet, I usually do my upgrades on the weekend, I’ll check this tonight

I upgraded a forum and checked the logs, no issue for me.

Can you share a screenshot of the issue on your forum ? If I remember correctly you use a heavily customized theme, I think it might come from it. But I’ll see what I can do

3 Me gusta

I don’t use this theme anymore.

I tested in Material Design without CSS customizations, can’t make it work in any theme. Maybe it’s a plugin?

If you have Discourse topic previews for example the component will not work because it also uses change the topic-list-item.raw template

1 me gusta

You’re right about it. But I only use it for News Plugin 📰, that requires the Topic Preview.

So I have to choose between then. :sleepy:

Looks awesome on my forum and the little tag emoji is nice haha, awesome work!

2 Me gusta

Yo también lo estoy usando en mi instancia. Se ve mucho más limpio. Nunca entendí el concepto de los 5 avatares, se ve muy desordenado.

1 me gusta

Acabo de actualizar a la versión más reciente de Discourse (2.5.0.beta2) y parece que los avatares de los usuarios en las publicaciones han desaparecido.

Enlace al foro: https://techscammersunited.com/

1 me gusta

Lo revisaré mañana. Lo actualicé hace unos días y funcionaba bien; quizás algo haya cambiado.

3 Me gusta

Gracias por el informe, ya está solucionado. Puedes actualizar el componente y volver a activarlo.

3 Me gusta

¡Ah, gracias por la solución rápida, amigo! Ahora funciona a la perfección :slight_smile:

He actualizado a la versión más reciente y mis avatares han desaparecido (2.4.1).
He tenido que desactivar este componente por ahora.

También necesitas actualizar Discourse y se solucionará.

2 Me gusta

Por desgracia para mí, eso significa muchas actualizaciones (18 plugins personalizados), así que suelo actualizar cada 3 o 4 meses. Supongo que no tengo suerte :smiley:

¿Hay alguna forma de acceder a la versión anterior?