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

fix(storefront): STRF-4804 Fix Store Logo image size for Amp Pages #1239

Merged
merged 1 commit into from
May 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Draft
- Fix for sort disappearing on range update with product filtering [#1232](https://github.com/bigcommerce/cornerstone/pull/1232)
- No longer escaping HTML content in blog summaries. [#1238](https://github.com/bigcommerce/cornerstone/pull/1238)
- Fix logo image dimensions on AMP pages. [#1239](https://github.com/bigcommerce/cornerstone/pull/1239)

## 1.18.0 (2018-05-09)
- Add the +/- icons for the category filtering [#1211](https://github.com/bigcommerce/cornerstone/pull/1211)
Expand Down
14 changes: 10 additions & 4 deletions templates/components/amp/common/store-logo.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
<a href="{{urls.home}}" class="amp-header-link">
{{#if settings.store_logo.image}}
<amp-img
src="{{getImage settings.store_logo.image 'logo_size'}}"
width="100"
height="50"
<amp-img src="{{getImage settings.store_logo.image 'logo_size'}}"
{{#if theme_settings.logo_size '===' 'original' }}
width="100"
height="50"
{{else}}
width="{{first (split theme_settings.logo_size 'x')}}"
height="{{last (split theme_settings.logo_size 'x')}}"
layout="responsive"
sizes="(min-height: {{last (split theme_settings.logo_size 'x')}}%)"
{{/if}}
alt="{{settings.store_logo.title}}">
</amp-img>
{{else}}
Expand Down