sorry, lol. I thought I broke Glide for sure.
Ok, I made a new container and re-entered the css. Looks like this:
It’s lining up the way we expect now.
Is there a way to increase the image size?
sorry, lol. I thought I broke Glide for sure.
Ok, I made a new container and re-entered the css. Looks like this:
It’s lining up the way we expect now.
Is there a way to increase the image size?
#main-root:has(.slide-Show).gp-xl.gp-xl.gp-xl.gp-xl .threeColumns:not(.pages-component-renderer.threeColumns) {
grid-template-columns: 2fr 4fr 2fr;
}
this is great
@Himaladin the text overlay shows up on my other collections too. Can I just have them on the slide Show?
Been trying to follow along, but not very closely. @Himaladin you tagged me for ideas on speeding up some javascript and @Sekayi_Liburd you sent me a private message regarding the same. I wasn’t sure if you were still looking for an answer from me or if you moved on to a different solution. Just wanted to double check before I try to see if I can find a solution.
Still an unsolved problem Jeff.
Do you have an idea?
Ok. I have an idea. It’s similar to something I’ve done in the past for an unrelated project and had somewhat successful results.
Off the top of my head I’m thinking maybe something that involves two javascript columns.
The result should be that the final javascript runs every 5 seconds instead of 10.
So just to help me understand the javascript below, is the purpose to get unix time in milliseconds, divide by 10000 to effectively get a number that updates every 10 seconds, and then get the divisible remainder based on the limit?
Looks like on its own it only changes every 10 seconds, so I think I would change from 10000 to 5000 so it can change every 5 seconds.
let limit = p2;
let currentCounter = Math.floor((new Date().getTime() / 10000) % limit) + 1;
return currentCounter;
Unless someone else wants to take a crack at this, I’ll try it myself sometime tonight when I’m done with work.
(Writing this out, it almost seems feasible to create some sort of timer in glide that actually does update every second. It would probably require 10 columns at least, but seems like it could be possible.)
Hi @Jeff_Hager , I would like it to change every 5 seconds. 10 seconds is very long for my use case.
Is it possible to restrict the text overlays to only the header?
Oh… sorry, I missed your question.
You add the class name to the collection component again, for example: slide-card. Then change #main-root:has(.slide-Show) to .slide-card.
“Only regarding text-related code, not all code. Some of the code I provide works in containers, so don’t get confused again.”
ok, thanks so much!
I have tried this part before. Actually, the update time for Glide on the device I tested is around 7 seconds. When using the formula “currentCounter” divided by 10000, the counter number will count it stably. However, if it is changed to 5000, some numbers will be skipped in a few frames. Maybe using 7000 could work.
The idea of using additional columns may be a solution-oriented and manipulative idea, but I cannot imagine how to do it, while waiting for your brilliant idea.
I have another idea, which is to create an auto-slide carousel for the collection, which might move quickly. But I’m too lazy to delve into its CSS.
I wore you out this weekend. Sorry
No problem. Through our discussion, I have materials for exploration. I will try it in my spare time.
If you want to see how it’s working, you can view the app here: https://hiptnt.glide.page
I’m not sure why the edge to edge image layout isn’t happening on the mobile view of the published app but I won’t fuss about it, lol.
As a temporary workaround for the slow image change speed, I’m using gifs that combine 2 images and switches them at the 5-second mark. Just for the sake of viewer interest.
OK, so here’s what I got.
There are two javascript columns:
function resolveAfternSeconds() {
return new Promise(resolve => {
setTimeout(() => {
resolve(new Date().getTime());
}, 4500);
});
}
return await resolveAfternSeconds();
let limit = p1;
let currentCounter = Math.floor((new Date().getTime() / 5000) % limit) + 1;
return currentCounter;
Give it a shot and see if it works. If not, let me know.
That’s really great @Jeff_Hager, it’s much faster now, maybe I didn’t really understand your explanation (the translator is not very reliable).
What happens if we use more than 3 columns, is it possible for the counter to update every second?
What’s weird is if I change 5000 to 1000, then what happens is a countdown. I really hope you can make a countdown timer that issue has not been resolved yet.
genius! you guys are so good!
Works like a charm @Jeff_Hager @Himaladin
Have you tried it yet? The result is twice as fast.