Skip to content

Instantly share code, notes, and snippets.

View maxcraftsman's full-sized avatar
🎯
Focusing

Maxim Tatarinov maxcraftsman

🎯
Focusing
View GitHub Profile
@maxcraftsman
maxcraftsman / hamburger.scss
Last active May 6, 2019 05:23
hamburger animate icon
.hamburger-ico {
position: relative;
display: flex;
align-items: center;
z-index: 100;
line-height: 70px;
width: 20px;
height: 20px;
overflow: hidden;
margin-right: 15px;
function displayCalc(e){
catetA = document.documentElement.clientWidth;
catetB = document.documentElement.clientHeight;
gipotenuza = Math.sqrt(Math.pow(catetA,2)+Math.pow(catetB,2));
alpha = Math.asin(catetB/gipotenuza);
degrees = alpha * 180 / Math.PI;
$("#top-cover, #bottom-cover").css('transform','rotate(-'+ degrees +'deg)');
var all = document.getElementsByTagName("*");
}
Pace.on('start',function(){
@maxcraftsman
maxcraftsman / checkbox.html
Last active April 11, 2018 05:21
Checkboxes styles
<div class="input-line">
<input id="checkbox" type="checkbox">
<label for="checkbox"><span></span>Для всех типов</label>
</div>
<style>
.input-line input[type="radio"] + label span {
border: 1px solid #c6c6c6;
border-radius: 50%;
width: 16px;
height: 16px;
@maxcraftsman
maxcraftsman / input-placeholder.html
Last active April 11, 2018 06:17
Animated input placeholder
<label class="reverse-input">
<input type="text" placeholder="" required="">
<em>Фамилия и имя</em>
</label>
<style>
.reverse-input {
display: flex;
flex-direction: column;
& em {
padding: 0 5px;
@maxcraftsman
maxcraftsman / table-data.html
Last active April 11, 2018 08:16
Adaptive table styles
<div class="table">
<div class="table__tbody white-box">
<div class="table__tbody_inner" id="table-data">
<div class="table__row table__row_head">
<div class="table__cell">№</div>
<div class="table__cell">Имя</div>
<div class="table__cell">Страна</div>
<div class="table__cell">Дата посещения</div>
</div>
<div class="table__row">
@maxcraftsman
maxcraftsman / number-count-input.html
Last active April 16, 2018 01:14
Input number with plus/minus buttons [html,sass]
<div class="number-input">
<button type="button" onclick="this.parentNode.querySelector('input[type=number]').stepDown()"></button>
<input class="quantity" min="0" name="quantity" value="1" type="number">
<button type="button" onclick="this.parentNode.querySelector('input[type=number]').stepUp()" class="plus"></button>
</div>
<style>
.number-input {
display: inline-flex;
width: 80px;
height: 30px;
@maxcraftsman
maxcraftsman / zurb-js-bp.js
Last active April 16, 2018 01:13
foundation javascript breakpoints [js]
$(window).on('changed.zf.mediaquery', function(event, newSize, oldSize) {
modal();
})
modal();
function modal(){
if (Foundation.MediaQuery.is('large') == true) {
alert('large');
} else if (Foundation.MediaQuery.is('medium') == true) {
alert('medium');
} else {
<section class="section_default container">
<h3 class="underlined">Запчасти</h3>
<div class="text-fw f20">Подберите самостоятельно нужные Вам комплектующие запчасти<br>или <a data-toggle="orderModal" class="link">оставьте нам заявку</a>!</div>
<form action="" class="find-gears" id="findGears">
<select name="brand" id="selectBrand" placeholder="Бренд трактора" required>
<option></option>
<option value="1">Бренд 1</option>
<option value="dva">Бренд 2</option>
<option value="3tri">Бренд 3</option>
<option value="4">Бренд 4</option>
@maxcraftsman
maxcraftsman / PackMenu.js
Created May 24, 2018 08:02
adaptive menu
function PackMenu(){
var menu = '#adaptive-menu';
$("#ext-menu").hide();
$(menu).append($("#ext-menu .ext-menu>li"));
while($(menu + ">li:last").position().top > $(menu).position().top){
$("#ext-menu .ext-menu").prepend($(menu + ">li:last"));
$("#ext-menu").show();
};
}
$(window).on("resize", function() {
@maxcraftsman
maxcraftsman / select2-scroll.css
Last active September 26, 2024 17:52
select2 scrollbar styles
.select2-results__options::-webkit-scrollbar {
width: 16px;
background-clip: padding-box;
}
.select2-results__options::-webkit-scrollbar-track {
background-color: #F4F4F4;
height: 8px;
background-clip: padding-box;
border-right: 10px solid rgba(0, 0, 0, 0);
border-top: 10px solid rgba(0, 0, 0, 0);