commit e6150b789ac4992a9671510350ea18d538397ac3 Author: mirzaev Date: Fri Jan 5 01:06:52 2024 +0700 start of transfer diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..39d1d27 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +!.gitignore +composer.phar +composer.lock +vendor diff --git a/LICENSE b/LICENSE new file mode 100755 index 0000000..e007a57 --- /dev/null +++ b/LICENSE @@ -0,0 +1,11 @@ +DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE +Version 2, December 2004 + +Copyright (C) 2004 Sam Hocevar + +Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. + +DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/README.md b/README.md new file mode 100755 index 0000000..0e4d16f --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Site for my father diff --git a/composer.json b/composer.json new file mode 100755 index 0000000..022c719 --- /dev/null +++ b/composer.json @@ -0,0 +1,48 @@ +{ + "name": "mirzaev/gavno", + "description": "", + "readme": "README.md", + "keywords": [ + "landing", + "engeneering", + "site" + ], + "type": "site", + "homepage": "https://git.mirzaev.sexy/mirzaev/gavno", + "license": "WTFPL", + "authors": [ + { + "name": "Arsen Mirzaev Tatyano-Muradovich", + "email": "arsen@mirzaev.sexy", + "homepage": "https://mirzaev.sexy", + "role": "Programmer" + } + ], + "support": { + "docs": "https://git.mirzaev.sexy/mirzaev/gavno/manual", + "issues": "https://git.mirzaev.sexy/mirzaev/gavno/issues" + }, + "require": { + "php": "~8.3", + "ext-sodium": "~8.3", + "mirzaev/minimal": "^2.2.0", + "mirzaev/arangodb": "^1.0.0", + "triagens/arangodb": "~3.9.x-dev", + "twig/twig": "^3.4", + "guzzlehttp/guzzle": "^7.5", + "ipinfo/ipinfo": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "~9.5" + }, + "autoload": { + "psr-4": { + "mirzaev\\gavno\\": "mirzaev/gavno/system" + } + }, + "autoload-dev": { + "psr-4": { + "mirzaev\\gavno\\tests\\": "mirzaev/gavno/tests" + } + } +} diff --git a/mirzaev/gavno/system/controllers/core.php b/mirzaev/gavno/system/controllers/core.php new file mode 100755 index 0000000..25b8392 --- /dev/null +++ b/mirzaev/gavno/system/controllers/core.php @@ -0,0 +1,60 @@ + + */ +class core extends controller +{ + /** + * Переменные окружения + */ + protected robot $vk; + + /** + * Переменные окружения + */ + protected array $variables = []; + + /** + * Конструктор + * + * @return void + */ + public function __construct() { + parent::__construct(); + + // Инициализация ядра моделей (соединение с базой данных...) + new models(); + + // Инициализация журнала ошибок + $this->variables['errors'] = [ + 'vk' => [] + ]; + + // Инициализация препроцессора представления + $this->view = new manager; + } +} diff --git a/mirzaev/gavno/system/controllers/error_controller.php b/mirzaev/gavno/system/controllers/error_controller.php new file mode 100755 index 0000000..2cb3dda --- /dev/null +++ b/mirzaev/gavno/system/controllers/error_controller.php @@ -0,0 +1,44 @@ + + */ +final class error_controller extends core +{ + /** + * Страница с ошибкой + * + * @param array $parameters + */ + public function index(array $parameters = []): ?string + { + // Запись текста ошибки в переменную окружения + $this->variables['text'] = $parameters['text'] ?? null; + + if (isset($parameters['code'])) { + // Получен код ошибки + + // Запись кода ошибки в переменную окружения + $this->variables['code'] = $parameters['code']; + + // Запись кода ответа + http_response_code($parameters['code']); + + // Генерация представления + return $this->view->render(DIRECTORY_SEPARATOR . 'errors' . DIRECTORY_SEPARATOR . 'index.html', $this->variables); + } + + // Генерация представления + return $this->view->render(DIRECTORY_SEPARATOR . 'errors' . DIRECTORY_SEPARATOR . ($parameters['code'] ?? 'index') . '.html', $this->variables); + } +} diff --git a/mirzaev/gavno/system/controllers/index_controller.php b/mirzaev/gavno/system/controllers/index_controller.php new file mode 100755 index 0000000..b64a692 --- /dev/null +++ b/mirzaev/gavno/system/controllers/index_controller.php @@ -0,0 +1,50 @@ + + */ +final class index_controller extends core +{ + /** + * Главная страница + * + * @param array $parameters Параметры запроса + */ + public function index(array $parameters = []): ?string + { + // Инициализация шутника + $this->variables['troller'] = [ + 'instasamka' => rand(1, 11), + 'southern' => rand(1, 3), + 'vk' => (bool) rand(0, 1), + 'whatsapp' => (bool) rand(0, 1), + 'iphone' => (bool) rand(0, 1), + ]; + + // Запись просмотра + views::increase(); + + // Инициализация счётчика просмотров + $this->variables['views'] = [ + 'day' => views::day(), + 'week' => views::week(), + 'month' => views::month(), + 'all' => views::all(), + 'last' => views::last(10) + ]; + + // Генерация представления + return $this->view->render(DIRECTORY_SEPARATOR . 'index.html', $this->variables); + } +} diff --git a/mirzaev/gavno/system/models/core.php b/mirzaev/gavno/system/models/core.php new file mode 100755 index 0000000..7ceba6f --- /dev/null +++ b/mirzaev/gavno/system/models/core.php @@ -0,0 +1,154 @@ + + */ +class core extends model +{ + /** + * Соединение с базой данных ArangoDB + */ + protected static arangodb $arangodb; + + /** + * Путь до файла с настройками подключения к базе данных ArangoDB + */ + final public const ARANGODB = '../settings/arangodb.php'; + + /** + * Конструктор + * + * @param bool $initialize Инициализировать контроллер? + * @param ?arangodb $arangodb Инстанция соединения с базой данных ArangoDB + */ + public function __construct(bool $initialize = true, ?arangodb $arangodb = null) + { + if ($initialize) { + // Запрошена инициализация + + if (isset($arangodb)) { + // Получена инстанция соединения с базой данных + + // Запись и инициализация соединения с базой данных + $this->__set('arangodb', $arangodb); + } else { + // Не получена инстанция соединения с базой данных + + // Инициализация соединения с базой данных по умолчанию + $this->__get('arangodb'); + } + } + } + + /** + * Записать свойство + * + * @param string $name Название + * @param mixed $value Значение + */ + public function __set(string $name, mixed $value = null): void + { + match ($name) { + 'arangodb' => (function () use ($value) { + if ($this->__isset('arangodb')) { + // Свойство уже было инициализировано + + // Выброс исключения (неудача) + throw new exception('Запрещено реинициализировать соединение с базой данных ($this->arangodb)', 500); + } else { + // Свойство ещё не было инициализировано + + if ($value instanceof arangodb) { + // Передано подходящее значение + + // Запись свойства (успех) + self::$arangodb = $value; + } else { + // Передано неподходящее значение + + // Выброс исключения (неудача) + throw new exception('Соединение с базой данных ($this->arangodb) должен быть инстанцией mirzaev\arangodb\connection', 500); + } + } + })(), + default => parent::__set($name, $value) + }; + } + + /** + * Прочитать свойство + * + * @param string $name Название + * + * @return mixed Содержимое + */ + public function __get(string $name): mixed + { + return match ($name) { + 'arangodb' => (function () { + if (!$this->__isset('db')) { + // Свойство не инициализировано + + // Инициализация значения по умолчанию исходя из настроек + $this->__set('arangodb', new arangodb(require static::ARANGODB)); + } + + return self::$arangodb; + })(), + default => parent::__get($name) + }; + } + + /** + * Проверить свойство на инициализированность + * + * @param string $name Название + */ + public function __isset(string $name): bool + { + return match ($name) { + default => parent::__isset($name) + }; + } + + /** + * Удалить свойство + * + * @param string $name Название + */ + public function __unset(string $name): void + { + match ($name) { + default => parent::__isset($name) + }; + } + + + /** + * Статический вызов + * + * @param string $name Название + * @param array $arguments Параметры + */ + public static function __callStatic(string $name, array $arguments): mixed + { + match ($name) { + default => throw new exception("Не найдено свойство или функция: $name", 500) + }; + } +} diff --git a/mirzaev/gavno/system/models/views.php b/mirzaev/gavno/system/models/views.php new file mode 100755 index 0000000..ee48b8a --- /dev/null +++ b/mirzaev/gavno/system/models/views.php @@ -0,0 +1,224 @@ + + */ +class views extends core +{ + /** + * Коллекция + */ + final public const COLLECTION = 'views'; + + public static function increase(array &$errors = []): ?bool + { + try { + if (collection::init(static::$arangodb->session, self::COLLECTION)) + if ($_SERVER['HTTP_USER_AGENT'] === 'nginx-ssl early hints') return null; + else if (document::write(static::$arangodb->session, self::COLLECTION, [ + 'ip' => $_SERVER['REMOTE_ADDR'] ?? null, + 'x-forwarded-for' => $_SERVER['HTTP_X_FORWARDED_FOR'] ?? null, + 'referer' => $_SERVER['HTTP_REFERER'] ?? null, + 'useragent' => $_SERVER['HTTP_USER_AGENT'] ?? null + ] + (array) (new IPinfo(require '../settings/ipinfo.php'))->getDetails($_SERVER['HTTP_X_FORWARDED_FOR'] ?? $_SERVER['REMOTE_ADDR']))) return true; + else throw new exception('Не удалось создать аккаунт'); + else throw new exception('Не удалось инициализировать коллекцию'); + } catch (exception $e) { + // Запись в реестр ошибок + $errors[] = [ + 'text' => $e->getMessage(), + 'file' => $e->getFile(), + 'line' => $e->getLine(), + 'stack' => $e->getTrace() + ]; + } + + return false; + } + + public static function day(array &$errors = []): ?int + { + try { + if (collection::init(static::$arangodb->session, self::COLLECTION)) + return collection::search(static::$arangodb->session, sprintf( + <<= %d + RETURN d['x-forwarded-for'] + ) + AQL, + views::COLLECTION, + time() - 86400 + )); + else throw new exception('Не удалось инициализировать коллекцию'); + } catch (exception $e) { + // Запись в реестр ошибок + $errors[] = [ + 'text' => $e->getMessage(), + 'file' => $e->getFile(), + 'line' => $e->getLine(), + 'stack' => $e->getTrace() + ]; + } + + return null; + } + + public static function week(array &$errors = []): ?int + { + try { + if (collection::init(static::$arangodb->session, self::COLLECTION)) + return collection::search(static::$arangodb->session, sprintf( + <<= %d + RETURN d['x-forwarded-for'] + ) + AQL, + views::COLLECTION, + time() - 604800 + )); + else throw new exception('Не удалось инициализировать коллекцию'); + } catch (exception $e) { + // Запись в реестр ошибок + $errors[] = [ + 'text' => $e->getMessage(), + 'file' => $e->getFile(), + 'line' => $e->getLine(), + 'stack' => $e->getTrace() + ]; + } + + return null; + } + + public static function month(array &$errors = []): ?int + { + try { + if (collection::init(static::$arangodb->session, self::COLLECTION)) + return collection::search(static::$arangodb->session, sprintf( + <<= %d + RETURN d['x-forwarded-for'] + ) + AQL, + views::COLLECTION, + time() - 2592000 + )); + else throw new exception('Не удалось инициализировать коллекцию'); + } catch (exception $e) { + // Запись в реестр ошибок + $errors[] = [ + 'text' => $e->getMessage(), + 'file' => $e->getFile(), + 'line' => $e->getLine(), + 'stack' => $e->getTrace() + ]; + } + + return null; + } + + public static function all(array &$errors = []): ?int + { + try { + if (collection::init(static::$arangodb->session, self::COLLECTION)) + return collection::search(static::$arangodb->session, sprintf( + << $e->getMessage(), + 'file' => $e->getFile(), + 'line' => $e->getLine(), + 'stack' => $e->getTrace() + ]; + } + + return null; + } + + public static function last(int $amount = 10, array &$errors = []): ?array + { + try { + if (collection::init(static::$arangodb->session, self::COLLECTION)) { + // Инициализирована коллекция + + // Поиск последних просмотров + $response = @collection::search(static::$arangodb->session, sprintf( + <<getAll()[0]; + + return $buffer; + } else throw new exception('Не удалось инициализировать коллекцию'); + } catch (exception $e) { + // Запись в реестр ошибок + $errors[] = [ + 'text' => $e->getMessage(), + 'file' => $e->getFile(), + 'line' => $e->getLine(), + 'stack' => $e->getTrace() + ]; + + } + + return null; + } +} diff --git a/mirzaev/gavno/system/public/css/main.css b/mirzaev/gavno/system/public/css/main.css new file mode 100755 index 0000000..bc50368 --- /dev/null +++ b/mirzaev/gavno/system/public/css/main.css @@ -0,0 +1,326 @@ +@font-face { + font-family: comissioner; + src: url("/fonts/commissioner.ttf") format("ttf"); + font-weight: normal; + font-style: normal; +} + +:root { + --button-light-red-active: #eee4e4; + --button-light-red-hover: #ddcbcb; + --button-light-red: #eadada; + --background-light: #fff; + --background: #f00; + --background-dark: #000; + --text: #020202; + --text-light: #fafafa; + --text-hover: #fff; + --text-active: #d0d0d0; + --red-light-1: #dc4343; + --red-light: #bf3737; + --red: #a43333; + --red-dark: #8d2a2a; + --grey-light: #c0c0c0; + --grey: #858585; + --grey-dark: #565656; +} + +* { + text-decoration: none; + outline: none; + border: none; + font-family: commissioner, Roboto, sans-serif; +} + +.unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +body { + margin: 0; + background-color: #1a1a1a; + color: #ffffffdd; + position: relative; + overflow: hidden; + font-family: "Inter", sans-serif; +} + +.card { + position: absolute; + left: 0; + top: 0; + background-position: center; + background-size: cover; + box-shadow: 6px 6px 10px 2px rgba(0, 0, 0, 0.6); +} + +#btn { + position: absolute; + top: 690px; + left: 16px; + z-index: 99; +} + +.card-content { + position: absolute; + left: 0; + top: 0; + color: #ffffffdd; + padding-left: 16px; +} + +.content-place { + margin-top: 6px; + font-size: 13px; + font-weight: 500; +} + +.content-place { + font-weight: 500; +} + +.content-title-1, +.content-title-2 { + font-weight: 600; + font-size: 20px; + font-family: "Oswald", sans-serif; +} + +.content-start { + width: 30px; + height: 5px; + border-radius: 99px; + background-color: #ffffffdd; +} + +.details { + z-index: 22; + position: absolute; + top: 240px; + left: 60px; +} + +.details .place-box { + height: 46px; + overflow: hidden; +} + +.details .place-box .text { + padding-top: 16px; + font-size: 20px; +} + +.details .place-box .text:before { + top: 0; + left: 0; + position: absolute; + content: ""; + width: 30px; + height: 4px; + border-radius: 99px; + background-color: white; +} + +.details .title-1, +.details .title-2 { + font-weight: 600; + font-size: 72px; + font-family: "Oswald", sans-serif; +} + +.details .title-box-1, +.details .title-box-2 { + margin-top: 2px; + height: 100px; + overflow: hidden; +} + +.details > .desc { + margin-top: 16px; + width: 500px; +} + +.details > .cta { + width: 500px; + margin-top: 24px; + display: flex; + align-items: center; +} + +.details > .cta > .bookmark { + border: none; + background-color: #ecad29; + width: 36px; + height: 36px; + border-radius: 99px; + color: white; + display: grid; + place-items: center; +} + +.details > .cta > .bookmark svg { + width: 20px; + height: 20px; +} + +.details > .cta > .discover { + border: 1px solid #ffffff; + background-color: transparent; + height: 36px; + border-radius: 99px; + color: #ffffff; + padding: 4px 24px; + font-size: 12px; + margin-left: 16px; + text-transform: uppercase; +} + +nav { + position: fixed; + left: 0; + top: 0; + right: 0; + z-index: 50; + display: flex; + align-items: center; + justify-content: space-between; + padding: 20px 36px; + font-weight: 500; +} + +nav svg { + width: 20px; + height: 20px; +} + +nav .svg-container { + width: 20px; + height: 20px; +} + +nav > div { + display: inline-flex; + align-items: center; + text-transform: uppercase; + font-size: 14px; +} + +nav > div:first-child { + gap: 10px; +} + +nav > div:last-child { + gap: 24px; +} + +nav > div:last-child > .active { + position: relative; +} + +nav > div:last-child > .active:after { + bottom: -8px; + left: 0; + right: 0; + position: absolute; + content: ""; + height: 3px; + border-radius: 99px; + background-color: #ecad29; +} + +.indicator { + position: fixed; + left: 0; + right: 0; + top: 0; + height: 5px; + z-index: 60; + background-color: #ecad29; +} + +.pagination { + position: absolute; + left: 0px; + top: 0px; + display: inline-flex; +} + +.pagination > .arrow { + z-index: 60; + width: 50px; + height: 50px; + border-radius: 999px; + border: 2px solid #ffffff55; + display: grid; + place-items: center; +} + +.pagination > .arrow:nth-child(2) { + margin-left: 20px; +} + +.pagination > .arrow svg { + width: 24px; + height: 24px; + stroke-width: 2; + color: #ffffff99; +} + +.pagination .progress-sub-container { + margin-left: 24px; + z-index: 60; + width: 500px; + height: 50px; + display: flex; + align-items: center; +} + +.pagination .progress-sub-container .progress-sub-background { + width: 500px; + height: 3px; + background-color: #ffffff33; +} + +.pagination + .progress-sub-container + .progress-sub-background + .progress-sub-foreground { + height: 3px; + background-color: #ecad29; +} + +.pagination .slide-numbers { + width: 50px; + height: 50px; + overflow: hidden; + z-index: 60; + position: relative; +} + +.pagination .slide-numbers .item { + width: 50px; + height: 50px; + position: absolute; + color: white; + top: 0; + left: 0; + display: grid; + place-items: center; + font-size: 32px; + font-weight: bold; +} + +.cover { + position: absolute; + left: 0; + top: 0; + width: 100vw; + height: 100vh; + background-color: #fff; + z-index: 100; +} diff --git a/mirzaev/gavno/system/public/fonts/commissioner.ttf b/mirzaev/gavno/system/public/fonts/commissioner.ttf new file mode 100755 index 0000000..08a14a6 Binary files /dev/null and b/mirzaev/gavno/system/public/fonts/commissioner.ttf differ diff --git a/mirzaev/gavno/system/public/index.php b/mirzaev/gavno/system/public/index.php new file mode 100755 index 0000000..e3dcd86 --- /dev/null +++ b/mirzaev/gavno/system/public/index.php @@ -0,0 +1,31 @@ +write('/', 'index', 'index'); + +// Инициализация ядра +$core = new core(namespace: __NAMESPACE__, router: $router); + +// Обработка запроса +echo $core->start(); diff --git a/mirzaev/gavno/system/public/js/carousel.js b/mirzaev/gavno/system/public/js/carousel.js new file mode 100644 index 0000000..8328945 --- /dev/null +++ b/mirzaev/gavno/system/public/js/carousel.js @@ -0,0 +1,379 @@ +const data = [ + { + place: "Switzerland Alps", + title: "SAINT", + title2: "ANTONIEN", + description: + "Tucked away in the Switzerland Alps, Saint Antönien offers an idyllic retreat for those seeking tranquility and adventure alike. It's a hidden gem for backcountry skiing in winter and boasts lush trails for hiking and mountain biking during the warmer months.", + image: "https://assets.codepen.io/3685267/timed-cards-1.jpg", + }, + { + place: "Japan Alps", + title: "NANGANO", + title2: "PREFECTURE", + description: + "Nagano Prefecture, set within the majestic Japan Alps, is a cultural treasure trove with its historic shrines and temples, particularly the famous Zenkō-ji. The region is also a hotspot for skiing and snowboarding, offering some of the country's best powder.", + image: "https://assets.codepen.io/3685267/timed-cards-2.jpg", + }, + { + place: "Sahara Desert - Morocco", + title: "MARRAKECH", + title2: "MEROUGA", + description: + "The journey from the vibrant souks and palaces of Marrakech to the tranquil, starlit sands of Merzouga showcases the diverse splendor of Morocco. Camel treks and desert camps offer an unforgettable immersion into the nomadic way of life.", + image: "https://assets.codepen.io/3685267/timed-cards-3.jpg", + }, + { + place: "Sierra Nevada - USA", + title: "YOSEMITE", + title2: "NATIONAL PARAK", + description: + "Yosemite National Park is a showcase of the American wilderness, revered for its towering granite monoliths, ancient giant sequoias, and thundering waterfalls. The park offers year-round recreational activities, from rock climbing to serene valley walks.", + image: "https://assets.codepen.io/3685267/timed-cards-4.jpg", + }, + { + place: "Tarifa - Spain", + title: "LOS LANCES", + title2: "BEACH", + description: + "Los Lances Beach in Tarifa is a coastal paradise known for its consistent winds, making it a world-renowned spot for kitesurfing and windsurfing. The beach's long, sandy shores provide ample space for relaxation and sunbathing, with a vibrant atmosphere of beach bars and cafes.", + image: "https://assets.codepen.io/3685267/timed-cards-5.jpg", + }, + { + place: "Cappadocia - Turkey", + title: "Göreme", + title2: "Valley", + description: + "Göreme Valley in Cappadocia is a historical marvel set against a unique geological backdrop, where centuries of wind and water have sculpted the landscape into whimsical formations. The valley is also famous for its open-air museums, underground cities, and the enchanting experience of hot air ballooning.", + image: "https://assets.codepen.io/3685267/timed-cards-6.jpg", + }, +]; + +const _ = (id) => document.getElementById(id); +const cards = data + .map( + (i, index) => + `
`, + ) + .join(""); + +const cardContents = data + .map( + (i, index) => + `
+
+
${i.place}
+
${i.title}
+
${i.title2}
+ +
`, + ) + .join(""); + +const sildeNumbers = data + .map( + (_, index) => + `
${index + 1}
`, + ) + .join(""); +_("demo").innerHTML = cards + cardContents; +_("slide-numbers").innerHTML = sildeNumbers; + +const range = (n) => + Array(n) + .fill(0) + .map((i, j) => i + j); +const set = gsap.set; + +function getCard(index) { + return `#card${index}`; +} +function getCardContent(index) { + return `#card-content-${index}`; +} +function getSliderItem(index) { + return `#slide-item-${index}`; +} + +function animate(target, duration, properties) { + return new Promise((resolve) => { + gsap.to(target, { + ...properties, + duration: duration, + onComplete: resolve, + }); + }); +} + +let order = [0, 1, 2, 3, 4, 5]; +let detailsEven = true; + +let offsetTop = 200; +let offsetLeft = 700; +let cardWidth = 200; +let cardHeight = 300; +let gap = 40; +let numberSize = 50; +const ease = "sine.inOut"; + +function init() { + const [active, ...rest] = order; + const detailsActive = detailsEven ? "#details-even" : "#details-odd"; + const detailsInactive = detailsEven ? "#details-odd" : "#details-even"; + const { innerHeight: height, innerWidth: width } = window; + offsetTop = height - 430; + offsetLeft = width - 830; + + gsap.set("#pagination", { + top: offsetTop + 330, + left: offsetLeft, + y: 200, + opacity: 0, + zIndex: 60, + }); + gsap.set("nav", { y: -200, opacity: 0 }); + + gsap.set(getCard(active), { + x: 0, + y: 0, + width: window.innerWidth, + height: window.innerHeight, + }); + gsap.set(getCardContent(active), { x: 0, y: 0, opacity: 0 }); + gsap.set(detailsActive, { opacity: 0, zIndex: 22, x: -200 }); + gsap.set(detailsInactive, { opacity: 0, zIndex: 12 }); + gsap.set(`${detailsInactive} .text`, { y: 100 }); + gsap.set(`${detailsInactive} .title-1`, { y: 100 }); + gsap.set(`${detailsInactive} .title-2`, { y: 100 }); + gsap.set(`${detailsInactive} .desc`, { y: 50 }); + gsap.set(`${detailsInactive} .cta`, { y: 60 }); + + gsap.set(".progress-sub-foreground", { + width: 500 * (1 / order.length) * (active + 1), + }); + + rest.forEach((i, index) => { + gsap.set(getCard(i), { + x: offsetLeft + 400 + index * (cardWidth + gap), + y: offsetTop, + width: cardWidth, + height: cardHeight, + zIndex: 30, + borderRadius: 10, + }); + gsap.set(getCardContent(i), { + x: offsetLeft + 400 + index * (cardWidth + gap), + zIndex: 40, + y: offsetTop + cardHeight - 100, + }); + gsap.set(getSliderItem(i), { x: (index + 1) * numberSize }); + }); + + gsap.set(".indicator", { x: -window.innerWidth }); + + const startDelay = 0.6; + + gsap.to(".cover", { + x: width + 400, + delay: 0.5, + ease, + onComplete: () => { + setTimeout(() => { + loop(); + }, 500); + }, + }); + rest.forEach((i, index) => { + gsap.to(getCard(i), { + x: offsetLeft + index * (cardWidth + gap), + zIndex: 30, + delay: 0.05 * index, + ease, + delay: startDelay, + }); + gsap.to(getCardContent(i), { + x: offsetLeft + index * (cardWidth + gap), + zIndex: 40, + delay: 0.05 * index, + ease, + delay: startDelay, + }); + }); + gsap.to("#pagination", { y: 0, opacity: 1, ease, delay: startDelay }); + gsap.to("nav", { y: 0, opacity: 1, ease, delay: startDelay }); + gsap.to(detailsActive, { opacity: 1, x: 0, ease, delay: startDelay }); +} + +let clicks = 0; + +function step() { + return new Promise((resolve) => { + order.push(order.shift()); + detailsEven = !detailsEven; + + const detailsActive = detailsEven ? "#details-even" : "#details-odd"; + const detailsInactive = detailsEven ? "#details-odd" : "#details-even"; + + document.querySelector(`${detailsActive} .place-box .text`).textContent = + data[order[0]].place; + document.querySelector(`${detailsActive} .title-1`).textContent = + data[order[0]].title; + document.querySelector(`${detailsActive} .title-2`).textContent = + data[order[0]].title2; + document.querySelector(`${detailsActive} .desc`).textContent = + data[order[0]].description; + + gsap.set(detailsActive, { zIndex: 22 }); + gsap.to(detailsActive, { opacity: 1, delay: 0.4, ease }); + gsap.to(`${detailsActive} .text`, { + y: 0, + delay: 0.1, + duration: 0.7, + ease, + }); + gsap.to(`${detailsActive} .title-1`, { + y: 0, + delay: 0.15, + duration: 0.7, + ease, + }); + gsap.to(`${detailsActive} .title-2`, { + y: 0, + delay: 0.15, + duration: 0.7, + ease, + }); + gsap.to(`${detailsActive} .desc`, { + y: 0, + delay: 0.3, + duration: 0.4, + ease, + }); + gsap.to(`${detailsActive} .cta`, { + y: 0, + delay: 0.35, + duration: 0.4, + onComplete: resolve, + ease, + }); + gsap.set(detailsInactive, { zIndex: 12 }); + + const [active, ...rest] = order; + const prv = rest[rest.length - 1]; + + gsap.set(getCard(prv), { zIndex: 10 }); + gsap.set(getCard(active), { zIndex: 20 }); + gsap.to(getCard(prv), { scale: 1.5, ease }); + + gsap.to(getCardContent(active), { + y: offsetTop + cardHeight - 10, + opacity: 0, + duration: 0.3, + ease, + }); + gsap.to(getSliderItem(active), { x: 0, ease }); + gsap.to(getSliderItem(prv), { x: -numberSize, ease }); + gsap.to(".progress-sub-foreground", { + width: 500 * (1 / order.length) * (active + 1), + ease, + }); + + gsap.to(getCard(active), { + x: 0, + y: 0, + ease, + width: window.innerWidth, + height: window.innerHeight, + borderRadius: 0, + onComplete: () => { + const xNew = offsetLeft + (rest.length - 1) * (cardWidth + gap); + gsap.set(getCard(prv), { + x: xNew, + y: offsetTop, + width: cardWidth, + height: cardHeight, + zIndex: 30, + borderRadius: 10, + scale: 1, + }); + + gsap.set(getCardContent(prv), { + x: xNew, + y: offsetTop + cardHeight - 100, + opacity: 1, + zIndex: 40, + }); + gsap.set(getSliderItem(prv), { x: rest.length * numberSize }); + + gsap.set(detailsInactive, { opacity: 0 }); + gsap.set(`${detailsInactive} .text`, { y: 100 }); + gsap.set(`${detailsInactive} .title-1`, { y: 100 }); + gsap.set(`${detailsInactive} .title-2`, { y: 100 }); + gsap.set(`${detailsInactive} .desc`, { y: 50 }); + gsap.set(`${detailsInactive} .cta`, { y: 60 }); + clicks -= 1; + if (clicks > 0) { + step(); + } + }, + }); + + rest.forEach((i, index) => { + if (i !== prv) { + const xNew = offsetLeft + index * (cardWidth + gap); + gsap.set(getCard(i), { zIndex: 30 }); + gsap.to(getCard(i), { + x: xNew, + y: offsetTop, + width: cardWidth, + height: cardHeight, + ease, + delay: 0.1 * (index + 1), + }); + + gsap.to(getCardContent(i), { + x: xNew, + y: offsetTop + cardHeight - 100, + opacity: 1, + zIndex: 40, + ease, + delay: 0.1 * (index + 1), + }); + gsap.to(getSliderItem(i), { x: (index + 1) * numberSize, ease }); + } + }); + }); +} + +async function loop() { + await animate(".indicator", 2, { x: 0 }); + await animate(".indicator", 0.8, { x: window.innerWidth, delay: 0.3 }); + set(".indicator", { x: -window.innerWidth }); + await step(); + loop(); +} + +async function loadImage(src) { + return new Promise((resolve, reject) => { + let img = new Image(); + img.onload = () => resolve(img); + img.onerror = reject; + img.src = src; + }); +} + +async function loadImages() { + const promises = data.map(({ image }) => loadImage(image)); + return Promise.all(promises); +} + +async function start() { + try { + await loadImages(); + init(); + } catch (error) { + console.error("One or more images failed to load", error); + } +} + +start(); diff --git a/mirzaev/gavno/system/public/js/gsap.min.js b/mirzaev/gavno/system/public/js/gsap.min.js new file mode 100644 index 0000000..0c38bc4 --- /dev/null +++ b/mirzaev/gavno/system/public/js/gsap.min.js @@ -0,0 +1,11 @@ +/*! + * GSAP 3.12.2 + * https://greensock.com + * + * @license Copyright 2023, GreenSock. All rights reserved. + * Subject to the terms at https://greensock.com/standard-license or for Club GreenSock members, the agreement issued with that membership. + * @author: Jack Doyle, jack@greensock.com + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,function(e){"use strict";function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r(t){return"string"==typeof t}function s(t){return"function"==typeof t}function t(t){return"number"==typeof t}function u(t){return void 0===t}function v(t){return"object"==typeof t}function w(t){return!1!==t}function x(){return"undefined"!=typeof window}function y(t){return s(t)||r(t)}function P(t){return(i=yt(t,ot))&&Ee}function Q(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")}function R(t,e){return!e&&console.warn(t)}function S(t,e){return t&&(ot[t]=e)&&i&&(i[t]=e)||ot}function T(){return 0}function ea(t){var e,r,i=t[0];if(v(i)||s(i)||(t=[t]),!(e=(i._gsap||{}).harness)){for(r=gt.length;r--&&!gt[r].targetTest(i););e=gt[r]}for(r=t.length;r--;)t[r]&&(t[r]._gsap||(t[r]._gsap=new Vt(t[r],e)))||t.splice(r,1);return t}function fa(t){return t._gsap||ea(Ot(t))[0]._gsap}function ga(t,e,r){return(r=t[e])&&s(r)?t[e]():u(r)&&t.getAttribute&&t.getAttribute(e)||r}function ha(t,e){return(t=t.split(",")).forEach(e)||t}function ia(t){return Math.round(1e5*t)/1e5||0}function ja(t){return Math.round(1e7*t)/1e7||0}function ka(t,e){var r=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),"+"===r?t+i:"-"===r?t-i:"*"===r?t*i:t/i}function la(t,e){for(var r=e.length,i=0;t.indexOf(e[i])<0&&++ia;)s=s._prev;return s?(e._next=s._next,s._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[i]=e,e._prev=s,e.parent=e._dp=t,e}function ya(t,e,r,i){void 0===r&&(r="_first"),void 0===i&&(i="_last");var n=e._prev,a=e._next;n?n._next=a:t[r]===e&&(t[r]=a),a?a._prev=n:t[i]===e&&(t[i]=n),e._next=e._prev=e.parent=null}function za(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0}function Aa(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t}function Ca(t,e,r,i){return t._startAt&&(L?t._startAt.revert(ht):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))}function Ea(t){return t._repeat?Tt(t._tTime,t=t.duration()+t._rDelay)*t:0}function Ga(t,e){return(t-e._start)*e._ts+(0<=e._ts?0:e._dirty?e.totalDuration():e._tDur)}function Ha(t){return t._end=ja(t._start+(t._tDur/Math.abs(t._ts||t._rts||X)||0))}function Ia(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=ja(r._time-(0X)&&e.render(r,!0)),Aa(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur(n=Math.abs(n))&&(a=i,o=n);return a}function tb(t){return za(t),t.scrollTrigger&&t.scrollTrigger.kill(!!L),t.progress()<1&&At(t,"onInterrupt"),t}function wb(t){if(x()&&t){var e=(t=!t.name&&t.default||t).name,r=s(t),i=e&&!r&&t.init?function(){this._props=[]}:t,n={init:T,render:he,add:Qt,kill:ce,modifier:fe,rawVars:0},a={targetTest:0,get:0,getSetter:ne,aliases:{},register:0};if(Ft(),t!==i){if(pt[e])return;qa(i,qa(ua(t,n),a)),yt(i.prototype,yt(n,ua(t,a))),pt[i.prop=e]=i,t.targetTest&&(gt.push(i),ft[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}S(e,i),t.register&&t.register(Ee,i,_e)}else t&&Ct.push(t)}function zb(t,e,r){return(6*(t+=t<0?1:1>16,e>>8&St,e&St]:0:Et.black;if(!p){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),Et[e])p=Et[e];else if("#"===e.charAt(0)){if(e.length<6&&(e="#"+(n=e.charAt(1))+n+(a=e.charAt(2))+a+(s=e.charAt(3))+s+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(p=parseInt(e.substr(1,6),16))>>16,p>>8&St,p&St,parseInt(e.substr(7),16)/255];p=[(e=parseInt(e.substr(1),16))>>16,e>>8&St,e&St]}else if("hsl"===e.substr(0,3))if(p=d=e.match(tt),r){if(~e.indexOf("="))return p=e.match(et),i&&p.length<4&&(p[3]=1),p}else o=+p[0]%360/360,u=p[1]/100,n=2*(h=p[2]/100)-(a=h<=.5?h*(u+1):h+u-h*u),3=U?u.endTime(!1):t._dur;return r(e)&&(isNaN(e)||e in o)?(a=e.charAt(0),s="%"===e.substr(-1),n=e.indexOf("="),"<"===a||">"===a?(0<=n&&(e=e.replace(/=/,"")),("<"===a?u._start:u.endTime(0<=u._repeat))+(parseFloat(e.substr(1))||0)*(s?(n<0?u:i).totalDuration()/100:1)):n<0?(e in o||(o[e]=h),o[e]):(a=parseFloat(e.charAt(n-1)+e.substr(n+1)),s&&i&&(a=a/100*($(i)?i[0]:i).totalDuration()),1=r&&te)return i;i=i._next}else for(i=t._last;i&&i._start>=r;){if("isPause"===i.data&&i._start=n._start)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0=this.totalDuration()||!v&&_)&&(f!==this._start&&Math.abs(l)===Math.abs(this._ts)||this._lock||(!t&&g||!(v===m&&0=i&&(a instanceof Zt?e&&n.push(a):(r&&n.push(a),t&&n.push.apply(n,a.getChildren(!0,e,r)))),a=a._next;return n},e.getById=function getById(t){for(var e=this.getChildren(1,1,1),r=e.length;r--;)if(e[r].vars.id===t)return e[r]},e.remove=function remove(t){return r(t)?this.removeLabel(t):s(t)?this.killTweensOf(t):(ya(this,t),t===this._recent&&(this._recent=this._last),Aa(this))},e.totalTime=function totalTime(t,e){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ja(Rt.time-(0r:!r||s.isActive())&&n.push(s):(i=s.getTweensOf(a,r)).length&&n.push.apply(n,i),s=s._next;return n},e.tweenTo=function tweenTo(t,e){e=e||{};var r,i=this,n=xt(i,t),a=e.startAt,s=e.onStart,o=e.onStartParams,u=e.immediateRender,h=Zt.to(i,qa({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:n,overwrite:"auto",duration:e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale())||X,onStart:function onStart(){if(i.pause(),!r){var t=e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale());h._dur!==t&&Ra(h,t,0,1).render(h._time,!0,!0),r=1}s&&s.apply(h,o||[])}},e));return u?h.render(0):h},e.tweenFromTo=function tweenFromTo(t,e,r){return this.tweenTo(e,qa({startAt:{time:xt(this,t)}},r))},e.recent=function recent(){return this._recent},e.nextLabel=function nextLabel(t){return void 0===t&&(t=this._time),rb(this,xt(this,t))},e.previousLabel=function previousLabel(t){return void 0===t&&(t=this._time),rb(this,xt(this,t),1)},e.currentLabel=function currentLabel(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+X)},e.shiftChildren=function shiftChildren(t,e,r){void 0===r&&(r=0);for(var i,n=this._first,a=this.labels;n;)n._start>=r&&(n._start+=t,n._end+=t),n=n._next;if(e)for(i in a)a[i]>=r&&(a[i]+=t);return Aa(this)},e.invalidate=function invalidate(t){var e=this._first;for(this._lock=0;e;)e.invalidate(t),e=e._next;return i.prototype.invalidate.call(this,t)},e.clear=function clear(t){void 0===t&&(t=!0);for(var e,r=this._first;r;)e=r._next,this.remove(r),r=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Aa(this)},e.totalDuration=function totalDuration(t){var e,r,i,n=0,a=this,s=a._last,o=U;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-t:t));if(a._dirty){for(i=a.parent;s;)e=s._prev,s._dirty&&s.totalDuration(),o<(r=s._start)&&a._sort&&s._ts&&!a._lock?(a._lock=1,Ka(a,s,r-s._delay,1)._lock=0):o=r,r<0&&s._ts&&(n-=r,(!i&&!a._dp||i&&i.smoothChildTiming)&&(a._start+=r/a._ts,a._time-=r,a._tTime-=r),a.shiftChildren(-r,!1,-Infinity),o=0),s._end>n&&s._ts&&(n=s._end),s=e;Ra(a,a===I&&a._time>n?a._time:n,1,1),a._dirty=0}return a._tDur},Timeline.updateRoot=function updateRoot(t){if(I._ts&&(na(I,Ga(t,I)),f=Rt.frame),Rt.frame>=mt){mt+=q.autoSleep||120;var e=I._first;if((!e||!e._ts)&&q.autoSleep&&Rt._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||Rt.sleep()}}},Timeline}(Ut);qa(Xt.prototype,{_lock:0,_hasPause:0,_forcing:0});function ac(t,e,i,n,a,o){var u,h,l,f;if(pt[t]&&!1!==(u=new pt[t]).init(a,u.rawVars?e[t]:function _processVars(t,e,i,n,a){if(s(t)&&(t=Kt(t,a,e,i,n)),!v(t)||t.style&&t.nodeType||$(t)||Z(t))return r(t)?Kt(t,a,e,i,n):t;var o,u={};for(o in t)u[o]=Kt(t[o],a,e,i,n);return u}(e[t],n,a,o,i),i,n,o)&&(i._pt=h=new _e(i._pt,a,t,0,1,u.render,u,0,u.priority),i!==c))for(l=i._ptLookup[i._targets.indexOf(a)],f=u._props.length;f--;)l[u._props[f]]=h;return u}function gc(t,r,e,i){var n,a,s=r.ease||i||"power1.inOut";if($(r))a=e[t]||(e[t]=[]),r.forEach(function(t,e){return a.push({t:e/(r.length-1)*100,v:t,e:s})});else for(n in r)a=e[n]||(e[n]=[]),"ease"===n||a.push({t:parseFloat(t),v:r[n],e:s})}var Nt,Wt,Qt=function _addPropTween(t,e,i,n,a,o,u,h,l,f){s(n)&&(n=n(a||0,t,o));var c,d=t[e],p="get"!==i?i:s(d)?l?t[e.indexOf("set")||!s(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():d,_=s(d)?l?re:te:$t;if(r(n)&&(~n.indexOf("random(")&&(n=ob(n)),"="===n.charAt(1)&&(!(c=ka(p,n)+(Ya(p)||0))&&0!==c||(n=c))),!f||p!==n||Wt)return isNaN(p*n)||""===n?(d||e in t||Q(e,n),function _addComplexStringPropTween(t,e,r,i,n,a,s){var o,u,h,l,f,c,d,p,_=new _e(this._pt,t,e,0,1,ue,null,n),m=0,g=0;for(_.b=r,_.e=i,r+="",(d=~(i+="").indexOf("random("))&&(i=ob(i)),a&&(a(p=[r,i],t,e),r=p[0],i=p[1]),u=r.match(it)||[];o=it.exec(i);)l=o[0],f=i.substring(m,o.index),h?h=(h+1)%5:"rgba("===f.substr(-5)&&(h=1),l!==u[g++]&&(c=parseFloat(u[g-1])||0,_._pt={_next:_._pt,p:f||1===g?f:",",s:c,c:"="===l.charAt(1)?ka(c,l)-c:parseFloat(l)-c,m:h&&h<4?Math.round:0},m=it.lastIndex);return _.c=m")}),s.duration();else{for(l in u={},x)"ease"===l||"easeEach"===l||gc(l,x[l],u,x.easeEach);for(l in u)for(C=u[l].sort(function(t,e){return t.t-e.t}),o=D=0;o=t._tDur||e<0)&&t.ratio===u&&(u&&za(t,1),r||L||(At(t,u?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,r);return this},e.targets=function targets(){return this._targets},e.invalidate=function invalidate(t){return t&&this.vars.runBackwards||(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),z.prototype.invalidate.call(this,t)},e.resetTo=function resetTo(t,e,r,i){d||Rt.wake(),this._ts||this.play();var n,a=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Gt(this,a),n=this._ease(a/this._dur),function _updatePropTweens(t,e,r,i,n,a,s){var o,u,h,l,f=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!f)for(f=t._ptCache[e]=[],h=t._ptLookup,l=t._targets.length;l--;){if((o=h[l][e])&&o.d&&o.d._pt)for(o=o.d._pt;o&&o.p!==e&&o.fp!==e;)o=o._next;if(!o)return Wt=1,t.vars[e]="+=0",Gt(t,s),Wt=0,1;f.push(o)}for(l=f.length;l--;)(o=(u=f[l])._pt||u).s=!i&&0!==i||n?o.s+(i||0)+a*o.c:i,o.c=r-o.s,u.e&&(u.e=ia(r)+Ya(u.e)),u.b&&(u.b=o.s+Ya(u.b))}(this,t,e,r,i,n,a)?this.resetTo(t,e,r,i):(Ia(this,0),this.parent||xa(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function kill(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?tb(this):this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,Nt&&!0!==Nt.vars.overwrite)._first||tb(this),this.parent&&i!==this.timeline.totalDuration()&&Ra(this,this._dur*this.timeline._tDur/i,0,1),this}var n,a,s,o,u,h,l,f=this._targets,c=t?Ot(t):f,d=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function _arraysMatch(t,e){for(var r=t.length,i=r===e.length;i&&r--&&t[r]===e[r];);return r<0}(f,c))return"all"===e&&(this._pt=0),tb(this);for(n=this._op=this._op||[],"all"!==e&&(r(e)&&(u={},ha(e,function(t){return u[t]=1}),e=u),e=function _addAliasesToVars(t,e){var r,i,n,a,s=t[0]?fa(t[0]).harness:0,o=s&&s.aliases;if(!o)return e;for(i in r=yt({},e),o)if(i in r)for(n=(a=o[i].split(",")).length;n--;)r[a[n]]=r[i];return r}(f,e)),l=f.length;l--;)if(~c.indexOf(f[l]))for(u in a=d[l],"all"===e?(n[l]=e,o=a,s={}):(s=n[l]=n[l]||{},o=e),o)(h=a&&a[u])&&("kill"in h.d&&!0!==h.d.kill(u)||ya(this,h,"_pt"),delete a[u]),"all"!==s&&(s[u]=1);return this._initted&&!this._pt&&p&&tb(this),this},Tween.to=function to(t,e,r){return new Tween(t,e,r)},Tween.from=function from(t,e){return Va(1,arguments)},Tween.delayedCall=function delayedCall(t,e,r,i){return new Tween(e,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:e,onReverseComplete:e,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},Tween.fromTo=function fromTo(t,e,r){return Va(2,arguments)},Tween.set=function set(t,e){return e.duration=0,e.repeatDelay||(e.repeat=0),new Tween(t,e)},Tween.killTweensOf=function killTweensOf(t,e,r){return I.killTweensOf(t,e,r)},Tween}(Ut);qa(Zt.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ha("staggerTo,staggerFrom,staggerFromTo",function(r){Zt[r]=function(){var t=new Xt,e=Mt.call(arguments,0);return e.splice("staggerFromTo"===r?5:4,0,0),t[r].apply(t,e)}});function oc(t,e,r){return t.setAttribute(e,r)}function wc(t,e,r,i){i.mSet(t,e,i.m.call(i.tween,r,i.mt),i)}var $t=function _setterPlain(t,e,r){return t[e]=r},te=function _setterFunc(t,e,r){return t[e](r)},re=function _setterFuncWithParam(t,e,r,i){return t[e](i.fp,r)},ne=function _getSetter(t,e){return s(t[e])?te:u(t[e])&&t.setAttribute?oc:$t},ae=function _renderPlain(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},se=function _renderBoolean(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},ue=function _renderComplexString(t,e){var r=e._pt,i="";if(!t&&e.b)i=e.b;else if(1===t&&e.e)i=e.e;else{for(;r;)i=r.p+(r.m?r.m(r.s+r.c*t):Math.round(1e4*(r.s+r.c*t))/1e4)+i,r=r._next;i+=e.c}e.set(e.t,e.p,i,e)},he=function _renderPropTweens(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},fe=function _addPluginModifier(t,e,r,i){for(var n,a=this._pt;a;)n=a._next,a.p===i&&a.modifier(t,e,r),a=n},ce=function _killPropTweensOf(t){for(var e,r,i=this._pt;i;)r=i._next,i.p===t&&!i.op||i.op===t?ya(this,i,"_pt"):i.dep||(e=1),i=r;return!e},pe=function _sortPropTweensByPriority(t){for(var e,r,i,n,a=t._pt;a;){for(e=a._next,r=i;r&&r.pr>a.pr;)r=r._next;(a._prev=r?r._prev:n)?a._prev._next=a:i=a,(a._next=r)?r._prev=a:n=a,a=e}t._pt=i},_e=(PropTween.prototype.modifier=function modifier(t,e,r){this.mSet=this.mSet||this.set,this.set=wc,this.m=t,this.mt=r,this.tween=e},PropTween);function PropTween(t,e,r,i,n,a,s,o,u){this.t=e,this.s=i,this.c=n,this.p=r,this.r=a||ae,this.d=s||this,this.set=o||$t,this.pr=u||0,(this._next=t)&&(t._prev=this)}ha(vt+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(t){return ft[t]=1}),ot.TweenMax=ot.TweenLite=Zt,ot.TimelineLite=ot.TimelineMax=Xt,I=new Xt({sortChildren:!1,defaults:V,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),q.stringFilter=Fb;function Ec(t){return(ye[t]||Te).map(function(t){return t()})}function Fc(){var t=Date.now(),o=[];2 'unix:///var/run/arangodb3/arango.sock', + 'database' => 'repression', + 'name' => 'repression', + 'password' => '' +]; diff --git a/mirzaev/gavno/system/settings/ipinfo.php.sample b/mirzaev/gavno/system/settings/ipinfo.php.sample new file mode 100644 index 0000000..7679934 --- /dev/null +++ b/mirzaev/gavno/system/settings/ipinfo.php.sample @@ -0,0 +1,3 @@ + + {{ block('hotline_body') }} + +{% endblock %} + +{% block js %} +{# {{ block('hotline_js') }} #} +{% endblock %} + +{% block js_init %} +{# {{ block('hotline_js_init') }} #} +{% endblock %} diff --git a/mirzaev/gavno/system/views/core.html b/mirzaev/gavno/system/views/core.html new file mode 100755 index 0000000..395d86c --- /dev/null +++ b/mirzaev/gavno/system/views/core.html @@ -0,0 +1,33 @@ + + + + + + {% use 'head.html' with title as head_title, meta as head_meta, css as head_css %} + + {% block title %} + {{ block('head_title') }} + {% endblock %} + + {% block meta %} + {{ block('head_meta') }} + {% endblock %} + + {% block css %} + {{ block('head_css') }} + {% endblock %} + + + + {% block body %} + {% endblock %} + + {% block js %} + {% include 'js.html' %} + {% endblock %} + + {% block js_init %} + {% endblock %} + + + diff --git a/mirzaev/gavno/system/views/footer.html b/mirzaev/gavno/system/views/footer.html new file mode 100755 index 0000000..6f86d01 --- /dev/null +++ b/mirzaev/gavno/system/views/footer.html @@ -0,0 +1,2 @@ +
+
diff --git a/mirzaev/gavno/system/views/head.html b/mirzaev/gavno/system/views/head.html new file mode 100755 index 0000000..65fc882 --- /dev/null +++ b/mirzaev/gavno/system/views/head.html @@ -0,0 +1,47 @@ +{% block title %} +{% if head.title != empty %}{{head.title}}{% else %}test{% endif %} +{% endblock %} + +{% block meta %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{% for meta in head.metas %} + +{% endfor %} +{% endblock %} + +{% block css %} + + +{% endblock %} diff --git a/mirzaev/gavno/system/views/header.html b/mirzaev/gavno/system/views/header.html new file mode 100755 index 0000000..c008643 --- /dev/null +++ b/mirzaev/gavno/system/views/header.html @@ -0,0 +1,11 @@ +{% block css %} +{% endblock %} + +{% block body %} +{% endblock %} + +{% block js %} +{% endblock %} + +{% block js_init %} +{% endblock %} diff --git a/mirzaev/gavno/system/views/index.html b/mirzaev/gavno/system/views/index.html new file mode 100755 index 0000000..d51afa8 --- /dev/null +++ b/mirzaev/gavno/system/views/index.html @@ -0,0 +1,238 @@ +{% extends "core.html" %} + +{% use "core.html" with css as core_css, body as core_body, js as core_js, js_init as core_js_init %} +{% use "header.html" with css as header_css, body as header_body, js as header_js, js_init as header_js_init %} +{% use 'account/element.html' with css as account_css, body as account_body, js as account_js %} + +{% block css %} +{{ block('core_css') }} +{{ block('header_css') }} +{{ block('account_css') }} +{% endblock %} + +{% block body %} +{{ block('account_body') }} +{{ block('core_body') }} + + + + {% block main %} +
+ + + +
+ +
+
+
Switzerland Alps
+
+
+
SAINT
+
+
+
ANTONIEN
+
+
+ Tucked away in the Switzerland Alps, Saint Antönien offers an idyllic retreat for those seeking tranquility and + adventure alike. It's a hidden gem for backcountry skiing in winter and boasts lush trails for hiking and mountain + biking during the warmer months. +
+
+ + +
+
+ +
+
+
Switzerland Alps
+
+
+
SAINT
+
+
+
ANTONIEN
+
+
+ Tucked away in the Switzerland Alps, Saint Antönien offers an idyllic retreat for those seeking tranquility and + adventure alike. It's a hidden gem for backcountry skiing in winter and boasts lush trails for hiking and mountain + biking during the warmer months. +
+
+ + +
+
+ + + +
+ {% endblock %} + +{% endblock %} + +{% block js %} +{{ block('core_js') }} +{{ block('header_js') }} +{{ block('account_js') }} + +{% endblock %} + +{% block js_init %} +{{ block('core_js_init') }} +{{ block('header_js_init') }} + +{% endblock %} diff --git a/mirzaev/gavno/system/views/js.html b/mirzaev/gavno/system/views/js.html new file mode 100755 index 0000000..45c56ea --- /dev/null +++ b/mirzaev/gavno/system/views/js.html @@ -0,0 +1,5 @@ +{% block js %} + + + +{% endblock %} diff --git a/mirzaev/gavno/system/views/manager.php b/mirzaev/gavno/system/views/manager.php new file mode 100755 index 0000000..3b6c185 --- /dev/null +++ b/mirzaev/gavno/system/views/manager.php @@ -0,0 +1,25 @@ + + */ +final class manager extends controller +{ + public function render(string $file, array $vars = []): ?string + { + // Генерация представления + return (new view(new FilesystemLoader(VIEWS)))->render($file, $vars); + } +}