Allineamento delle immagini e griglia

That to be honest is not a bad workaround.

Will test this idea. Wondering if we even just use the ‘>’ between image sets if it would segregate each upload image/text block? Will test on my site and provide feedback.

2 Mi Piace

Success!

Result

The ‘br’ were removed from between pics. I used 2 lines of > but I suspect a single one between picture grids should work fine as a hard break between.

Single “>” quote break works.

2 Mi Piace

I got a deprecation notice here:

Deprecation notice: The icon name “arrows-alt-h” has been updated to “left-right”. Please use the new name in your code. Old names will be removed in Q2 2025. [deprecation id: discourse.fontawesome-6-upgrade] [info: We're upgrading our icons to Font Awesome 6! ]

Maybe also other icons than arrows-alt-h are affected, I did not check, yet.

2 Mi Piace

Here’s a quick PR:

4 Mi Piace

always grateful for your help my friend, thanks :pray: :slight_smile:

4 Mi Piace

Thanks arkshine for quick fix just updated thanks lilly for really cool component, I can use this to sort of emulate blog styling on a post with the center option :+1:

3 Mi Piace

There seems to be old code in this theme component. I get this admin information with the latest Discourse rebuild:

[Admin-Hinweis] Theme ‘image-alignment’ enthält Code, der aktualisiert werden muss. (ID:discourse.script-tag-discourse-plugin) (mehr erfahren)

And in browser development console:

[THEME 47 ‘image-alignment’] Deprecation notice: Adding JS code using <script type='text/discourse-plugin'> is deprecated. Move this code to a dedicated JavaScript file. [deprecation id: discourse.script-tag-discourse-plugin] [info: Modernizing inline script tags for templates & JS API]

3 Mi Piace

thanks, i will have a look this weekend.

4 Mi Piace

Im getting the same message

yea just dismiss it. only admins can see the message, and component is not broken yet. component just needs an update.

5 Mi Piace

Let me start by thanking you, @Lilly, for this useful component!

I have 2 questions:

  1. Since the warning message is related to components not working properly in September (if I understand what’s going to happen then), will you be able to update the component before that date?
  2. One of the things that the component could do, if possible, is that when we have a bunch of images already in the composer, we could select them all, click the button and it will wrap them as a group. Right now, it’s wrapping each one individually:

Of course we can just select, cut, click the button, paste, but I was wondering if avoiding those extra steps would be possible and, of course, if you were even interested in making that change?

Anyway, this already helps a lot, the fact that I don’t have to type [grid] and then [/grid] all the time, so thank you :slight_smile:


I just learned that clicking the grid in the first image, already wraps everything nicely with [grid] and [/grid]:

It would be good if this was also the behavior of the component’s icon, of course, but having this natively is already useful.

3 Mi Piace

i updated this component for modernized js api. when i have a bit more time i will try to improve it a bit.

3 Mi Piace