Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekjani08 committed Nov 23, 2023
2 parents ccacb36 + 06e5e63 commit 9eb77c8
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 96 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/theme-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: theme-check
on:
push:
branches:
- main # Change to your default branch name if different
jobs:
theme-check:
name: Theme Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Theme Check
uses: shopify/theme-check-action@v1
with:
token: ${{ github.token }}
21 changes: 9 additions & 12 deletions sections/cards.liquid
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
<div class="section-container">
<div class="section-title">Offers</div>
<div class="section-container__title">Offers</div>
</div>

</div>
{% for block in section.blocks %}
<div class="card-section">
<a href="{{ block.settings.card_link }}" class="card-link">
<div class="card">
<a href="{{ block.settings.card_link }}" class="card-section__link">
<div class="card-section__card">
{% if block.settings.card_image != blank %}
{{
block.settings.card_image | image_url: width: 300, height: 300
}}
{% endif %}
<h3>{{ block.settings.card_title }}</h3>
<p>{{ block.settings.card_details }}</p>
<a href="{{ block.settings.card_link }}" class="btn">{{ block.settings.card_button_text }}</a>
{{ block.settings.card_image | image_url: width: 300, height: 300 }}
{% endif %}
<h3 class="card-section__card-title">{{ block.settings.card_title }}</h3>
<p class="card-section__card-details">{{ block.settings.card_details }}</p>
<a href="{{ block.settings.card_link }}" class="card-section__btn">{{ block.settings.card_button_text }}</a>
</div>
</a>
</div>
Expand Down Expand Up @@ -68,4 +65,4 @@
}
]
}
{% endschema %}
{% endschema %}
134 changes: 64 additions & 70 deletions sections/featured-collection.liquid
Original file line number Diff line number Diff line change
@@ -1,83 +1,82 @@
<div class="featured-collection">
<div class="centered-content">
<div class="feature-headers">
<h1 id="header1">{{ section.settings.heading1 }}</h1>
<h1 id="header2">{{ section.settings.heading2 }}</h1>
</div>

<div class="link-section">
<a href="{{ section.settings.linkUrl }}"> View all products ➜ </a>
</div>

<div class="tabsCSS">
{% assign tags = section.settings.tags | split: "," %}
{% for tag in tags %}
{% assign formattedTag = tag | replace: "_", " " | capitalize %}
<a href="#" class="tab-link" data-category="{{ formattedTag | handle }}">{{ formattedTag }}</a>
{% endfor %}
</div>

<div class="featured-collection__centered-content">
<div class="featured-collection__feature-headers">
<h1 class="featured-collection__header" id="header1">{{ section.settings.heading1 }}</h1>
<h1 class="featured-collection__header" id="header2">{{ section.settings.heading2 }}</h1>
</div>



<div class="product-container">
{% for block in section.blocks %}
<div class="product-card" {{ block.shopify_attributes }} data-category="{{ block.settings.category | handle }}">
<div class="card-img">
{{
block.settings.image
| image_url: width: '300px', height: '300px'
}}
<div class="deal-tag"> DEAL - {{ block.settings.deal }} </div>
</div>
<p id="categoryCSS"> {{ block.settings.category }} </p>
<h3>{{ block.settings.title }}</h3>
<p>{{ block.settings.description }}</p>
<p id="price">€{{ block.settings.price }} <span id="strikePrice"><s>€{{ block.settings.strikeThroughPrice }}</s></span></p>


</div>
{% endfor %}
<div class="featured-collection__link-section">
<a href="{{ section.settings.linkUrl }}" class="featured-collection__view-all-link">View all products ➜</a>
</div>

<div class="featured-collection__tabsCSS">
{% assign tags = section.settings.tags | split: ',' %}
{% for tag in tags %}
{% assign formattedTag = tag | replace: '_', ' ' | capitalize %}
<a href="#" class="featured-collection__tab-link" data-category="{{ formattedTag | handle }}">
{{- formattedTag -}}
</a>
{% endfor %}
</div>
</div>

<div class="featured-collection__product-container">
{% for block in section.blocks %}
<div
class="featured-collection__product-card"
{{ block.shopify_attributes }}
data-category="{{ block.settings.category | handle }}"
>
<div class="featured-collection__card-img">
{{ block.settings.image | image_url: width: '300px', height: '300px' }}
<div class="featured-collection__deal-tag">DEAL - {{ block.settings.deal }}</div>
</div>
<p class="featured-collection__category" id="categoryCSS">{{ block.settings.category }}</p>
<h3 class="featured-collection__title">{{ block.settings.title }}</h3>
<p class="featured-collection__description">{{ block.settings.description }}</p>
<p class="featured-collection__price">
€{{ block.settings.price }}
<span class="featured-collection__strikePrice"
><s>€{{ block.settings.strikeThroughPrice }}</s></span
>
</p>
</div>
{% endfor %}
</div>
</div>

<script>
document.addEventListener('DOMContentLoaded', function() {
const tabs = document.querySelectorAll('.tab-link');
console.log('Tabs found:', tabs.length);
tabs.forEach(tab => {
tab.addEventListener('click', function(e) {
e.preventDefault();
console.log('Tab clicked:', this.innerText);
tabs.forEach(t => t.classList.remove('active'));
this.classList.add('active');
const category = this.getAttribute('data-category');
console.log('Filtering category:', category);
filterProducts(category);
});
document.addEventListener('DOMContentLoaded', function () {
const tabs = document.querySelectorAll('.featured-collection__tab-link');
console.log('Tabs found:', tabs.length);
tabs.forEach((tab) => {
tab.addEventListener('click', function (e) {
e.preventDefault();
console.log('Tab clicked:', this.innerText);
tabs.forEach((t) => t.classList.remove('active'));
this.classList.add('active');
const category = this.getAttribute('data-category');
console.log('Filtering category:', category);
filterProducts(category);
});
});
function filterProducts(category) {
const allProductCards = document.querySelectorAll('.product-card');
allProductCards.forEach(card => {
const isActive = category === 'all';
card.style.display = isActive || category === card.dataset.category ? 'inline-block' : 'none';
});
}
filterProducts('all');
});
const allProductCards = document.querySelectorAll('.featured-collection__product-card');
allProductCards.forEach((card) => {
const isActive = category === 'all';
card.style.display = isActive || category === card.dataset.category ? 'inline-block' : 'none';
});
}
filterProducts('all');
});
</script>


{% schema %}

{
"name": "Featured Collection",
"settings": [
Expand Down Expand Up @@ -154,9 +153,4 @@
}
]
}

{% endschema %}
{% javascript %}
{% endjavascript %}


28 changes: 14 additions & 14 deletions sections/video-text.liquid
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
<div class="video-text-section">
<div class="video-container">
<div class="video-text-section__video-container">
<!-- Video iframe with play icon -->
<div class="video-overlay">
<div class="video-text-section__video-overlay">
<iframe
src="{{ section.settings.frameVideoUrl }}"
frameborder="0"
allowfullscreen
></iframe>
<div class="play-icon-container">
<svg class="play-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<div class="video-text-section__play-icon-container">
<svg class="video-text-section__play-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M3 22v-20l18 10-18 10z"/>
</svg>
</div>
</div>
<!-- End Video iframe with play icon -->

<!-- Modal for the Main video -->
<div class="video-modal" id="videoModal">
<div class="video-text-section__video-modal" id="videoModal">
<iframe src="{{ section.settings.mainVideoUrl }}" frameborder="0" allowfullscreen></iframe>
<button class="close-modal" onclick="closeModal()">Close</button>
<button class="video-text-section__close-modal" onclick="closeModal()">Close</button>
</div>
</div>

<div class="text-content">
<div class="video-text-section__text-content">
<!-- Right half content -->
<h2>{{ section.settings.heading1 }}</h2>
<h3>{{ section.settings.heading2 }}</h3>
<p>{{ section.settings.paragraph }}</p>
<div class="link-section">
<a href="{{ section.settings.linkUrl }}">{{ section.settings.linkUrlText }}</a>
<h2 class="video-text-section__heading">{{ section.settings.heading1 }}</h2>
<h3 class="video-text-section__sub-heading">{{ section.settings.heading2 }}</h3>
<p class="video-text-section__paragraph">{{ section.settings.paragraph }}</p>
<div class="video-text-section__link-section">
<a href="{{ section.settings.linkUrl }}" class="video-text-section__link">{{ section.settings.linkUrlText }}</a>
</div>
</div>
</div>
Expand All @@ -47,8 +47,8 @@
window.scrollTo(0, scrollY);
}
document.querySelector('.play-icon-container').addEventListener('click', openModal);
document.querySelector('.close-modal').addEventListener('click', closeModal);
document.querySelector('.video-text-section__play-icon-container').addEventListener('click', openModal);
document.querySelector('.video-text-section__close-modal').addEventListener('click', closeModal);
});
</script>

Expand Down

0 comments on commit 9eb77c8

Please sign in to comment.