This file contains hidden or 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
XXXXXXX - номер счетчика | |
TARGET_NAME - идентификатор цели | |
<script> | |
jQuery(document).ready(function ($) { | |
$('#buy').click(function () { | |
yaCounterXXXXXXX.reachGoal('TARGET_NAME '); | |
console.log('цель 1'); | |
}); |
This file contains hidden or 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 art_social_icons($item_url) { | |
$social_icons = apply_filters( 'art_social_icons', array( | |
'codepen.io' => 'codepen', | |
'digg.com' => 'digg', | |
'dribbble.com' => 'dribbble', | |
'dropbox.com' => 'dropbox', | |
'facebook.com' => 'facebook', | |
'flickr.com' => 'flickr', | |
'foursquare.com' => 'foursquare', |
This file contains hidden or 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 | |
RewriteCond %{HTTP:X-HTTPS} !1 | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] | |
#Вариант 2 | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteCond %{HTTP:X-Forwarded-Proto} !https | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
This file contains hidden or 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
var wrapURLs = function (text, new_window) { | |
var url_pattern = /(?:(?:https?|ftp):\/\/)?(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\x{00a1}\-\x{ffff}0-9]+-?)*[a-z\x{00a1}\-\x{ffff}0-9]+)(?:\.(?:[a-z\x{00a1}\-\x{ffff}0-9]+-?)*[a-z\x{00a1}\-\x{ffff}0-9]+)*(?:\.(?:[a-z\x{00a1}\-\x{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?/ig; | |
var target = (new_window === true || new_window == null) ? '_blank' : ''; | |
return text.replace(url_pattern, function (url) { | |
var protocol_pattern = /^(?:(?:https?|ftp):\/\/)/i; | |
var href = protocol_pattern.test(url) ? url : 'http://' + url; | |
return '<a href="' + href + '" target="' + target + '">' + url + '</a>'; | |
}); | |
}; |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> | |
</head> | |
<body> | |
<div class="container"> | |
<h1>MVVM</h1> |
This file contains hidden or 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
$('.tabs-list li').click(function() { | |
var tabName = $(this).attr('show-tab'); | |
$(this).addClass('active').siblings().removeClass('active'); | |
$('.tabs-content .' + tabName).addClass('active').siblings().removeClass('active'); | |
}); |
This file contains hidden or 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
label.radio | |
span.radio__text name | |
input(type="radio") | |
span.checkbox__custom | |
.radio { | |
display: block; | |
position: relative; | |
width: 100%; |
This file contains hidden or 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
.sandwich | |
.sandwich__line.sandwich__line--top | |
.sandwich__line.sandwich__line--middle | |
.sandwich__line.sandwich__line--bottom | |
.sandwich { | |
cursor: pointer; | |
display: none; | |
height: 20px; | |
position: relative; |
This file contains hidden or 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
absolute-center() | |
position absolute | |
top 50% | |
left 50% | |
transform translate(-50%,-50%) | |
absolute-all(num) | |
position absolute | |
top num | |
bottom num |
This file contains hidden or 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 headerScroll() { | |
if ($(window).scrollTop() > 150) { | |
$('header').addClass('slicky'); | |
} else { | |
$('header').removeClass('slicky'); | |
} | |
} | |
headerScroll(); |