¿También existe la posibilidad de subir dos tipos de logotipos para las categorías y elegir el apropiado según el tema de Discourse seleccionado? Por ejemplo:
Tema claro: Logotipo negro
Tema oscuro: Logotipo blanco
¡Gracias!
1 me gusta
david
(David Taylor)
30 Marzo, 2022 08:29
2
No creo que tengamos nada similar integrado en este momento. Sin embargo, podría ser posible a través de un componente de tema.
He movido esta pregunta a su propio tema para que tenga más visibilidad. Quizás alguien más haya resuelto este problema en el pasado
1 me gusta
pmusaraj
(Penar Musaraj)
7 Octubre, 2022 15:29
3
Gracias a @jancernik , esto es ahora una característica en el núcleo. Al igual que el logotipo del sitio, ahora puedes subir logotipos oscuros para las categorías, y se usarán cuando estés en modo oscuro.
main ← jancernik:dark-mode-for-categories-logos
opened 07:03PM - 03 Oct 22 UTC
@pmusaraj suggested I open this draft because while working on this feature, I r… an into a problem I need help with.
As far as I know, the feature "works", and the icons change depending on the theme as expected.
The problem I have is the `style="--aspect-ratio"` attribute applied to the parent div of the logo.
This attribute was originally defined inside `cdn-img`, but since I had to use that component inside a picture tag, I had to move it to `category-logo`. It is also applied through the following code inside `category-logo.js` (this is the part I don't fully understand):
```javascript
@discourseComputed("width", "height")
style(width, height) {
if (width && height) {
return htmlSafe(`--aspect-ratio: ${width / height};`);
}
},
```
Since `style="--aspect-ratio"` is only set when the component is called with "width" and "height", I quickly run into a loophole. As far as I understand, it can only be solved by modifying the behavior of the previously mentioned code, which I tried with no luck.
2 Me gusta
system
(system)
Cerrado
23 Junio, 2023 15:09
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.