Plugin de mise en page

Any idea why the layouts work perfectly fine in one subcategory:

but not in another?

1 « J'aime »

It’s the tags and specifically this line:

You can either reduce the number of tags or try this:

.topic-list-item .discourse-tags {
   display:  unset;
}

That will cause them to wrap, hopefully.

(NB inline-block also works but unset works even better in this case)

2 « J'aime »

Thank you so much! That works.

1 « J'aime »

Thanks for nice work.
but
When i tick: Enable right sidebar globally to yes or no there is no timeline on the topic. It is a bug or no ?? (im testing the material theme)

There will be another reason why you’re not seeing the timeline. Please try using the plugin by itself with other plugins and themes disabled.

My Sandbox has this plugin installed, has enable right sidebar globally turned off and you can still see topic timelines, e.g. Test event for bug(?) - Events - Pavilion

Also make sure you haven’t included “topic” in the layouts sidebar right enabled setting.

2 « J'aime »

So much functionality has been provided (you people are great) that it has become rather tough to understand all the options which cross depend on each other (layout vs location plugins) for a power user (but not powerful tech) like me.

But I understand that I shouldn’t bite more than I can chew. But again, can’t help myself when see something new and useful.

1 « J'aime »

I agree! I’m going to be updating the first post of this plugin topic, and my other plugin topics soon with a standardised template that makes it easier to understand the functionality and how to implement it on your site.

If you have any specific use cases in mind for this plugin let me know and I can help you out.

2 « J'aime »

EDIT:

Let’s not talk about why it’s fixed, or not…

Sorry :wink: :slight_smile: (Missed that option)

1 « J'aime »

I also was wondering about this.

Can you create the Widgets that will be used by Layouts Plugins in a theme component or do the Widgets have to be created by a Plugin also?

Probably both will work, I’ve created them in plugins.

The only advantage of doing the latter is you can programmatically set up the widget locations in plugin.rb without having to use Admin.

1 « J'aime »

Yes you can!

There’s both a server-side and client-side interface for adding widgets.

Import this function

import { addCustomWidget } from 'discourse/plugins/discourse-layouts/discourse/widgets/sidebar';

Then use it like this in an initializer

addCustomWidget({
  name: <widget name>,
  position: <side you want it to appear on>,
  order: <order relative to other widgets on the same side>
})

Also make sure it’s enabled, either site-wide (in site settings) or for a specific category (in category settings).

Une idée si le CSS pour cela doit être modifié récemment ? Je viens de mettre à jour vers la dernière version et le CSS ne fonctionne plus. Je vois toujours l’utilisation de .nav-container et .locations-map lorsque j’inspecte les éléments depuis le navigateur.

Salutations.

Rien n’a changé dans le plugin, mais le CSS de Discourse a peut-être évolué.

Ceci est bien la carte de la liste des sujets, n’est-ce pas ? Essayez

#list-area .locations-map:not(.expanded) {
  ...
}

Merci, mais pas de chance. J’ai presque tout mis dedans et aucun changement :

.list-area .widget-container .nav-container .leaflet-container .locations-map:not(.expanded) {
  height: 750px;
}

Résolu : il faut le commentaire !important. Merci pour l’aide.

.nav-container .locations-map:not(.expanded) {
  height: 750px !important;
}
2 « J'aime »

Cela fonctionne parfaitement sur mon site web à l’adresse https://babyforex.net. Cependant, si vous utilisez la barre latérale droite dans la vue des sujets, vous ne devriez pas utiliser DiscoTOC : DiscoTOC - automatic table of contents

1 « J'aime »

Sur la page du sujet,

La navigation des articles est masquée.

Je pense que la navigation des articles pourrait être déplacée à gauche du site, et la barre latérale à droite.

Est-ce qu’il m’affiche l’erreur - “Aucun paramètre nommé ‘layouts_sidebar_left_enabled’ n’existe”, et c’est pareil pour tous les paramètres que j’essaie de créer ?

Pourriez-vous s’il vous plaît détailler les étapes que vous suivez pour obtenir cette erreur ? Veuillez fournir suffisamment de détails pour qu’une personne puisse la reproduire.

Utilisez-vous une version officielle à jour de Discourse ? Nous ne prenons en charge nos plugins que sur la branche tests-passed.