-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image blocks: add pattern background #6430
Conversation
Maybe it'd be possible to toggle this via a blueprint option? I think it's a good thing, especially with the dark mode coming up, but most of my blocks don't need it as you figured. |
I also think that this could/should be a toggle. Maybe to even toggle between white/black/pattern. |
46f8eb1
to
b976d8c
Compare
@bastianallgeier like an actual toggle field? The issue right now is that I wanted to rather add it as a fieldset blueprint option. However, I realized that fieldsets do no allow passing any custom options: https://github.com/getkirby/kirby/blob/main/src/Cms/Fieldset.php#L204-L219 |
b976d8c
to
8a80bc6
Compare
@distantnative I was thinking of a toggle in the block preview component. I would not connect it to the blueprint |
@bastianallgeier but if it's not a fixed state, one would have to change the toggle e.g. for a white transparent graphic to pattern each time loading the view. Or would we try to store that in localStorage? |
Do you think it's going to get too messy to put it in localStorage? I think that would be quite nice as a solution. |
I think the localStorage part could work. Just thinking of the UI of this toggle, won't be so easy as it would have to float on top of the image, or what do you have in mind? Screen.Recording.2024-05-12.at.12.43.38.mov |
I think it really looks good already. I wonder if we should use the background on the entire width or really only for the image. We could maybe reuse https://lab.getkirby.com/public/lab/components/frames/4_color to create a little square button in the bottom right corner instead of the text button. Maybe together with a dropdown arrow. |
I would go with the entire width. Looks better. |
8a80bc6
to
8faff8f
Compare
8faff8f
to
6a94f92
Compare
@bastianallgeier Implemented a visual selector as suggested. Also coloring now the full block which I think looks best. |
panel/src/components/Forms/Blocks/Elements/BlockBackgroundDropdown.vue
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ready to go in my opinion.
Description
Summary of changes
k-block-figure
: Newback
option to set the background (pass pure CSS value)k-block-figure-caption
that adapts its color based on the background (to also work on dark backgrounds)k-block-background-dropdown
k-color-frame
can now also handle patterns as pseudo-colorChangelog
Enhancements
Screen.Recording.2024-07-25.at.15.33.03.mov
For review team