Closed amrutadotorg closed 1 week ago
I'm not sure about the reverse
and the code duplication it implies. You can implement this reverse with a single css attribute:
main > header {
flex-direction: row-reverse;
}
For the video, I think preloading by default offers a better user experience. Why do you want to remove it ?
Hi, thank you. I did know about the css trick. I thought that having two hero components on the page the only way was to create a custom component.
The default behavior for loading a video stays the same. There’s just an option to lazy load the video. That’s all.
Okay, that's fine by me. Do you want to make a PR?
Hi,
With pleasure. There’s no pressure from my side; I just want others to enjoy using the SQLPage project as much as I do.
Regarding the PR, if I understand you correctly, we only need to implement the lazy load part?
Yes, just the poster, with the matching change to the documentation
the poster property was added to the hero component
If you still need it, you can open a new issue about the reverse attribute
Thank you. The css trick is fine.
Actually, I'm realising this could be achieved without additional css, with just a flex-row-reverse
class added to the <header>
in shell.handlebars
. I think having an attribute accessible in sql for that would be nice.
that's awesome!
Hi,
Here are two features you might want to consider implementing in the
hero
component:Reverse Positioning: Add a
reverse
variable that, when set to TRUE, swaps the position of the description with the image/video.Lazy Loading for Video: If the
poster
variable is provided, include thepreload="none"
attribute along with theposter
attribute to prevent automatic video download, which is beneficial for large files. If theposter
variable is not provided, exclude both thepreload
andposter
attributes, allowing the video to download automatically.example:
hero.handlebars