Commit ae718558 authored by Cristiano Silva's avatar Cristiano Silva
Browse files

Added Scroll Down action on homepage

parent ec4e89fa
Pipeline #1743 failed with stages
in 3 minutes and 7 seconds
......@@ -4,6 +4,7 @@ global-styling:
js/popper.min.js: {}
js/bootstrap.min.js: {}
js/global.js: {}
js/scrolldown.js: {}
css:
component:
css/style.css: {}
......
/**
* @file
* Global utilities.
*
*/
(function($, Drupal) {
'use strict';
Drupal.behaviors.bootstrap_barrio_subtheme = {
attach: function(context, settings) {
$('a[href^="#"]').on('click', function(e) {
// Make sure this.hash has a value before overriding default behavior
if (this.hash !== "") {
// Store hash
var hash = this.hash;
// Using jQuery's animate() method to add smooth page scroll
$('html, body').animate({
scrollTop: $(hash).offset().top -180}, 300, 'linear');
return false;
} // End if
});
}
};
})(jQuery, Drupal);
......@@ -45,5 +45,8 @@
// Responsive Optimization
@import "theme-styles/responsive";
// Scroll Down mouse
@import "theme-styles/util/scroll-down";
// Ripple effect for buttons & images
@import "theme-styles/util/ripple-effect";
\ No newline at end of file
......@@ -12,6 +12,10 @@
//background: yellow !important;
}
#scrolldown {
margin-top: 115px !important;
}
.home-community {
.view-header {
.view-header-titles {
......
/*
*
--- --- SCROLL DOWN MOUSE
*
*/
#scrolldown {
margin-top: 150px;
text-align: center;
}
#scrolldown a {
position: relative;
padding-top: 60px;
font: 600 11px/16px 'Inter', sans-serif;
color: #fff;
text-transform: uppercase;
}
#scrolldown a span {
position: absolute;
top: 0;
left: 50%;
width: 30px;
height: 50px;
margin-left: -15px;
border: 2px solid #fff;
border-radius: 50px;
box-sizing: border-box;
font-size: 0;
}
#scrolldown a span::before {
position: absolute;
top: 10px;
left: 50%;
content: '';
width: 6px;
height: 6px;
margin-left: -3px;
background-color: #fff;
border-radius: 100%;
-webkit-animation: sdb10 2s infinite;
animation: sdb10 2s infinite;
box-sizing: border-box;
}
@-webkit-keyframes sdb10 {
0% {
-webkit-transform: translate(0, 0);
opacity: 0;
}
40% {
opacity: 1;
}
80% {
-webkit-transform: translate(0, 20px);
opacity: 0;
}
100% {
opacity: 0;
}
}
@keyframes sdb10 {
0% {
transform: translate(0, 0);
opacity: 0;
}
40% {
opacity: 1;
}
80% {
transform: translate(0, 20px);
opacity: 0;
}
100% {
opacity: 0;
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment