Skip to content

Instantly share code, notes, and snippets.

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

Maksim Vasyanovich maxdenaro

🏠
Working from home
View GitHub Profile
@maxdenaro
maxdenaro / base_settings.css
Last active February 25, 2021 21:13
base_settings.css
html {
box-sizing: border-box;
}
*,
*::before,
*::after {
box-sizing: inherit;
}
@maxdenaro
maxdenaro / html
Last active February 24, 2025 05:12
HTML Email Template
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>HTML Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
body {
width: 100% !important;
@maxdenaro
maxdenaro / accordion.js
Created August 17, 2019 22:46
jq-accordion
$('.accordion').accordion({
transitionSpeed: 400,
});
@maxdenaro
maxdenaro / wow.js
Created August 17, 2019 22:45
WOW.js Webpack
// !IMPORTANT: required wow.js
// npm i wowjs
const WOW = require('wowjs');
if ($(window).width() >= 1025) {
window.wow = new WOW.WOW({
live: false
});
@maxdenaro
maxdenaro / dis-scroll.html
Last active June 11, 2020 14:46
Disable scroll on mobile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="style.css">
<title>Document</title>
</head>
<body>
@maxdenaro
maxdenaro / common.js
Created August 4, 2019 18:06
Swipe jquery example (using swipe.js)
$('.modal__close').swipe({
swipe: function (event, direction, distance, duration, fingerCount, fingerData) {
if (direction == 'down') {
}
},
triggerOnTouchEnd: false,
threshold: 20 // сработает через 20 пикселей
@maxdenaro
maxdenaro / common.js
Created August 4, 2019 18:04
jQuery outerHTML
jQuery.fn.outerHTML = function () {
return jQuery('<div />').append(this.eq(0).clone()).html();
};
@maxdenaro
maxdenaro / check.css
Last active December 25, 2020 13:51
Custom policy checkbox
.policy-checkbox input {
display: none;
}
.policy-checkbox span {
position: relative;
display: inline-block;
padding-left: 30px;
}
@maxdenaro
maxdenaro / form.html
Created August 4, 2019 17:52
Base form HTML template
<form class="form">
<input type="hidden" name="project_name" value="nameOfSite">
<input type="hidden" name="admin_email" value="EmailForSending">
<input type="hidden" name="form_subject" value="SubjectOfMail">
<div class="input-form">
<input type="text" name="name" placeholder="Name">
</div>
<div class="input-form">
<input type="tel" name="phone" placeholder="Phone">
</div>
@maxdenaro
maxdenaro / filter.html
Created August 4, 2019 17:48
Filter on jQuery
<div class="filter">
<div class="filter__nav">
<ul class="filter__nav-group" data-filter-group="group">
<li><a href="#" class="button" data-filter=".group1">Группа1</a></li>
<li><a href="#" class="button" data-filter=".group2">Группа2</a></li>
<li><a href="#" class="button" data-filter=".group3">Группа3</a></li>
</ul>
<ul class="filter__nav-group" data-filter-group="season">
<li><a href="#" class="button" data-filter=".winter">Зима</a></li>
<li><a href="#" class="button" data-filter=".summer">Лето</a></li>