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

Add Slider background fit option to cover or contain image #2715

Merged
merged 2 commits into from
Jun 15, 2022

Conversation

dbkchu
Copy link
Contributor

@dbkchu dbkchu commented May 18, 2022

Added media_size option analagous to image_size in homepage backgrounds and fix stale reference to overlay_img.

Purpose

Adds customizability to slider widget and fixes error.

Documentation

Enhances https://wowchemy.com/docs/widget/slider/
Add media_size option analagous to image_size in https://wowchemy.com/docs/getting-started/page-builder/#background
"# Options are cover (default), contain, or actual size."

Added media_size option analagous to image_size in homepage backgrounds and fix stale reference to overlay_img.
@netlify
Copy link

netlify bot commented May 18, 2022

Deploy Preview for hugo-portfolio-theme canceled.

Name Link
🔨 Latest commit a39354a
🔍 Latest deploy log https://app.netlify.com/sites/hugo-portfolio-theme/deploys/62aa1598a575cc0009fc985a

@netlify
Copy link

netlify bot commented May 18, 2022

Deploy Preview for markdown-slides ready!

Name Link
🔨 Latest commit a39354a
🔍 Latest deploy log https://app.netlify.com/sites/markdown-slides/deploys/62aa1598e2628f0008cc779e
😎 Deploy Preview https://deploy-preview-2715--markdown-slides.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@gcushen
Copy link
Collaborator

gcushen commented May 25, 2022

What's the use case for adding contain contain contain option?

I assume you're also using the background color options with this to fill the gaps between the image and the sides of the widget?

@dbkchu
Copy link
Contributor Author

dbkchu commented Jun 1, 2022

Hi, I am not sure what you mean by "contain contain contain" option. I wanted the full image inside the slider instead of a portion of the image covering the full slider.

I actually ended up using "auto 80%" as the media_size option, and yes I am using a background color to fill the gaps.

The website I am using this for is http://hjkgrp.mit.edu/ and the slider.md file can be found here

@gcushen gcushen changed the title custom media_size option & fix error statement Add Slider background fit option to cover or contain image Jun 15, 2022
@gcushen
Copy link
Collaborator

gcushen commented Jun 15, 2022

Renamed proposed media_size option to fit.

@gcushen gcushen merged commit f347d63 into HugoBlox:main Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants