Closed ghost closed 2 years ago
@cmneal26 this is an example of a technical problem I couldn't easily solve, so I'm delegating to our SME.
I don't want to take up too much of our time on this, since it's not strictly necessary for us to complete our project.
Moving to backlog.
here is the util: https://www.11ty.dev/docs/plugins/image/
Here is one successful way we're currently using it.
(a) The images on the site
Here is the code for that successful way of using it
The shorthand to display the image on home page:
where: https://github.com/cmneal26/Tech-Writing-Project/blob/main/_includes/layouts/home.njk
This works great for the images on the home page. We want to use this util for all of our images, for various reasons.
Anyway, there is one context in which I want to use this util that I wasn't able to figure out, and I thought perhaps you might be able to help with this.
Anyway, look at this: https://github.com/11ty/eleventy-img/issues/46
In that thread, there is this: https://www.zachleat.com/web/eleventy-image/#css-background-check
You see how it's using the image utility with the CSS? That's what I want, but I wasn't able to figure out how to implement it yet, based on that example.
If you could figure this out, and explain it to me, that would be wonderful. If it takes too much time, don't worry about it, we're good for functionality. I just thought this was important to know how to do, if I ever used Eleventy in a more serious capacity.
Thank you.