Skip to content

Instantly share code, notes, and snippets.

View evgeniy-vashchuk's full-sized avatar

Front-End Dev. evgeniy-vashchuk

View GitHub Profile
// input text
[text* name class:form-control id:name placeholder "Name"]
// input phone
[tel phone class:form-control placeholder "Phone"]
// input email
[email* email class:form-control placeholder "Email"]
// select
[select* department data-placeholder:Department class:form-control class:js-select include_blank "Logistic & operation" "Brand management" "Marketing it & tech" "Product development & Innovation" "Legal" "Compliance" "Procurement" "Sales" "Strategy & planning" "Other"]
// textarea
[textarea message x1 class:form-control placeholder "Message"]
.slick-with-flex {
.slick-track {
display: flex;
}
.slick-slide {
display: flex;
height: auto;
> div {
@evgeniy-vashchuk
evgeniy-vashchuk / bootstrap-spacers.scss
Last active June 12, 2023 12:48
Bootstrap spacers
// with 4x range
$spacers: (
0: 0,
4: 4px,
8: 8px,
12: 12px,
16: 16px,
20: 20px,
24: 24px,
28: 28px,
// FANCYBOX CSS ERROR FIX ------------------------------------
@function max($numbers...) {
@return m#{a}x(#{$numbers});
}
@function min($numbers...) {
@return m#{i}n(#{$numbers});
}
@evgeniy-vashchuk
evgeniy-vashchuk / gist:6ae08328c5489c9930945c4611cb37c0
Created May 2, 2020 10:08
YITH WooCommerce Subscription with Fee
$product = wc_get_product(get_field('section_buy_id_of_the_product'));
$productPrice = yit_get_prop( $product, '_ywsbs_fee') + $product->get_price();
@evgeniy-vashchuk
evgeniy-vashchuk / Pug button mixin
Created February 13, 2020 16:42
Pug button mixin
//- +roundBtn({
//- href: "#",
//- size: "lg",
//- color: "outline-yellow",
//- alignment: "right",
//- text: "Explore",
//- modalTarget: "#orderInspectionFormModal",
//- buttonSubmit: false
//- })
background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), #333257), linear-gradient(to bottom, rgba(239,190,72,0.1) 0%, rgba(255,0,0,0) 100%), linear-gradient(to right, rgba(255,0,0,0), rgba(239,190,72,0.2) 50%, rgba(255,0,0,0) 100%);
@evgeniy-vashchuk
evgeniy-vashchuk / initNavigationActiveClassOnScroll.js
Last active February 4, 2020 13:06
Active class to menu on scroll
function initNavigationActiveClassOnScroll() {
function addActiveClass() {
var headerOffset = $('.js-header').outerHeight(),
scrollPos = $(document).scrollTop() + (headerOffset === undefined ? 0 : headerOffset),
navigationLinkItems = $('.js-navigation a');
navigationLinkItems.each(function() {
var currLink = $(this),
target = currLink.attr('data-section-target'),
targetElement = $('#' + target + '');
@evgeniy-vashchuk
evgeniy-vashchuk / cloudSettings
Last active August 8, 2021 11:48
vs code cloudSettings
{"lastUpload":"2021-08-08T11:48:11.186Z","extensionVersion":"v3.4.3"}
// video thumbnail
function initVideoThumbnail() {
function detectVideoHosting(url) {
var videoHosting = '';
if (url.indexOf('youtube') >= 0) {
videoHosting = 'youtube';
} else if (url.indexOf('vimeo') >= 0) {
videoHosting = 'vimeo';