This commit is contained in:
Roman Pyrih
2025-08-05 15:41:08 +02:00
parent 807c9b262f
commit e374c3c489
41 changed files with 599 additions and 16 deletions

View File

@@ -0,0 +1,16 @@
.swiper-pagination.swiper-pagination-bullets .swiper-pagination-bullet {
border-radius: 2px;
width: 10px;
transition: all 250ms ease-in-out;
}
.swiper-pagination.swiper-pagination-bullets .swiper-pagination-bullet:hover {
background: var(--e-n-carousel-dots-normal-color);
}
.swiper-pagination.swiper-pagination-bullets .swiper-pagination-bullet-active {
width: 40px;
}
.parallax-box {
height: 480px;
overflow: hidden;
}/*# sourceMappingURL=custom.css.map */

View File

@@ -0,0 +1 @@
{"version":3,"sources":["custom.scss","custom.css"],"names":[],"mappings":"AAEE;EACC,kBAAA;EACA,WAAA;EACA,iCAAA;ACDH;ADGG;EACC,iDAAA;ACDJ;ADIE;EACC,WAAA;ACFH;;ADOA;EACC,aAAA;EACA,gBAAA;ACJD","file":"custom.css"}

View File

@@ -0,0 +1,21 @@
.swiper-pagination {
&.swiper-pagination-bullets {
.swiper-pagination-bullet {
border-radius: 2px;
width: 10px;
transition: all 250ms ease-in-out;
&:hover {
background: var(--e-n-carousel-dots-normal-color);
}
}
.swiper-pagination-bullet-active {
width: 40px;
}
}
}
.parallax-box {
height: 480px;
overflow: hidden;
}

View File

@@ -0,0 +1,23 @@
jQuery(function ($) {
$(window).on('scroll', function () {
$('.parallax-box').each(function () {
var box = $(this)
var img = box.find('.parallax-box-img')
var boxTop = box.offset().top
var boxHeight = box.outerHeight()
var scrollTop = $(window).scrollTop()
var windowHeight = $(window).height()
if (scrollTop + windowHeight > boxTop && scrollTop < boxTop + boxHeight) {
var percentSeen =
(scrollTop + windowHeight - boxTop) / (windowHeight + boxHeight)
percentSeen = Math.min(Math.max(percentSeen, 0), 1)
var translateY = (percentSeen - 0.5) * 400
img.css('transform', 'translateY(' + translateY + 'px)')
}
})
})
})

View File

@@ -271,3 +271,24 @@ if ( ! function_exists( 'hello_elementor_body_open' ) ) {
require HELLO_THEME_PATH . '/theme.php';
HelloTheme\Theme::instance();
function my_custom_styles() {
wp_enqueue_style(
'custom-style',
get_template_directory_uri() . '/assets/css/custom.css',
array(),
filemtime(get_template_directory() . '/assets/css/custom.css')
);
}
add_action('wp_enqueue_scripts', 'my_custom_styles');
function my_custom_js() {
wp_enqueue_script(
'custom-script',
get_template_directory_uri() . '/assets/js/custom.js',
array('jquery'),
filemtime(get_template_directory() . '/assets/js/custom.js'),
true
);
}
add_action('wp_enqueue_scripts', 'my_custom_js');