events page
This commit is contained in:
@@ -331,6 +331,10 @@
|
||||
|
||||
/**
|
||||
* scroll to next or previous section
|
||||
* Ex:
|
||||
* currElem = homeScroll(currElem, "prev")
|
||||
* currElem = homeScroll(currElem, "next")
|
||||
*
|
||||
* @param {jQuery} target put here currElem
|
||||
* @param {String} direction "next" of "prev"
|
||||
*/
|
||||
@@ -353,19 +357,26 @@
|
||||
if (nextelem.attr("class") == "misha_loadmore") {
|
||||
loadmore()
|
||||
return target
|
||||
} else if (isEsemeny) {
|
||||
offset = offset - (desktophomemargin)
|
||||
} else {
|
||||
//from the third wrap modify the offset
|
||||
var wNum = parseInt($(nextelem).attr("class").split(" ")[1].split("-")[2])
|
||||
var wNum = parseInt($(nextelem).attr("class").split(" ")[1].split("-")[1])
|
||||
console.log(wNum)
|
||||
if (wNum == 3 || !isHome) {
|
||||
offset = offset - (desktophomemargin / 2)
|
||||
offset = offset - (desktophomemargin /2 )
|
||||
} else if (wNum > 4 || !isHome) {
|
||||
offset = offset - desktophomemargin
|
||||
}
|
||||
}
|
||||
console.log("scrolling to: " + nextelem.attr("class") + " - offset: " + offset)
|
||||
$('html, body, .wrapper').stop().animate({ scrollLeft: offset }, 800, function () {
|
||||
|
||||
const scrollspeed = isEsemeny ? 500 : 800
|
||||
|
||||
|
||||
$('html, body, .wrapper').stop().animate({ scrollLeft: offset }, scrollspeed, function () {
|
||||
//hide the left arrow if on start
|
||||
if (nextelem.hasClass("home_wrapper-1")) {
|
||||
if (nextelem.is(selector + ':first-child')) {
|
||||
$(".header-scroll-left").hide()
|
||||
} else {
|
||||
$(".header-scroll-left").show()
|
||||
@@ -393,13 +404,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
const selector = 'main>#content>div'
|
||||
const selector = isEsemeny ? 'main>section>article' : 'main>#content>div'
|
||||
|
||||
var currElem = $(selector + ':first-child')
|
||||
|
||||
//checking the current scroll location for refresh:
|
||||
if (!isMobile) {
|
||||
if (isMasonryPage) {
|
||||
if (isMasonryPage || isEsemeny) {
|
||||
const homeDivWidths = []
|
||||
const homeFullWidths = []
|
||||
homeDivWidths[0] = 0
|
||||
@@ -426,7 +437,8 @@
|
||||
|
||||
|
||||
currElem = $(selector + ':nth-child(' + scrollnr + ')')
|
||||
if (currElem.hasClass("home_wrapper-1")) {
|
||||
|
||||
if (scrollnr == 1) {
|
||||
$(".header-scroll-left").hide()
|
||||
}
|
||||
|
||||
@@ -443,7 +455,7 @@
|
||||
$(window).on('wheel DOMMouseScroll', function (e) {
|
||||
//e.preventDefault();
|
||||
if (!isMobile) {
|
||||
if (isMasonryPage) {
|
||||
if (isMasonryPage || isEsemeny) {
|
||||
if (scrolltimer) {
|
||||
return false;
|
||||
}
|
||||
@@ -718,12 +730,9 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
if (isEsemeny) {
|
||||
|
||||
//add spaces to date
|
||||
// $(".event-metadata .ev-date").each(function () {
|
||||
// let repl = $(this).html().replace(/\.\b/g, ". ")
|
||||
// $(this).html(repl)
|
||||
// })
|
||||
if (!isMobile) {
|
||||
$('html').css({ overflowY: "hidden" })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -805,10 +814,10 @@
|
||||
// .removeClass("vis")
|
||||
// })
|
||||
|
||||
$('.wp-block-gallery .blocks-gallery-item, .wp-block-image').hover(function(){
|
||||
$('.wp-block-gallery .blocks-gallery-item, .wp-block-image').hover(function () {
|
||||
$(this).find("figcaption").addClass("vis")
|
||||
|
||||
},function(){
|
||||
|
||||
}, function () {
|
||||
$('.wp-block-gallery .vis, .wp-block-image .vis').removeClass("vis")
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user