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

feat: use featured image when provided #358

Merged
merged 2 commits into from
Sep 26, 2022
Merged

Conversation

fdalcin
Copy link
Contributor

@fdalcin fdalcin commented Sep 26, 2022

Issue #189, pressbooks/pressbooks-network-catalog#13

This PR changes the behaviour of the page layout to render the post featured image when provided. If no featured image is provided we fallback the the old behaviour.

How to test

  1. Set the featured image for any post and visit the post to see the featured image being rendered
  2. Set the customizer header image and make sure the featured image has a higher priority
  3. With pressbooks-network-catalog disabled, try to force set a featured image for the catalog page and make sure it's not rendered in the Aldine Catalog
  4. With pressbooks-network-catalog enabled you should see the featured image instead of the default background image

Note
To force set a featured image change the Catalog page template to "Default template", update the image and then change the template back to "Catalog"

Copy link
Contributor

@arzola arzola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and works as expected I don't like a lot that if else if statement but I can't find a better approach for that thing 🤣

@arzola arzola merged commit 45f02cc into dev Sep 26, 2022
@arzola arzola deleted the feature/render-featured-image branch September 26, 2022 19:56
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

Successfully merging this pull request may close these issues.

None yet

2 participants