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

[amp-story-bookend] Replaces amp images to regular images in amp-story-bookend #15904

Merged
merged 2 commits into from Jun 12, 2018

Conversation

Enriqe
Copy link
Contributor

@Enriqe Enriqe commented Jun 7, 2018

Fixes #15313

@Enriqe Enriqe requested review from gmajoulet and newmuis June 7, 2018 19:40
@Enriqe Enriqe changed the title Replaces amp images to regular images [amp-story-bookend] Replaces amp images to regular images in amp-story-bookend Jun 7, 2018
@@ -15,19 +15,19 @@
"type": "small",
"title": "This is an example article",
"url": "http://example.com/article.html",
"image": "http://placehold.it/256x128"
"image": "http://placehold.it/100x100"
Copy link
Contributor

Choose a reason for hiding this comment

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

I liked the idea of having images that don't fit their container, it makes it easier to notice any cropping issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.


addAttributesToElement(ampImg, dict({'src': articleData.image}));
el.insertBefore(ampImg, el.firstChild);
<div class="i-amphtml-story-bookend-article-image">
Copy link
Contributor

Choose a reason for hiding this comment

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

Here and in the other templates: Can we get rid of this (unnecessary?) div?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need it make the images take the full width and height of its available space. Also to do the padding-bottom css trick on the portrait and landscape cards to keep a width and expand/decrease the height.

Copy link
Contributor

Choose a reason for hiding this comment

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

Perfect, thanks :)

@Enriqe
Copy link
Contributor Author

Enriqe commented Jun 12, 2018

@newmuis PTAL

@newmuis newmuis merged commit 8b971fc into ampproject:master Jun 12, 2018
@Enriqe Enriqe deleted the replace-amp-img-in-bookend branch June 29, 2018 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants