This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.products-slider { | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
width: 672px; | |
height: 672px; | |
border-radius: 50%; | |
overflow: hidden; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section class="main-slider"> | |
<div id="hero-slider"> | |
{% for block in section.blocks %} | |
{% case block.type %} | |
{% when 'image_slide' %} | |
<div> | |
<div class="main-slider__slide main-slider__slide--image" {% if block.settings.image != blank %} style="background-image: url({{ block.settings.image | img_url: "2000x" }})" {% endif %}> | |
<div class="main-slider__content"> | |
{% if block.settings.slide_title != blank %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="collection__main"> | |
<!-- COLLECTION SIDEBAR --> | |
{%- capture categories -%} | |
{%- for tag in collections[collection.handle].tags -%} | |
{%- if tag contains 'categories' -%} | |
{%- assign tag_patterns = tag | split: '_' -%} | |
<li class="collection-sidebar__filter-item main-filter" data-tag="{{ tag | handle }}">{{ tag_patterns[1] }}</li> | |
{%- endif -%} | |
{%- endfor -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} | |
!!! IMPORTANT !!! - the date variables CACHED ON LIVE THEME and DON'T CHANGE AFTER PAGE RELOAD. | |
{% endcomment %} | |
{% assign min = 0 %} | |
{% assign max = try_collection.all_products_count %} | |
{% assign diff = max | minus: min %} | |
{% assign timestamp = "today" | date: "%s" | plus: 0 %} | |
{% assign randomNumber = timestamp | modulo: diff | plus: min %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.video-html { | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
min-width: 100%; | |
min-height: 100%; | |
width: auto; | |
height: auto; | |
z-index: 0; | |
transform: translateX(-50%) translateY(-50%); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Prevent body scroll (try fixed issue on IOS) | |
var freezeVp = function(e) { | |
e.preventDefault(); | |
}; | |
function stopBodyScrolling (bool) { | |
if (bool === true) { | |
document.body.addEventListener("touchmove", freezeVp, false); | |
console.log(222); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
validateInputOnNumberKeyPress($('input[type="number"]')); | |
function validateInputOnNumberKeyPress(input) { | |
input.keypress(function (e) { | |
if (e.which != 8 && e.which != 0 && e.which != 13 && (e.which < 48 || e.which > 57)) { | |
return false; | |
} | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Scroll to top | |
/* | |
* When you click and animation start, if you scroll with mouse, keybord hotkeys in same moment - animation will stop. | |
/* | |
$(".scroll-top-class").click(function(e) { | |
e.preventDefault(); | |
$('html, body').on("scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove", function(){ | |
$('html, body').stop(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('html, body').on("scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove", function () { | |
$('html, body').stop(); | |
}); | |
$('html, body').animate({ | |
scrollTop: $('.news-full').offset().top | |
}, 600, function() { | |
console.log('popa'); | |
$('html, body').off("scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove"); | |
}); |
NewerOlder