-
AuthorPosts
-
July 30, 2020 at 3:00 pm #1234168
Hi from germany,
I am trying to experiment with the fullscreen slider in conjunction with the semitransparent header, which looks great so far. But I ran into a problem regarding my header. Let’s assume the menu-links etc. are white: This looks good on dark toned images. If they are black or similar, they look good on light toned images. But unfortunately not vice vesa. So I came up with an Idea: Why not get the dominant color of the currently displayed image, decide if it is a light or dark one and react on this? I found two nice solutions to achieve that. For the dominant color, see https://lokeshdhakar.com/projects/color-thief/, for the color evaluation see https://awik.io/determine-color-bright-dark-using-javascript/.
What I want to achieve is to add an additional class to the header or the body regarding to the dominant color. Is there any event triggered, when a fullscreen slide is shown? And can I get the image URL of the currently shown picture? I’ll gladly try something out and will post the results for everybody to see.
I know that is a bit experimental, but I think that would make a nice addition to my website. An alternativce would probably be a light/dark selection in the fullscreen slider elements dialogue. Thanks to everyone for ideas and feedback.
August 3, 2020 at 1:33 am #1234694Hey André,
Sorry for the late reply, this sounds like a good idea, unfortunately there is not an event triggered, but typically the ID exists “fullscreen_slider_1” unless the user inputs something else.
You should be able to find the image with this selector:
#fullscreen_slider_1 > div > ul > li.slide-1.active-slide
Best regards,
MikeAugust 3, 2020 at 8:41 am #1234748Hi Mike,
thanks for your reply. For testing purposes, I think I’ll go another way: I try out a clone of the fullscreen slider from my own theme, so I can react on the image server sided with php ;-) I will let you all know if I made it to my desired goal.Regarding this idea: Is there a way to add an additional tab to the builder, so that the cloned shortcode does have it’s own “environment”?
Edit: Forget about the last question, found it out myself ;-)
- This reply was modified 4 years, 3 months ago by sixtyseven.
August 3, 2020 at 12:19 pm #1234792August 5, 2020 at 11:05 am #1235369This reply has been marked as private.August 6, 2020 at 2:34 pm #1235740Hi sixtyseven,
Glad you got it working for you! :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.