Skip to content

Instantly share code, notes, and snippets.

$left: 129px, 394px, 137px;
@each $item in $width {
$i: index($width, $item);
.pig#{$i - 1} {
width: $item;
height: nth($height, $i);
left: nth($left, $i);
top: nth($top, $i);
}
}
$(function() {
$('a[href*="#"]:not([href="#"])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html, body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
var getPictureElement = function(data, container) {
formFilters.classList.remove('hidden');
var element = elementToClone.cloneNode(true);// error Expected indentation of 2 space characters but found 0 indent
var elemImg = element.querySelector('img');
element.querySelector('.picture-comments').textContent = data.comments;
element.querySelector('.picture-likes').textContent = data.likes;
container.appendChild(element);
var elemImgData = new Image();// error Expected indentation of 2 space characters but found 0 indent
var browserCookies = require('./browser-cookies.js');
/**
* Функция сохранения в cookies последний выбранный фильтр:
* «Оригинал», «Хром» или «Сепия»
*/
function saveSelectFilter() {
var selectFilter = document.querySelector('.upload-filter-controls input:checked');
var dateToExpires = new Date(Date.now() + getTimeNearBirthDay()).toUTCString();
browserCookies.setItem('filter', selectFilter.value, dateToExpires); //ругается нет функции setItem
}
@mixin open-sans($style:regular){
font-family: 'Open Sans';
@if ($style==light){
font-weight: 100;
}
@if ($style==regular){
font-weight: 400;
}
@if ($style==semibold){
/* compass sprites end*/
@mixin inlineblock($valine:top){
display: inline-block;
vertical-align: $valine;
}
@mixin forul{
padding: 0;
margin: 0;
list-style: none;
}
@mixin get-sprite ($map, $icon){
$sprite-image: sprite-file($map, $icon);
$sprite-map: sprite-url($map);
$sprite-position: sprite-position($map, $icon);
background: $sprite-map $sprite-position no-repeat;
$sprite-height: image-height($sprite-image);
$sprite-width: image-width($sprite-image);
/*! normalize.css v1.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 6/7/8/9 and Firefox 3.
*/
@Taova
Taova / mixin.jade
Last active October 25, 2015 13:41
mixin nav(className, items, activeInd)
nav(class=className)
ul(class=className + "__lyst")
each item, indx in items
li(class=className + "__item"+((activeInd==indx) ? className +"__item"+"active": ""))
a(href="#" class=className + "__link")= item
//+nav("minor", ["Планшеты", "Мобильные телефоны", "Мр3 плееры", "Персональные компьютеры"], 1)
{
"name": "dz2",
"devDependencies": {
"browser-sync": "^2.9.11",
"gulp": "^3.9.0",
"gulp-compass": "^2.1.0",
"gulp-jade": "^1.1.0",
"gulp-plumber": "^1.0.1"
}
}