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
ulp.task('sass', function(){ // Создаем таск "sass" | |
return gulp.src('app/sass/**/*.sass') // Берем источник | |
.pipe(sass()) // Преобразуем Sass в CSS посредством gulp-sass | |
.pipe(gulp.dest('app/css')) // Выгружаем результата в папку app/css | |
.pipe(browserSync.reload({stream: true})) // Обновляем CSS на странице при изменении | |
}); |
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
gulp.task('watch', ['browser-sync', 'sass'], function() { | |
gulp.watch('app/sass/**/*.sass', ['sass']); // Наблюдение за sass файлами | |
gulp.watch('app/*.html', browserSync.reload); | |
gulp.watch('app/js/**/*.js', browserSync.reload); | |
// Наблюдение за другими типами файлов | |
}); |
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
var gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
browserSync = require('browser-sync'); | |
gulp.task('sass', function(){ // Создаем таск "sass" | |
return gulp.src('app/sass/**/*.sass') // Берем источник | |
.pipe(sass()) // Преобразуем Sass в CSS посредством gulp-sass | |
.pipe(gulp.dest('app/css')) // Выгружаем результата в папку app/css | |
.pipe(browserSync.reload({stream: true})) // Обновляем CSS на странице при изменении | |
}); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<link rel="stylesheet" href="css/libs.min.css"> | |
<link rel="stylesheet" href="css/main.css"> <!-- Подключаем CSS --> | |
</head> | |
<body> | |
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
var gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
browserSync = require('browser-sync'), | |
concat = require('gulp-concat'),// Подключаем gulp-concat (для конкатенации файлов) | |
uglify = require('gulp-uglifyjs'),// Подключаем gulp-uglifyjs (для сжатия JS) | |
cssnano = require('gulp-cssnano'), // Подключаем пакет для минификации CSS | |
rename = require('gulp-rename');// Подключаем библиотеку для переименования файлов | |
del = require('del'),// Подключаем библеотеку для удаления файлов и папок | |
imagemin = require('gulp-imagemin'), | |
pngquant = require('imagemin-pngquant'), |
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() { | |
$(".loaderInner").fadeOut(); // прокрутка анимации при загрузке стрницы | |
$(".loader").delay(400).fadeOut("slow"); | |
}); |
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 hightDetect() { | |
$(".main_head").css("height", $(window).height());//масштабирование на всю высоту окна браузера | |
}; | |
hightDetect(); //масштабирование при изменении размера экрана | |
$(window).resaize(function() { | |
}); |
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
$(window).scroll(function(){ | |
if ($(this).scrollTop() > 100) { | |
$('.scrollup').fadeIn(); | |
} else { | |
$('.scrollup').fadeOut(); | |
} | |
}); | |
$('.scrollup').click(function(){ | |
$("html, body").animate({ scrollTop: 0 }, 600); |
OlderNewer