SetTitle((string)Loc::getMessage("VINO_SHOWCASE_H1")); $APPLICATION->SetPageProperty("title", (string)Loc::getMessage("VINO_SHOWCASE_TITLE")); $APPLICATION->SetPageProperty("description", (string)Loc::getMessage("VINO_SHOWCASE_DESCRIPTION")); $APPLICATION->SetPageProperty("vino_alternates", "N"); $asset = Asset::getInstance(); $asset->addCss(SITE_TEMPLATE_PATH . "/assets/vendor/photoswipe/photoswipe.css?v=5.4.4"); $asset->addJs(SITE_TEMPLATE_PATH . "/assets/vendor/photoswipe/photoswipe.umd.min.js?v=5.4.4"); $asset->addJs(SITE_TEMPLATE_PATH . "/assets/js/vino-shots.js?v=3"); } public static function pages(): array { $pages = []; foreach (self::PAGES as [$code, $path, $checks]) { $url = Config::host() . SITE_DIR . $path; $pages[] = [ "NAME" => (string)Loc::getMessage("VINO_SHOWCASE_PAGE_" . $code), "URL" => SITE_DIR . $path, "SCHEMA" => $checks ? "https://validator.schema.org/#url=" . rawurlencode($url) : "", "SPEED" => $checks ? "https://pagespeed.web.dev/analysis?url=" . rawurlencode($url) : "", ]; } return $pages; } public static function viewer(): array { return [ "closeTitle" => (string)Loc::getMessage("VINO_SHOWCASE_VIEWER_CLOSE"), "zoomTitle" => (string)Loc::getMessage("VINO_SHOWCASE_VIEWER_ZOOM"), "arrowPrevTitle" => (string)Loc::getMessage("VINO_SHOWCASE_VIEWER_PREV"), "arrowNextTitle" => (string)Loc::getMessage("VINO_SHOWCASE_VIEWER_NEXT"), "errorMsg" => (string)Loc::getMessage("VINO_SHOWCASE_VIEWER_ERROR"), ]; } public static function shots(): array { $dir = SITE_TEMPLATE_PATH . "/assets/media/admin/admin-" . (LANGUAGE_ID === "ru" ? "" : "en-"); $shots = []; foreach (self::SHOTS as [$number, $code, $height]) { $shots[] = [ "NAME" => (string)Loc::getMessage("VINO_SHOWCASE_SHOT_" . $code), "ALT" => (string)Loc::getMessage("VINO_SHOWCASE_SHOT_ALT", ["#NAME#" => (string)Loc::getMessage("VINO_SHOWCASE_SHOT_" . $code)]), "SRC" => $dir . $number . "-800.webp?v=4", "FULL" => $dir . $number . "-1920.webp?v=4", "HEIGHT" => $height, "FULL_HEIGHT" => (int)round($height * 1920 / 800), ]; } return $shots; } }