Skip to content

Commit

Permalink
bootstrap y dependencias
Browse files Browse the repository at this point in the history
  • Loading branch information
reiaguilera committed Nov 27, 2019
1 parent 3878d08 commit 0fc0b48
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 0 deletions.
6 changes: 6 additions & 0 deletions css/bootstrap.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions css/bootstrap.min.css.map

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use strict';

const gulp = require('gulp');
const sass = require('gulp-sass');
const htmlmin = require('gulp-htmlmin');
const autoprefixer = require('gulp-autoprefixer');

gulp.task('sass', function () {
return gulp.src('./src/sass/style.scss')
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
.pipe(gulp.dest('./'));
});

gulp.task('minify', function() {
return gulp.src('./src/index.html')
.pipe(htmlmin({collapseWhitespace: true, minifyJS: true}))
.pipe(gulp.dest('./'));
});
7 changes: 7 additions & 0 deletions js/bootstrap.min.js

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions js/custom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
$(document).ready(function () {
// Select all links with hashes
$('a[href*="#"]')
// Remove links that don't actually link to anything
.not('[href="#"]')
.not('[href="#0"]')
.click(function (event) {
// On-page links
if (
location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '')
&&
location.hostname === this.hostname
) {
// Figure out element to scroll to

var target = $(this.hash);

target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
// Does a scroll target exist?
if (target.length) {
// Only prevent default if animation is actually gonna happen

event.preventDefault();
history.replaceState(null, null, document.location.pathname + this.hash);

$('html, body').animate({
scrollTop: target.offset().top
}, 600, function () {
// Callback after animation
// Must change focus!
var $target = $(target);
//$target.focus();
if ($target.is(':focus')) { // Checking if the target was focused
return false;
} else {
$target.attr('tabindex', '-1'); // Adding tabindex for elements not focusable
//$target.focus(); // Set focus again
}
});
}
}
});
});
4 changes: 4 additions & 0 deletions js/jquery-3.2.1.min.js

Large diffs are not rendered by default.

0 comments on commit 0fc0b48

Please sign in to comment.