This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="cd-modal" data-modal="modal-trigger"> | |
<div class="cd-svg-bg" | |
data-step1="M-59.9,540.5l-0.9-1.4c-0.1-0.1,0-0.3,0.1-0.3L864.8-41c0.1-0.1,0.3,0,0.3,0.1l0.9,1.4c0.1,0.1,0,0.3-0.1,0.3L-59.5,540.6 C-59.6,540.7-59.8,540.7-59.9,540.5z" | |
data-step2="M33.8,690l-188.2-300.3c-0.1-0.1,0-0.3,0.1-0.3l925.4-579.8c0.1-0.1,0.3,0,0.3,0.1L959.6,110c0.1,0.1,0,0.3-0.1,0.3 L34.1,690.1C34,690.2,33.9,690.1,33.8,690z" | |
data-step3="M-465.1,287.5l-0.9-1.4c-0.1-0.1,0-0.3,0.1-0.3L459.5-294c0.1-0.1,0.3,0,0.3,0.1l0.9,1.4c0.1,0.1,0,0.3-0.1,0.3 l-925.4,579.8C-464.9,287.7-465,287.7-465.1,287.5z" | |
data-step4="M-329.3,504.3l-272.5-435c-0.1-0.1,0-0.3,0.1-0.3l925.4-579.8c0.1-0.1,0.3,0,0.3,0.1l272.5,435c0.1,0.1,0,0.3-0.1,0.3 l-925.4,579.8C-329,504.5-329.2,504.5-329.3,504.3z" | |
data-step5="M341.1,797.5l-0.9-1.4c-0.1-0.1,0-0.3,0.1-0.3L1265.8,216c0.1-0.1,0.3,0,0.3,0.1l0.9,1.4c0.1,0.1,0,0.3-0.1,0.3L341.5,797.6 C341.4,797.7,341.2,797.7,341.1,797.5z" | |
data-step6="M476.4,1013.4L205,580.3c-0.1-0.1,0-0.3,0.1-0.3L1130.5,0.2c0.1-0.1,0.3,0,0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* gradient */ | |
@mixin gradient($from: #000, $to: #fff) { | |
background-color: $from; | |
background-image: -webkit-gradient(linear, left top, left bottom, from($from), to($to)); | |
background-image: -webkit-linear-gradient(top, $from, $to); | |
background-image: -moz-linear-gradient(top, $from, $to); | |
background-image: -o-linear-gradient(top, $from, $to); | |
background-image: linear-gradient(to bottom, $from, $to); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm dash -v | |
npm i -g gulp (global install gulp to the system) | |
Project folder: | |
npm init | |
npm i -D gulp gulp-plumber gulp-rename gulp-sass gulp-csso gulp-concat-css gulp-postcss autoprefixer css-mqpacker gulp-uglify browser-sync gulp-svgstore gulp-svgmin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"" + 1 + 0 // "10" Оператор "+" в данном случае прибавляет 1 как строку, и затем 0. | |
"" - 1 + 0 // -1 Оператор "-" работает только с числами, так что он сразу приводит "" к 0. | |
true + false // 1 | |
6 / "3" // 2 | |
"2" * "3" // 6 | |
4 + 5 + "px" // "9px" | |
"$" + 4 + 5 // "$45" | |
"4" - 2 // 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Media queries | |
var handleMatchMedia = function (mediaQuery) { | |
if (mediaQuery.matches) { | |
$('.platform-feature.slideInDown').removeClass('slideInDown').addClass('slideInLeft'); | |
$('.platform-feature.slideInUp').removeClass('slideInUp').addClass('slideInRight'); | |
} | |
}; | |
mql = window.matchMedia('all and (max-width: 594px)'); | |
handleMatchMedia(mql); | |
mql.addListener(handleMatchMedia); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$whatever=$_POST['whatever']; | |
$username=$_POST['username']; | |
$phone=$_POST['phone']; | |
$message = " | |
Имя формы: ".htmlspecialchars($whatever)."<br /> | |
Имя пользователя: ".htmlspecialchars($username)."<br /> | |
Телефон: ".htmlspecialchars($phone); | |
require_once('prod/vendor/phpmailer/PHPMailerAutoload.php'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Markup | |
<nav> | |
<ul class="nav"> | |
<li><a href="#main" class="nav__link">Home</a></li> | |
<li><a href="#about" class="nav__link">About</a></li> | |
<li><a href="#" class="nav__link">Contacts</a></li> | |
<li><a href="#" class="nav__link">Portfolio</a></li> | |
<li><a href="#" class="nav__link">Feeback</a></li> | |
</ul> | |
<button class="hamburger hamburger--elastic" type="button"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
var sectionHeight = $('#section-1').height(); // current section height | |
$(window).scroll(function(event) { // scroll event | |
var top = $(this).scrollTop(); // px from top | |
if (top == sectionHeight) { // when length from top equals current section height, we load new sections | |
$('.container').load('./sections.html #section-2'); // only second section | |
$('.container').load('./sections.html'); // or ALL section from section.html | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
var userName = $('form input').val(); | |
$.ajax({ | |
url: './send.php', | |
type: 'GET', | |
dataType: 'html', | |
data: {name: userName}, | |
}) | |
.done(function(data) { | |
console.log(data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Youtube fluid | |
// Find all YouTube videos | |
var $allVideos = $("iframe[src^='//www.youtube.com']"), | |
$fluidEl = $(".process__video"); // video-container (change it) | |
$allVideos.each(function() { | |
$(this) | |
.data('aspectRatio', this.height / this.width) | |
.removeAttr('height') | |
.removeAttr('width'); | |
}); |
OlderNewer