Added styles from production site

This commit is contained in:
2022-02-19 12:05:13 -05:00
parent cb3c8742a8
commit 523eb1f724
14 changed files with 292 additions and 14 deletions

View File

@ -1,2 +1,17 @@
$ ->
console.log('This is a test.')
$(window).scroll ->
wScroll = $(this).scrollTop()
console.log(wScroll + ' | ' + window.innerHeight)
# Header parallax
$('#header-logo').css('transform', 'translate(-50%, ' + (wScroll / 2) + 'px)')
$('#header-logo h1').css('transform', 'translateY(-' + (wScroll / 2) + 'px)')
# YouTube section parallax
if not (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))
$('.youtube-section').each (i, e) ->
if wScroll >= ($(e).offset().top - window.innerHeight)
offset = (Math.min(0, wScroll - $(e).offset().top + window.innerHeight - 500)).toFixed()
$(e).find('.video-card:first-child').css('transform': 'translate(' + offset + 'px, ' + Math.abs(offset * 0.2) + 'px)')
$(e).find('.video-card:last-child').css('transform': 'translate(' + Math.abs(offset) + 'px, ' + Math.abs(offset * 0.2) + 'px)')