(function() { var animDuration = 800; var sessionKey = 'spa_transition_flag'; var circleId = 'spa-circle'; function createCircle() { var circle = document.getElementById(circleId); if (!circle) { circle = document.createElement('div'); circle.id = circleId; document.body.appendChild(circle); } return circle; } // --- Функция сброса состояния анимации --- function resetTransition() { document.body.classList.remove('circle-loading', 'circle-active'); sessionStorage.removeItem(sessionKey); } // --- 1. ВХОД НА СТРАНИЦУ --- createCircle(); // Проверка при обычной загрузке if (sessionStorage.getItem(sessionKey) === 'yes') { document.body.classList.add('circle-loading', 'circle-active'); setTimeout(function() { resetTransition(); }, 50); } // --- КЛЮЧЕВОЙ ФИКС ДЛЯ КНОПКИ "НАЗАД" --- window.addEventListener('pageshow', function(event) { // Если страница загружена из кэша (BFCache), принудительно убираем круг if (event.persisted || sessionStorage.getItem(sessionKey) === 'yes') { resetTransition(); } }); function getCleanPath(url) { try { var parser = new URL(url, window.location.origin); var path = parser.pathname; if (path.length > 1 && path.endsWith('/')) { path = path.slice(0, -1); } return path; } catch (e) { return url; } } // --- 2. ПЕРЕХВАТ КЛИКА --- document.addEventListener('click', function(e) { var link = e.target.closest('a'); if (!link) return; var href = link.getAttribute('href'); var target = link.getAttribute('target'); // Игнорирование системных ссылок if (!href || target === '_blank' || href.includes('mailto:') || href.includes('tel:') || href.includes('javascript:')) return; if (link.classList.contains('t-carousel__control') || link.classList.contains('t-gallery__item') || link.classList.contains('t-popup')) return; // Проверка якорей и текущей страницы if (href.startsWith('#')) return; var currentPath = getCleanPath(window.location.href); var targetPath = getCleanPath(link.href); var targetHash = new URL(link.href, window.location.origin).hash; if (currentPath === targetPath && targetHash) return; // Запуск анимации перехода e.preventDefault(); e.stopPropagation(); sessionStorage.setItem(sessionKey, 'yes'); document.body.classList.add('circle-active'); setTimeout(function() { window.location.href = href; }, animDuration); }, true); })();
GRIND
SUMMARY
Сreate a vibrant and dynamic online platform for the Grind burger chain in Italy, focused on active sales and attracting new customers.
multi-page site
Tilda
2025
Project
Goals
We strive to convey the bold and juicy character of the brand through eye-catching visual content, lively animation and a modern interface that literally whets the appetite.
The main technical priority is to turn the site into an effective conversion tool, where the user can explore the menu, find the nearest location or place an order in a couple of clicks, while maintaining high speed and flawless display on mobile devices.
LET’S COLLABORATE