function getTrack(id,cb) {
var getParams = {
audios: id,
access_token: '***'
};
$.getJSON('https://api.vk.com/method/audio.getById', getParams, function (json) {
if (json.error !== undefined) {
var errorCode = json.error.error_code;
if (errorCode == 14) {
console.log('Captcha!');
} else if (errorCode == 6) {
console.log('Too many requests! Try again.');
return getTrack(id);
}
} else {
cb(json.response['0']);
}
});
}
$('.play , .download').click(function () {
var trackItem = $(this).parent('.track'),
trackId = trackItem.attr('data-id');
if (trackItem.attr('data-url') !== undefined) {
} else {
getTrack( trackId, function (id) {
console.log(id);
});
}
});
var concat = require('gulp-concat');
gulp.task('stylus', function() {
gulp.src('./assets/blocks/*/*.styl')
.pipe(plumber(configs.plumberError))
.pipe(sourcemaps.init())
.pipe(stylus())
.pipe(autoprefixer())
.pipe(concat('style.css'))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest(path.public + '/css'))
.pipe(reload(configs.allowStreamReload));
});
он не компилирует код из туторіала
Также интересует как правильно их собирать.
И что такое pug file, чем отличаеться от обичного jade?
стоит ли верстать такой лендинг, если это всего лишь тестовое задание?
в макете имеется 12-колоночная разметка, как для bootstrap. По слухам бустрап - это дурной тон. Как считаете, верстать на бутстрап или на чистом css?
<div class="row same-cols">
<div class="col-md-6 same-height">1</div>
<div class="col-md-6 same-height">1</div>
</div>
$('.same-cols').each(function(){
var height = 0,
cols = $(this).find('.same-height');
cols.each(function(){
if( $(this).innerHeight() > height ) height = $(this).innerHeight();
});
cols.css( 'height', height + 'px');
});