Skip to content
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

Use grav Image.html() function to create slideshow-image #31

Open
hubionmac opened this issue Jan 14, 2018 · 1 comment
Open

Use grav Image.html() function to create slideshow-image #31

hubionmac opened this issue Jan 14, 2018 · 1 comment

Comments

@hubionmac
Copy link

Instead of hard-coding the html in lightslider.html.twig it would be better to insert something like
{{image.html(image.basename,image.basename)}} more flexible and the slider's img-tag gets a title-value and alt-value ontop ;-)

@hughbris
Copy link
Contributor

hughbris commented Apr 3, 2018

I agree it's better to use Grav's media html function (I think this plugin predates some of these features to be fair!). But simply populating the title and alt attributes with image.basename provides no usability or accessibility benefits for users.

Also this will only work in image mode because text mode uses the image as a CSS background.

I'm working on a new mode which would allow setting these properties in a way that could be used (dynamically) like your example. Unfortunately I don't know enough layout/CSS to move away from the background rendering approach. If we can overlay text on an img tag safely, I'll do that.

Great suggestion to think about, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants