Skip to content

Instantly share code, notes, and snippets.

View korney197823's full-sized avatar

Kornienko Denis korney197823

  • Russia
View GitHub Profile
@korney197823
korney197823 / common.js
Created July 2, 2018 11:42 — forked from mephistorine/common.js
Humburger menu
$('.toggle-menu').click(function(){
$(this).toggleClass('active');
});
@korney197823
korney197823 / common.js
Created July 2, 2018 11:42 — forked from mephistorine/common.js
Humburger menu
$('.toggle-menu').click(function(){
$(this).toggleClass('active');
});
@mixin for-size($range) {
$phone-upper-boundary: 600px;
$tablet-portrait-upper-boundary: 900px;
$tablet-landscape-upper-boundary: 1200px;
$desktop-upper-boundary: 1800px;
@if $range == phone-only {
@media (max-width: #{$phone-upper-boundary - 1}) { @content; }
} @else if $range == tablet-portrait-up {
@media (min-width: $phone-upper-boundary) { @content; }
@korney197823
korney197823 / clearfix.css
Created October 27, 2017 08:34 — forked from ucheng/clearfix.css
clearfix
.clearfix:before,
.clearfix:after {
content: " ";
display: table;
}
.clearfix:after {
clear: both;
}
@korney197823
korney197823 / chechbox.pug
Last active February 18, 2017 12:38
Кастомный чекбокс
.form-login__group
input.form-login__input-checkbox(name="human" type="checkbox" id="human")
label.form-login__label-checkbox(for="human") Я человек
@korney197823
korney197823 / texthidden
Created February 16, 2017 10:43
Способы скрытия текста
.p {
text-indent: -1000px;
overflow: hidden;
}
p. {
font-size: 0;
}
@korney197823
korney197823 / gh-pages-deploy.md
Created February 14, 2017 12:58 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@korney197823
korney197823 / app.js
Created February 12, 2017 18:21
anchor scroll 2
$(function(){
$('a[href^="#"]').on('click', function(event) {
// отменяем стандартное действие
event.preventDefault();
let sc = $(this).attr("href"),
dn = $(sc).offset().top;
/*
* sc - в переменную заносим информацию о том, к какому блоку надо перейти
* dn - определяем положение блока на странице
@korney197823
korney197823 / app.js
Created February 12, 2017 18:11
Скролл по якорям jquery
$('a[href^="#"]').click(function() {
let target = $(this).attr('href');
$('html, body').animate({scrollTop: $(target).offset().top}, 800);//800 - длительность скроллинга в мс
return false;
});
@korney197823
korney197823 / JavaScript-Tabs.js
Last active February 1, 2017 10:47 — forked from Jiert/JavaScript-Tabs.js
Creating Tabs with Vanilla JavaScript
<!DOCTYPE html>
<html lang="en">
<head>
<title>Tabs</title>
<style>
.nav .active a { color: red; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
</style>
</head>