| |
| <!DOCTYPE html>
|
| <html lang="en">
|
| <head>
|
| <meta charset="UTF-8">
|
| <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| <title>MyOnlyTab Value Cards</title>
|
| <style>
|
|
|
| :root {
|
| --privacy-color: #e9f0fa;
|
| --privacy-accent: #007AFF;
|
| --instant-color: #f0e9fa;
|
| --instant-accent: #5856D6;
|
| --premium-color: #fff8e6;
|
| --premium-accent: #FF9500;
|
| --green-color: #e8f7ed;
|
| --green-accent: #34C759;
|
| --card-radius: 20px;
|
| --card-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
|
| --card-hover-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
|
| --transition-speed: 0.4s;
|
| --card-hover-bg: #ffffff;
|
| --card-hover-text: #333333;
|
| --mobile-breakpoint: 768px;
|
| --desktop-breakpoint: 1024px;
|
| }
|
|
|
|
|
| .myonlytab-cards-wrapper {
|
| box-sizing: border-box;
|
| }
|
|
|
|
|
| .card-hover-active {
|
| background-color: var(--card-hover-bg, #ffffff) !important;
|
| color: var(--card-hover-text, #333333) !important;
|
| }
|
|
|
| .myonlytab-cards-container {
|
| display: flex;
|
| gap: 26px;
|
| margin: 0 auto;
|
| overflow-x: auto;
|
| overflow-y: hidden;
|
| padding: 8px 8px 24px;
|
| scroll-behavior: smooth;
|
| scroll-snap-type: x mandatory;
|
| -webkit-overflow-scrolling: touch;
|
| scrollbar-width: none;
|
| -ms-overflow-style: none;
|
| overscroll-behavior-x: contain;
|
| overscroll-behavior-y: none;
|
| width: 100%;
|
| transform: translateZ(0);
|
|
|
| contain: layout style;
|
| backface-visibility: hidden;
|
| }
|
|
|
| .myonlytab-cards-container::-webkit-scrollbar {
|
| display: none;
|
| }
|
|
|
| .myonlytab-card {
|
| background-position: center;
|
| border-radius: var(--card-radius, 20px);
|
| box-shadow: var(--card-shadow, 0 2px 6px rgba(0, 0, 0, 0.1));
|
| flex: 0 0 calc(80% - 32px);
|
| min-height: 240px;
|
| overflow: hidden;
|
| position: relative;
|
| scroll-snap-align: center;
|
|
|
| transition: transform var(--transition-speed, 0.4s) cubic-bezier(0.34, 1.56, 0.64, 1),
|
| box-shadow var(--transition-speed, 0.4s) cubic-bezier(0.25, 0.46, 0.45, 0.94),
|
| background-color 0.3s ease, color 0.3s ease;
|
| contain: layout style;
|
| cursor: pointer;
|
| transform-origin: center center;
|
| display: block;
|
| text-decoration: none;
|
| }
|
|
|
| .myonlytab-card:hover {
|
| transform: scale(1.05);
|
| box-shadow: var(--card-hover-shadow, 0 6px 16px rgba(0, 0, 0, 0.15));
|
| z-index: 1;
|
| }
|
|
|
|
|
| @media (hover: hover) and (pointer: fine) {
|
| .myonlytab-card:hover {
|
| background: var(--card-hover-bg, #ffffff) !important;
|
| color: var(--card-hover-text, #333333) !important;
|
| }
|
| }
|
|
|
| .myonlytab-card:active {
|
| transform: scale(0.95);
|
| transition: transform 0.1s ease-out;
|
| }
|
|
|
| .myonlytab-card-content {
|
| padding-left: 50px;
|
| padding-right: 40px;
|
| padding-top: 30px;
|
| padding-bottom: 20px;
|
| height: 100%;
|
| display: flex;
|
| flex-direction: column;
|
| }
|
|
|
| .myonlytab-card[data-card-id="privacy"] {
|
| background: linear-gradient(to bottom, var(--privacy-color), #d8e6f6);
|
| color: var(--privacy-accent);
|
| }
|
|
|
| .myonlytab-card[data-card-id="instant"] {
|
| background: linear-gradient(to bottom, var(--instant-color), #e0d5f0);
|
| color: var(--instant-accent);
|
| }
|
|
|
| .myonlytab-card[data-card-id="premium"] {
|
| background: linear-gradient(to bottom, var(--premium-color), #f5e9cc);
|
| color: var(--premium-accent);
|
| }
|
|
|
| .myonlytab-card[data-card-id="green"] {
|
| background: linear-gradient(to bottom, var(--green-color), #d5e8dd);
|
| color: var(--green-accent);
|
| }
|
|
|
| .myonlytab-card-title {
|
| color: #333;
|
| font-size: 1.5rem;
|
| font-weight: 600;
|
| margin: 16px 0 8px;
|
| transition: color 0.3s ease;
|
| }
|
|
|
| .myonlytab-card-description {
|
| color: #555;
|
| font-size: 1rem;
|
| line-height: 1.5;
|
| transition: color 0.3s ease;
|
| }
|
|
|
| .emoji-icon {
|
| font-size: 3.5rem;
|
| display: inline-block;
|
| margin-bottom: 8px;
|
| transform-origin: center;
|
|
|
| animation-play-state: paused;
|
| }
|
|
|
|
|
| @media (prefers-reduced-motion: no-preference) {
|
| .emoji-icon.animated {
|
| animation-play-state: running;
|
| }
|
|
|
|
|
| #privacy-icon.animated {
|
| animation: wobble 4s ease-in-out infinite;
|
| }
|
|
|
| #instant-icon.animated {
|
| animation: bounce 3s ease-in-out infinite;
|
| }
|
|
|
| #premium-icon.animated {
|
| animation: pulseAndFloat 4s ease-in-out infinite;
|
| }
|
|
|
| #green-icon.animated {
|
| animation: pulseAndFloat 5s ease-in-out infinite;
|
| }
|
| }
|
|
|
| @keyframes pulseAndFloat {
|
| 0%, 100% { transform: scale(1) translateY(0); }
|
| 50% { transform: scale(1.08) translateY(-5px); }
|
| }
|
|
|
| @keyframes bounce {
|
| 0%, 100% { transform: translateY(0); }
|
| 50% { transform: translateY(-8px); }
|
| }
|
|
|
| @keyframes spin {
|
| 0% { transform: rotate(0deg); }
|
| 100% { transform: rotate(360deg); }
|
| }
|
|
|
| @keyframes wobble {
|
| 0%, 100% { transform: rotate(0deg); }
|
| 25% { transform: rotate(-5deg); }
|
| 75% { transform: rotate(5deg); }
|
| }
|
|
|
| .myonlytab-pagination {
|
| display: flex;
|
| gap: 8px;
|
| justify-content: center;
|
| margin-top: 8px;
|
| }
|
|
|
| .myonlytab-pagination-dot {
|
| background-color: #ccc;
|
| border-radius: 50%;
|
| cursor: pointer;
|
| height: 8px;
|
| transition: all 0.3s ease;
|
| width: 8px;
|
| border: 0;
|
| padding: 0;
|
| }
|
|
|
| .myonlytab-pagination-dot.active {
|
| background-color: #666;
|
| transform: scale(1.2);
|
| }
|
|
|
|
|
| .myonlytab-cards-close {
|
| color:#666;
|
| background: rgba(255, 255, 255, 0.8);
|
| border: none;
|
| border-radius: 50%;
|
| cursor: pointer;
|
| height: 36px;
|
| padding: 6px;
|
| position: absolute;
|
| right: 24px;
|
| top: 12px;
|
| transition: all 0.2s ease;
|
| width: 36px;
|
| z-index: 5;
|
| }
|
|
|
| .myonlytab-cards-close:hover {
|
| color:#000;
|
| background: rgba(255, 255, 255, 0.9);
|
| transform: scale(1.2);
|
| }
|
|
|
|
|
| .myonlytab-card.hidden {
|
| opacity: 0;
|
| transform: translateY(20px);
|
| transition: opacity 0.3s ease, transform 0.3s ease;
|
| }
|
|
|
| .myonlytab-cards-wrapper.all-hidden {
|
| display: none;
|
| }
|
|
|
|
|
| .no-js .myonlytab-cards-container {
|
| display: grid;
|
| grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
| gap: 20px;
|
| padding: 16px;
|
| }
|
|
|
| .no-js .myonlytab-pagination,
|
| .no-js .myonlytab-cards-close {
|
| display: none;
|
| }
|
|
|
|
|
|
|
| @media screen and (min-width: 768px) {
|
| .myonlytab-cards-container {
|
| display: grid;
|
| grid-template-columns: repeat(2, minmax(0, 1fr));
|
| grid-template-rows: auto;
|
| grid-gap: 26px;
|
| overflow: visible;
|
| padding: 8px;
|
| height: auto;
|
| }
|
|
|
| .myonlytab-card {
|
| min-height: 220px;
|
| height: 100%;
|
| scroll-snap-align: unset;
|
| width: 100%;
|
| }
|
|
|
| .myonlytab-pagination {
|
| display: none;
|
| }
|
| }
|
|
|
|
|
| @media screen and (min-width: 1024px) {
|
| .myonlytab-cards-container {
|
| grid-template-columns: repeat(4, minmax(0, 1fr));
|
| }
|
| }
|
| </style>
|
| </head>
|
|
|
| <body class="no-js">
|
| <div class="myonlytab-cards-wrapper" id="myonlytab-cards-wrapper">
|
| <div class="myonlytab-cards-container" aria-label="MyOnlyTab Value Proposition Cards">
|
| <a href="https://example.com/privacy" class="myonlytab-card" data-card-id="privacy" aria-labelledby="privacy-title">
|
| <div class="myonlytab-card-content">
|
| <div class="emoji-icon" id="privacy-icon" aria-hidden="true">🛡️</div>
|
| <h3 class="myonlytab-card-title" id="privacy-title">Zero Telemetry: No ads, No trackers</h3>
|
| <p class="myonlytab-card-description">F**k Tech Giants. Access Powerful Tools in One Place without being Watched or Sold to.</p>
|
| </div>
|
| </a>
|
|
|
| <a href="https://example.com/instant" class="myonlytab-card" data-card-id="instant" aria-labelledby="instant-title">
|
| <div class="myonlytab-card-content">
|
| <div class="emoji-icon" id="instant-icon" aria-hidden="true">🚀</div>
|
| <h3 class="myonlytab-card-title" id="instant-title">Explore Freely: No Forced SignUp</h3>
|
| <p class="myonlytab-card-description">Minimal by design with instant access and no distractions. Click Less to do more.</p>
|
| </div>
|
| </a>
|
|
|
| <a href="https://example.com/green" class="myonlytab-card" data-card-id="green" aria-labelledby="green-title">
|
| <div class="myonlytab-card-content">
|
| <div class="emoji-icon" id="green-icon" aria-hidden="true">🌱</div>
|
| <h3 class="myonlytab-card-title" id="green-title">Proudly Powered by 300% Renewable Energy</h3>
|
| <p class="myonlytab-card-description">EU-hosted on GreenGeek's Independant Servers, where Privacy meets Sustainability.</p>
|
| </div>
|
| </a>
|
|
|
| <a href="https://example.com/premium" class="myonlytab-card" data-card-id="premium" aria-labelledby="premium-title">
|
| <div class="myonlytab-card-content">
|
| <div class="emoji-icon" id="premium-icon" aria-hidden="true">⭐</div>
|
| <h3 class="myonlytab-card-title" id="premium-title">Real Premium Perks: No Marketing Tricks</h3>
|
| <p class="myonlytab-card-description">Optional Upgrade for Sync, Advanced Customization, Exclusive Content and Rewards with No-Card 14-day Trial.
|
| </p>
|
| </div>
|
| </a>
|
| </div>
|
|
|
| <div class="myonlytab-pagination" role="tablist" aria-label="Card navigation">
|
| <button class="myonlytab-pagination-dot active" aria-label="Card 1: Privacy" aria-selected="true"></button>
|
| <button class="myonlytab-pagination-dot" aria-label="Card 2: Instant" aria-selected="false"></button>
|
| <button class="myonlytab-pagination-dot" aria-label="Card 3: Premium" aria-selected="false"></button>
|
| <button class="myonlytab-pagination-dot" aria-label="Card 4: Eco-Friendly" aria-selected="false"></button>
|
| </div>
|
|
|
| <button id="myonlytab-cards-close" class="myonlytab-cards-close" aria-label="Close cards">
|
| <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
| <line x1="18" y1="6" x2="6" y2="18"></line>
|
| <line x1="6" y1="6" x2="18" y2="18"></line>
|
| </svg>
|
| </button>
|
| </div>
|
| <script>
|
|
|
| document.body.classList.remove('no-js');
|
|
|
| (function() {
|
|
|
| 'use strict';
|
| const MOT_CARDS = {
|
| config: {
|
| storageKey: 'myonlytabCardsDismissed',
|
| mobileBreakpoint: 768,
|
| animationStartDelay: 300,
|
| scrollThrottleDelay: 100,
|
| cardHidingDelay: 50
|
| },
|
|
|
| elements: {},
|
| state: {
|
| isMobile: false,
|
| supportsTouch: false,
|
| storageSupported: false,
|
| activeCardIndex: 0,
|
| scrollRAF: null,
|
| scrollEndTimeout: null,
|
| resizeRAF: null,
|
| resizeTimer: null,
|
| cardObserver: null,
|
| isScrolling: false,
|
| scrollStateTimeout: null
|
| },
|
|
|
|
|
|
|
|
|
| init: function() {
|
|
|
| if ('requestIdleCallback' in window) {
|
| requestIdleCallback(this.initializeWhenVisible.bind(this));
|
| } else {
|
| window.addEventListener('load', this.initializeWhenVisible.bind(this));
|
| }
|
| },
|
|
|
|
|
|
|
|
|
| initializeWhenVisible: function() {
|
| const wrapper = document.getElementById('myonlytab-cards-wrapper');
|
|
|
| if (!wrapper) return;
|
|
|
| if ('IntersectionObserver' in window) {
|
| const observer = new IntersectionObserver((entries) => {
|
| if (entries[0].isIntersecting) {
|
| observer.disconnect();
|
| this.setup();
|
| }
|
| }, { rootMargin: '200px' });
|
|
|
| observer.observe(wrapper);
|
| } else {
|
| this.setup();
|
| }
|
| },
|
|
|
|
|
|
|
|
|
| setup: function() {
|
|
|
| this.cacheElements();
|
|
|
|
|
| if (!this.elements.wrapper) return;
|
|
|
|
|
| this.checkEnvironment();
|
|
|
|
|
| if (this.state.storageSupported && localStorage.getItem(this.config.storageKey) === 'true') {
|
| this.elements.wrapper.classList.add('all-hidden');
|
| return;
|
| }
|
|
|
|
|
| this.setupEventListeners();
|
|
|
|
|
| this.setupTouchHandlers();
|
|
|
|
|
| setTimeout(this.startAnimations.bind(this), this.config.animationStartDelay);
|
|
|
|
|
| if (this.state.isMobile) {
|
| this.initializeMobileView();
|
| }
|
| },
|
|
|
|
|
|
|
|
|
| cacheElements: function() {
|
| this.elements.wrapper = document.getElementById('myonlytab-cards-wrapper');
|
|
|
| if (!this.elements.wrapper) return;
|
|
|
| this.elements.container = this.elements.wrapper.querySelector('.myonlytab-cards-container');
|
| this.elements.cards = Array.from(this.elements.wrapper.querySelectorAll('.myonlytab-card'));
|
| this.elements.closeButton = document.getElementById('myonlytab-cards-close');
|
| this.elements.paginationDots = Array.from(this.elements.wrapper.querySelectorAll('.myonlytab-pagination-dot'));
|
| this.elements.emojiIcons = Array.from(this.elements.wrapper.querySelectorAll('.emoji-icon'));
|
| },
|
|
|
|
|
|
|
|
|
| checkEnvironment: function() {
|
| this.state.isMobile = window.innerWidth < this.config.mobileBreakpoint;
|
| this.state.supportsTouch = 'ontouchstart' in window || navigator.maxTouchPoints > 0;
|
|
|
|
|
| try {
|
| localStorage.setItem('test', 'test');
|
| localStorage.removeItem('test');
|
| this.state.storageSupported = true;
|
| } catch (e) {
|
| this.state.storageSupported = false;
|
| }
|
| },
|
|
|
|
|
|
|
|
|
| setupEventListeners: function() {
|
|
|
| if (this.elements.closeButton) {
|
| this.elements.closeButton.addEventListener('click', this.handleClose.bind(this));
|
| }
|
|
|
|
|
| if (this.state.isMobile && this.elements.container) {
|
| this.elements.container.addEventListener('scroll', this.handleScroll.bind(this), { passive: true });
|
|
|
|
|
| if ('IntersectionObserver' in window) {
|
| this.setupIntersectionObserver();
|
| }
|
| }
|
|
|
|
|
| if (this.elements.paginationDots.length) {
|
| this.elements.paginationDots.forEach((dot, index) => {
|
| dot.addEventListener('click', () => this.handlePaginationClick(index));
|
| });
|
| }
|
|
|
|
|
| window.addEventListener('resize', this.handleResize.bind(this), { passive: true });
|
| },
|
|
|
|
|
|
|
|
|
| startAnimations: function() {
|
|
|
| const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
|
| if (!prefersReducedMotion && this.elements.emojiIcons) {
|
| this.elements.emojiIcons.forEach(icon => {
|
| icon.classList.add('animated');
|
| });
|
| }
|
| },
|
|
|
|
|
|
|
|
|
| initializeMobileView: function() {
|
| if (this.elements.cards.length > 0) {
|
|
|
| requestAnimationFrame(() => {
|
| this.elements.cards[0].scrollIntoView({
|
| behavior: 'auto',
|
| block: 'nearest',
|
| inline: 'center'
|
| });
|
|
|
|
|
| this.state.activeCardIndex = 0;
|
| this.elements.cards[0].classList.add('active-card');
|
| this.updatePaginationDots(0);
|
| });
|
| }
|
| },
|
|
|
|
|
|
|
|
|
| setupTouchHandlers: function() {
|
| if (!this.state.supportsTouch) return;
|
|
|
|
|
| this.elements.cards.forEach(card => {
|
|
|
| card.addEventListener('touchstart', () => {
|
|
|
| }, { passive: true });
|
|
|
| card.addEventListener('touchend', (e) => {
|
|
|
| if (!this.state.isScrolling) {
|
|
|
| card.classList.add('card-hover-active');
|
|
|
|
|
| setTimeout(() => {
|
| card.classList.remove('card-hover-active');
|
| }, 300);
|
| }
|
| }, { passive: true });
|
| });
|
|
|
|
|
| this.elements.container.addEventListener('touchmove', () => {
|
| this.state.isScrolling = true;
|
|
|
|
|
| if (this.state.scrollStateTimeout) {
|
| clearTimeout(this.state.scrollStateTimeout);
|
| }
|
|
|
|
|
| this.state.scrollStateTimeout = setTimeout(() => {
|
| this.state.isScrolling = false;
|
| }, 100);
|
| }, { passive: true });
|
| },
|
|
|
|
|
|
|
|
|
| handleScroll: function() {
|
|
|
| if (!this.elements.container.style.willChange) {
|
| this.elements.container.style.willChange = 'scroll-position';
|
| }
|
|
|
|
|
| if (this.state.scrollRAF) {
|
| cancelAnimationFrame(this.state.scrollRAF);
|
| }
|
|
|
|
|
| this.state.scrollRAF = requestAnimationFrame(() => {
|
| this.findActiveCard();
|
|
|
|
|
| if (this.state.scrollEndTimeout) {
|
| clearTimeout(this.state.scrollEndTimeout);
|
| }
|
|
|
| this.state.scrollEndTimeout = setTimeout(() => {
|
| this.elements.container.style.willChange = '';
|
| }, 150);
|
| });
|
| },
|
|
|
|
|
|
|
| setupIntersectionObserver: function() {
|
| if (!('IntersectionObserver' in window)) return;
|
|
|
|
|
| const options = {
|
| root: this.elements.container,
|
| rootMargin: '0px',
|
| threshold: 0.6
|
| };
|
|
|
| this.state.cardObserver = new IntersectionObserver((entries) => {
|
| entries.forEach(entry => {
|
| if (entry.isIntersecting && entry.intersectionRatio >= 0.6) {
|
| const activeCard = entry.target;
|
|
|
|
|
| if (!activeCard.classList.contains('active-card')) {
|
|
|
| this.elements.cards.forEach(card => {
|
| card.classList.remove('active-card');
|
| });
|
|
|
|
|
| activeCard.classList.add('active-card');
|
|
|
|
|
| const newIndex = this.elements.cards.indexOf(activeCard);
|
| this.state.activeCardIndex = newIndex;
|
| this.updatePaginationDots(newIndex);
|
| }
|
| }
|
| });
|
| }, options);
|
|
|
|
|
| this.elements.cards.forEach(card => {
|
| this.state.cardObserver.observe(card);
|
| });
|
| },
|
|
|
|
|
|
|
|
|
| findActiveCard: function() {
|
| if (!this.elements.container || !this.elements.cards.length) return;
|
|
|
| const containerRect = this.elements.container.getBoundingClientRect();
|
| const containerCenter = containerRect.left + containerRect.width / 2;
|
|
|
| let bestVisibleCard = null;
|
| let bestDistance = Infinity;
|
|
|
| this.elements.cards.forEach(card => {
|
|
|
| card.classList.remove('card-hover-active');
|
|
|
| const cardRect = card.getBoundingClientRect();
|
| const cardCenter = cardRect.left + cardRect.width / 2;
|
| const distance = Math.abs(cardCenter - containerCenter);
|
|
|
| if (distance < bestDistance) {
|
| bestDistance = distance;
|
| bestVisibleCard = card;
|
| }
|
| });
|
|
|
| if (bestVisibleCard && !bestVisibleCard.classList.contains('active-card')) {
|
|
|
| this.elements.cards.forEach(card => {
|
| card.classList.remove('active-card');
|
| });
|
|
|
|
|
| bestVisibleCard.classList.add('active-card');
|
|
|
|
|
| const newIndex = this.elements.cards.indexOf(bestVisibleCard);
|
| this.state.activeCardIndex = newIndex;
|
| this.updatePaginationDots(newIndex);
|
| }
|
| },
|
|
|
|
|
|
|
|
|
| updatePaginationDots: function(activeIndex) {
|
| if (!this.elements.paginationDots.length) return;
|
|
|
| requestAnimationFrame(() => {
|
| this.elements.paginationDots.forEach((dot, index) => {
|
| const isActive = index === activeIndex;
|
| dot.classList.toggle('active', isActive);
|
| dot.setAttribute('aria-selected', isActive ? 'true' : 'false');
|
| });
|
| });
|
| },
|
|
|
|
|
|
|
| handlePaginationClick: function(index) {
|
| if (!this.elements.cards[index]) return;
|
|
|
| this.elements.cards[index].scrollIntoView({
|
| behavior: 'smooth',
|
| block: 'nearest',
|
| inline: 'center'
|
| });
|
|
|
|
|
| this.state.activeCardIndex = index;
|
| this.updatePaginationDots(index);
|
| },
|
|
|
|
|
|
|
|
|
| handleClose: function(e) {
|
| e.preventDefault();
|
|
|
|
|
| this.elements.cards.forEach((card, index) => {
|
| setTimeout(() => {
|
| card.classList.add('hidden');
|
| }, index * this.config.cardHidingDelay);
|
| });
|
|
|
|
|
| setTimeout(() => {
|
| this.elements.wrapper.classList.add('all-hidden');
|
|
|
|
|
| if (this.state.storageSupported) {
|
| try {
|
| localStorage.setItem(this.config.storageKey, 'true');
|
| } catch (e) {
|
| console.warn('Failed to save card state to localStorage');
|
| }
|
| }
|
| }, (this.elements.cards.length * this.config.cardHidingDelay) + 300);
|
| },
|
|
|
|
|
|
|
|
|
| handleResize: function() {
|
|
|
| this.elements.wrapper.style.willChange = 'contents';
|
|
|
|
|
| clearTimeout(this.state.resizeTimer);
|
|
|
|
|
| if (!this.state.resizeRAF) {
|
| this.state.resizeRAF = requestAnimationFrame(() => {
|
| const wasInMobileView = this.state.isMobile;
|
| this.state.isMobile = window.innerWidth < this.config.mobileBreakpoint;
|
|
|
|
|
| this.state.resizeRAF = null;
|
|
|
|
|
| this.state.resizeTimer = setTimeout(() => {
|
|
|
| if (wasInMobileView !== this.state.isMobile) {
|
|
|
| if (this.state.isMobile) {
|
| this.initializeMobileView();
|
|
|
|
|
| if ('IntersectionObserver' in window && this.state.cardObserver == null) {
|
| this.setupIntersectionObserver();
|
| }
|
| } else {
|
|
|
| if (this.state.cardObserver) {
|
| this.state.cardObserver.disconnect();
|
| this.state.cardObserver = null;
|
| }
|
| }
|
| }
|
|
|
|
|
| this.elements.wrapper.style.willChange = '';
|
| }, 150);
|
| });
|
| }
|
| }
|
| };
|
|
|
|
|
| MOT_CARDS.init();
|
| })();
|
| </script>
|
| </body>
|
| </html>
|
|
|
| |
| |
Comments