Skip to content

Commit

Permalink
fix(storefront): STRF-4804 Fix Store Logo image size for Amp Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
David Payne committed May 17, 2018
1 parent 9534aec commit c7f280d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
3 changes: 2 additions & 1 deletion 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 All @@ -14,7 +15,7 @@
- Fix for excess whitespace in multiline text field product option [#1222](https://github.com/bigcommerce/cornerstone/pull/1222)
- Fix for faceted search display. [#1225](https://github.com/bigcommerce/cornerstone/pull/1225)
- Fix for calls with empty files in Safari. [#1210](https://github.com/bigcommerce/cornerstone/pull/1210)

## 1.17.0 (2018-04-26)
- Fix empty object issue in app.js [#1204](https://github.com/bigcommerce/cornerstone/pull/1204)
- Fix product layout when shop by price disabled [#1205](https://github.com/bigcommerce/cornerstone/pull/1205)
Expand Down
15 changes: 11 additions & 4 deletions templates/components/amp/common/store-logo.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
<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}}
<span class="amp-header-logo-text">{{settings.store_logo.title}}</span>
{{/if}}
Expand Down

0 comments on commit c7f280d

Please sign in to comment.