Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 399626d
Author: tairli <tairli@yahoo.com>
Date:   Mon Aug 23 04:47:25 2021 +0930

    Update product-form.js

commit 330e6b4
Merge: 79467e4 7a2f34f
Author: tairli <tairli@yahoo.com>
Date:   Mon Aug 23 04:45:54 2021 +0930

    Merge remote-tracking branch 'upstream/main' into main

commit 7a2f34f
Author: Lucas Lacerda <37168033+LucasLacerdaUX@users.noreply.github.com>
Date:   Thu Aug 19 15:55:39 2021 -0400

    Add featured product section (Shopify#261)

commit 9789ae1
Author: translation-platform[bot] <34770790+translation-platform[bot]@users.noreply.github.com>
Date:   Thu Aug 19 15:52:08 2021 -0400

    Update 2 translation files (Shopify#449)

    Co-authored-by: translation-platform[bot] <34770790+translation-platform[bot]@users.noreply.github.com>

commit d83f16f
Author: translation-platform[bot] <34770790+translation-platform[bot]@users.noreply.github.com>
Date:   Thu Aug 19 15:51:51 2021 -0400

    Update 7 translation files (Shopify#448)

    Co-authored-by: translation-platform[bot] <34770790+translation-platform[bot]@users.noreply.github.com>

commit ce0e5ec
Author: Ludo <ludo.segura@shopify.com>
Date:   Thu Aug 19 14:46:05 2021 -0400

    Hide variant images setting (Shopify#158)

commit d3b44e7
Author: Ludo <ludo.segura@shopify.com>
Date:   Thu Aug 19 10:29:50 2021 -0400

    Update font style for Default preset (Shopify#435)

    * Update font style for Default preset

    * updated default in settings_schema

commit 2643bab
Author: translation-platform[bot] <34770790+translation-platform[bot]@users.noreply.github.com>
Date:   Thu Aug 19 10:29:34 2021 -0400

    Update 15 translation files (Shopify#439)

    Co-authored-by: translation-platform[bot] <34770790+translation-platform[bot]@users.noreply.github.com>

commit e9a2fd4
Author: translation-platform[bot] <34770790+translation-platform[bot]@users.noreply.github.com>
Date:   Thu Aug 19 10:02:16 2021 -0400

    Update 4 translation files (Shopify#440)

    Co-authored-by: translation-platform[bot] <34770790+translation-platform[bot]@users.noreply.github.com>

commit 9ea0392
Author: Ludo <ludo.segura@shopify.com>
Date:   Wed Aug 18 17:19:16 2021 -0400

    404 continue shopping style (Shopify#419)

commit 6c2128a
Author: Ken Meleta <30790058+kmeleta@users.noreply.github.com>
Date:   Wed Aug 18 15:14:33 2021 -0600

    Update price sale badge spacing (Shopify#430)

commit a6d25cf
Author: Kai <KaichenWang@users.noreply.github.com>
Date:   Wed Aug 18 11:13:22 2021 -0400

    Adjust global focus styles for inputs, selects and collection filter UI elements (Shopify#389)

    * Adjust global focus styles for inputs, selects and collection filter UI elements

    * Fix focus for filter drawer summary elements

    * Simplify focus for elements that are always "focus-visible" when in focus

    * Adjust focus style of search submit button

commit 002b6b0
Author: Ken Meleta <30790058+kmeleta@users.noreply.github.com>
Date:   Wed Aug 18 09:01:47 2021 -0600

    Product card spacing and price polish (Shopify#407)

    * Adjust product card spacing and price styles

    * Fix unit price/sale badge spacing

    * Revert flex gap approach

commit 6fa46b7
Author: Ludo <ludo.segura@shopify.com>
Date:   Wed Aug 18 10:54:58 2021 -0400

    Update Preset default (Shopify#410)

commit 341e051
Author: translation-platform[bot] <34770790+translation-platform[bot]@users.noreply.github.com>
Date:   Wed Aug 18 10:43:37 2021 -0400

    Update 10 translation files (Shopify#427)

    Co-authored-by: translation-platform[bot] <34770790+translation-platform[bot]@users.noreply.github.com>

commit 79467e4
Merge: 42cad96 789c3d9
Author: tairli <tairli@yahoo.com>
Date:   Wed Aug 18 19:26:00 2021 +0930

    Merge branch 'Shopify:main' into main

commit 42cad96
Merge: b5ddb38 2ba2725
Author: tairli <tairli@yahoo.com>
Date:   Tue Aug 17 22:06:29 2021 +0930

    Merge branch 'Shopify:main' into main
  • Loading branch information
tairli committed Aug 22, 2021
1 parent db4ee33 commit cc08426
Show file tree
Hide file tree
Showing 76 changed files with 3,403 additions and 376 deletions.
41 changes: 27 additions & 14 deletions assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,25 @@ summary::-webkit-details-marker {
outline: 0 !important;
}

.focus-offset:focus-visible {
outline: 0.2rem solid rgba(var(--color-foreground), 0.5);
outline-offset: 1rem;
box-shadow: 0 0 0 1rem rgb(var(--color-background)),
0 0 0.2rem 1.2rem rgba(var(--color-foreground), 0.3);
}

.focus-offset:focus {
outline: 0.2rem solid rgba(var(--color-foreground), 0.5);
outline-offset: 1rem;
box-shadow: 0 0 0 1rem rgb(var(--color-background)),
0 0 0.2rem 1.2rem rgba(var(--color-foreground), 0.3);
}

.focus-offset:focus:not(:focus-visible) {
outline: 0;
box-shadow: none;
}

/* component-title */
.title,
.title-wrapper-with-link {
Expand Down Expand Up @@ -1189,7 +1208,6 @@ deferred-media {
.share-button {
display: block;
position: relative;
max-width: 31rem;
}

.share-button details {
Expand All @@ -1199,7 +1217,8 @@ deferred-media {
.share-button__button {
font-size: 1.4rem;
display: flex;
align-items: baseline;
min-height: 2.4rem;
align-items: center;
color: rgba(var(--color-link), var(--alpha-link));
margin-left: 0;
padding-left: 0;
Expand Down Expand Up @@ -1238,6 +1257,7 @@ details[open] > .share-button__fallback {
left: 0.1rem;
z-index: 3;
width: 100%;
min-width: 31rem;
box-shadow: 0 0 0 0.1rem rgba(var(--color-foreground), 0.55);
}

Expand Down Expand Up @@ -1323,20 +1343,13 @@ details[open] > .share-button__fallback {
box-shadow: 0 0 0 0.2rem rgba(var(--color-foreground), 0.55);
}

.field__input:focus-visible,
.select__select:focus-visible,
.field input:focus-visible {
box-shadow: 0 0 0 0.1rem rgba(var(--color-foreground), 0.55),
0 0 0 0.3rem rgb(var(--color-background)),
0 0 0.5rem 0.4rem rgba(var(--color-foreground), 0.3);
}

.field__input:focus,
.select__select:focus,
.field input:focus {
box-shadow: 0 0 0 0.1rem rgba(var(--color-foreground), 0.55),
0 0 0 0.3rem rgb(var(--color-background)),
0 0 0.5rem 0.4rem rgba(var(--color-foreground), 0.3);
.customer .field input:focus,
.customer select:focus,
.localization-form__select:focus {
box-shadow: 0 0 0 0.2rem rgba(var(--color-foreground), 0.75);
outline: transparent;
}

.text-area,
Expand Down
10 changes: 8 additions & 2 deletions assets/component-card.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
}

.card + .card-information {
margin-top: 1.2rem;
margin-top: 1.3rem;
}

@media screen and (min-width: 750px) {
.card + .card-information {
margin-top: 1.7rem;
}
}

.card.card--soft {
Expand Down Expand Up @@ -175,7 +181,7 @@
}

.card-information__wrapper > *:not(.visually-hidden:first-child) + * {
margin-top: 1.1rem;
margin-top: 0.7rem;
}

.card-information__wrapper .caption {
Expand Down
1 change: 1 addition & 0 deletions assets/component-pickup-availability.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pickup-availability[available] {
color: rgba(var(--color-foreground), 0.75);
letter-spacing: 0.06rem;
padding: 0 0 0.2rem;
text-align: left;
text-decoration: underline;
}

Expand Down
1 change: 1 addition & 0 deletions assets/component-price.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
.price--on-sale .price-item--regular {
text-decoration: line-through;
color: rgba(var(--color-foreground), 0.75);
font-size: 1.3rem;
}

.unit-price {
Expand Down
2 changes: 1 addition & 1 deletion assets/component-product-model.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}

@media screen and (min-width: 750px) {
.product__media-wrapper > .button.product__xr-button {
slider-component + .button.product__xr-button {
display: none;
}

Expand Down
22 changes: 13 additions & 9 deletions assets/customer.css
Original file line number Diff line number Diff line change
Expand Up @@ -473,15 +473,6 @@
}
}

.order tbody td:nth-of-type(3) dd:nth-of-type(2) {
font-size: 1.1rem;
letter-spacing: 0.07rem;
line-height: 1.2;
margin-top: 0.2rem;
text-transform: uppercase;
color: var(--color-foreground-70);
}

.order tfoot tr:last-of-type td,
.order tfoot tr:last-of-type th {
font-size: 2.2rem;
Expand Down Expand Up @@ -617,6 +608,19 @@
color: rgba(var(--color-foreground), 0.7);
}

.order .unit-price {
font-size: 1.1rem;
letter-spacing: 0.07rem;
line-height: 1.2;
margin-top: 0.2rem;
text-transform: uppercase;
color: rgba(var(--color-foreground), 0.7);
}

.order .regular-price {
font-size: 1.3rem;
}

/* Addresses */
.addresses li > button {
margin-left: 0.5rem;
Expand Down
23 changes: 16 additions & 7 deletions assets/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,15 +456,17 @@ class SliderComponent extends HTMLElement {
}

initPages() {
if (!this.sliderItems.length === 0) return;
this.slidesPerPage = Math.floor(this.slider.clientWidth / this.sliderItems[0].clientWidth);
this.totalPages = this.sliderItems.length - this.slidesPerPage + 1;
const sliderItemsToShow = Array.from(this.sliderItems).filter(element => element.clientWidth > 0);
this.sliderLastItem = sliderItemsToShow[sliderItemsToShow.length - 1];
if (sliderItemsToShow.length === 0) return;
this.slidesPerPage = Math.floor(this.slider.clientWidth / sliderItemsToShow[0].clientWidth);
this.totalPages = sliderItemsToShow.length - this.slidesPerPage + 1;
this.update();
}

update() {
if (!this.pageCount || !this.pageTotal) return;
this.currentPage = Math.round(this.slider.scrollLeft / this.sliderItems[0].clientWidth) + 1;
this.currentPage = Math.round(this.slider.scrollLeft / this.sliderLastItem.clientWidth) + 1;

if (this.currentPage === 1) {
this.prevButton.setAttribute('disabled', true);
Expand All @@ -484,7 +486,7 @@ class SliderComponent extends HTMLElement {

onButtonClick(event) {
event.preventDefault();
const slideScrollPosition = event.currentTarget.name === 'next' ? this.slider.scrollLeft + this.sliderItems[0].clientWidth : this.slider.scrollLeft - this.sliderItems[0].clientWidth;
const slideScrollPosition = event.currentTarget.name === 'next' ? this.slider.scrollLeft + this.sliderLastItem.clientWidth : this.slider.scrollLeft - this.sliderLastItem.clientWidth;
this.slider.scrollTo({
left: slideScrollPosition
});
Expand Down Expand Up @@ -533,14 +535,21 @@ class VariantSelects extends HTMLElement {
const newMedia = document.querySelector(
`[data-media-id="${this.dataset.section}-${this.currentVariant.featured_media.id}"]`
);

if (!newMedia) return;
const modalContent = document.querySelector(`#ProductModal-${this.dataset.section} .product-media-modal__content`);
const newMediaModal = modalContent.querySelector( `[data-media-id="${this.currentVariant.featured_media.id}"]`);
const parent = newMedia.parentElement;
if (parent.firstChild == newMedia) return;
modalContent.prepend(newMediaModal);
parent.prepend(newMedia);
window.setTimeout(() => { parent.scroll(0, 0) });
this.stickyHeader = this.stickyHeader || document.querySelector('sticky-header');
this.stickyHeader.dispatchEvent(new Event('preventHeaderReveal'));
window.setTimeout(() => { parent.querySelector('li.product__media-item').scrollIntoView({behavior: "smooth"}); });
}

updateURL() {
if (!this.currentVariant) return;
if (!this.currentVariant || this.dataset.updateUrl === 'false') return;
window.history.replaceState({ }, '', `${this.dataset.url}?variant=${this.currentVariant.id}`);
}

Expand Down
Loading

0 comments on commit cc08426

Please sign in to comment.