PageSourceSearch

https://www.isska.ch/wp-content/plugins/herzog-dupont/includes/mod…/hd-flipcard/js/hd-flipcard.js?ver=5.0.44

js isska.ch collected 2026-10-02 04:24:48 UTC 2,072 bytes, 78 lines download raw bytes

1/* Herzog Dupont for YOOtheme Pro Copyright (C) 2019-2026 Thomas Weidlich GNU GPL v3 */
2
3function setBackSize() {
4
5	let flipcards = document.querySelectorAll('.hd-flipcard'),
6		i = flipcards.length;
7
8	while (i--) {
9
10		let flipcard = flipcards[i],
11			front = flipcard.querySelector('.el-card'),
12			back = flipcard.querySelector('.el-card-back');
13
14		front.style.removeProperty('min-height');
15		back.style.removeProperty('height');
16
17
18		if (front.offsetHeight < back.offsetHeight) {
19			front.style.minHeight = back.offsetHeight + 'px';
20		} else {
21			back.style.height = '100%';
22		}
23
24	}
25
26}
27
28window.addEventListener('load', setBackSize);
29window.addEventListener('resize', setBackSize);
30
31UIkit.util.ready(() => {
32
33	UIkit.util.$$('.hd-flipcard').forEach(el => {
34
35		let evtType = 'mouse',
36			flipMode = el.dataset.flipmode,
37			flipModeTouch = el.dataset.flipmodetouch;
38
39		el.addEventListener('pointerenter', e => {
40			if (flipMode.includes('hover') && e.pointerType !== 'touch') {
41				e.currentTarget.classList.add('hd-flipcard-hover');
42			}
43		});
44
45		el.addEventListener('pointerleave', e => {
46			if (flipMode.includes('hover') && e.pointerType !== 'touch') {
47				e.currentTarget.classList.remove('hd-flipcard-hover');
48			}
49		});
50
51		el.addEventListener('click', e => {
52			if (flipMode.includes('click') && evtType !== 'touch' || flipModeTouch === 'tap' && evtType === 'touch') {
53				if (e.currentTarget.classList.contains('hd-flipcard-hover') && e.target.tagName !== 'A') {
54					e.currentTarget.classList.remove('hd-flipcard-hover');
55				} else {
56					e.currentTarget.classList.add('hd-flipcard-hover');
57				}
58			}
59			evtType = 'mouse';
60		});
61
62		el.addEventListener('touchstart', e => {
63			evtType = 'touch';
64			if (flipModeTouch.includes('press')) {
65				e.currentTarget.classList.add('hd-flipcard-hover');
66			}
67		});
68
69		el.addEventListener('touchend', e => {
70			evtType = 'touch';
71			if (flipModeTouch.includes('press')) {
72				e.currentTarget.classList.remove('hd-flipcard-hover');
73			}
74		});
75
76	});
77
78});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.