Skip to content

Instantly share code, notes, and snippets.

View Nikolasgrizli's full-sized avatar
🏠
Working from home

Nikolay Evsukov Nikolasgrizli

🏠
Working from home
  • Ukraine
View GitHub Profile
background: linear-gradient(49deg, #070707, #5a615f, #4fddb4, #44f0be);
background-size: 800% 800%;
-webkit-animation: AnimationName 16s ease infinite;
-moz-animation: AnimationName 16s ease infinite;
-o-animation: AnimationName 16s ease infinite;
animation: AnimationName 16s ease infinite;
@-webkit-keyframes AnimationName {
0%{background-position:10% 0%}
@for $i from 1 through $n {
&:nth-child(#{$i}) {
animation: loadIn 2s #{$i*0.11}s $easeOutSine forwards;
}
}
@Nikolasgrizli
Nikolasgrizli / haml.json
Last active January 23, 2018 21:56
https://gist.github.com/akella/9757676 snippets ported for vscode HAML
{
"Block (with comment HAML)": {
"prefix": ".",
"body": [
"/ begin ${1}",
".${1}",
"\t${2}",
"/ end ${1}"
]
}
@Nikolasgrizli
Nikolasgrizli / js
Last active May 9, 2018 21:16
Окончание слова связанного с количеством
// html - <a href="'.$cart_url.'"><span class="cart-count">'.count($woo_cart_list).'</span><span class="end-count" id="end-count" >Товаров</span>в корзине</a>
(function($) {
$(document).ready(function(){
setTimeout(function() {
var numberCounter = $('.cart-count').text();
number = Math.abs(numberCounter);
function declOfNum(number, titles) {
cases = [2, 0, 1, 1, 1, 2];
@Nikolasgrizli
Nikolasgrizli / window-resize-end.js
Created March 19, 2018 05:34 — forked from agragregra/window-resize-end.js
Window resize-end function
//Resize Window
function onResize() {
};
var doit;
doit = setTimeout(onResize, 400);
window.onresize = function() {
clearTimeout(doit);
doit = setTimeout(onResize, 400);
};
$(".city-input").keyup(function() {
filter(this);
});
function filter(element) {
var value = $(element).val().toLowerCase();
$("[data-filter]").each(function () {
var $this = $(this),
lower = $this.data("filter").toLowerCase();
if (lower.indexOf(value) > -1) {
$this.show();
@Nikolasgrizli
Nikolasgrizli / scroll-next.js
Created March 19, 2018 05:37 — forked from agragregra/scroll-next.js
jQuery Scroll To Next Section
$(".scroll-next").click(function() {
var cls = $(this).closest(".section").next().offset().top;
$("html, body").animate({scrollTop: cls}, "slow");
});
@Nikolasgrizli
Nikolasgrizli / jquery-active.js
Created March 19, 2018 05:38 — forked from agragregra/jquery-active.js
jQuery Active Menu
//Active menu
$("li a").each(function() {
if (this.href == window.location.href) {
$(this).addClass("active");
}
});
@Nikolasgrizli
Nikolasgrizli / header_fadeout.js
Created March 19, 2018 05:43 — forked from agragregra/header_fadeout.js
jQuery Header Content FadeOut on Scroll
$(window).scroll(function() {
var st = $(this).scrollTop();
if($(window).height()+500 > $("header").height()) {
$("header .col-md-12").css({
"transform" : "translate3d(0px, " + st /18 + "%, 0px)",
"-webkit-transform" : "translate3d(0px, " + st /18 + "%, 0px)",
"opacity" : "1" - st/700
});
$(window).scroll(function() {
var st = $(this).scrollTop() /10;
$(".object").css({
"transform" : "translate3d(0px, " + st + "%, .01px)",
"-webkit-transform" : "translate3d(0px, " + st + "%, .01px)"
});
});