Skip to content

Instantly share code, notes, and snippets.

View kovtunos's full-sized avatar

Andrey Kovtun kovtunos

View GitHub Profile
@kovtunos
kovtunos / _drop_shadow_alpha.css
Last active July 28, 2016 07:39
Drop shadow on image with alpha channel #css
img {
filter: drop-shadow(0 0 20px #222);}
}
@kovtunos
kovtunos / _pug_while.pug
Last active December 6, 2018 13:53
Pug while cycle #pug
- var n = 1
while n <= 6
.item
img(src="images/screenshot-" + n++ + ".png")
@kovtunos
kovtunos / scroll-to-id.js
Last active September 29, 2017 13:58
Smooth scroll to section id #jquery
$('.scroll').on('click', 'a', function(event) {
event.preventDefault();
let id = $(this).attr('href');
let top = $(id).offset().top;
$('body, html').animate({
scrollTop: top
}, 500);
});
@kovtunos
kovtunos / page-preloader.html
Last active September 29, 2017 14:26
Page preloader #jquery #html #css
<!-- html inline -->
<style>
body {
overflow: hidden;
}
#preloader {
background-color: #fff;
bottom: 0;
left: 0;
@kovtunos
kovtunos / _simple_slideshow.js
Created August 15, 2016 17:36
Simple slideshow #jquery
$(window).load(function() {
// Simple slideshow
var i = 0;
var images = [
'../img/slideshow-2.jpg',
'../img/slideshow-3.jpg',
'../img/slideshow-4.jpg',
'../img/slideshow-5.jpg',
'../img/slideshow-6.jpg',
'../img/slideshow-7.jpg',
@kovtunos
kovtunos / _sticky_header.js
Last active November 10, 2016 23:14
Simple sticky header #jquery
// CSS
.sticky {
position: fixed;
left: 0;
top: 0;
z-index: 1000;
width: 100%;
}
// JS
@kovtunos
kovtunos / mobile_menu.scss
Last active November 27, 2016 21:36
Mobile menu button with animation #sass #jquery
// SCSS
$menu-bars-color: #000;
%span-menu {
backface-visibility: hidden;
background-color: $menu-bars-color;
border-radius: 2px;
height: 4px;
transition: all .3s;
@kovtunos
kovtunos / list.pug
Created September 7, 2016 06:04
Each item in list #pug
each item in list
li item
HTML:
<div class="wrapper">
<div class="tabs">
<span class="tab">Вкладка 1</span>
<span class="tab">Вкладка 2</span>
<span class="tab">Вкладка 3</span>
</div>
<div class="tab_content">
<div class="tab_item">Содержимое 1</div>
<div class="tab_item">Содержимое 2</div>
@kovtunos
kovtunos / underline_title.css
Created October 5, 2016 07:06
Underline element with #css
h1 {
position: relative;
}
h1:after {
content: '';
display: block;
background: black;
height: 1px;
max-width: 50px;