Vinoteca: wine shop on 1C-Bitrix (module, template, components, pages)

This commit is contained in:
jimagie committed 2026-10-22 23:22:27 +05:00
commit 52795535ae
586 files changed
+27619

No files matched your search

+91
View File
@@ -0,0 +1,91 @@
<?php
use Bitrix\Main\Localization\Loc;
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();
Loc::loadMessages(__FILE__);
$tpl = SITE_TEMPLATE_PATH;
$jwAsset = \Bitrix\Main\Page\Asset::getInstance();
foreach (array("vino-altcha", "vino-password", "vino-gate", "vino-header", "vino-reveal", "vino-state", "vino-fav", "vino-compare", "vino-busy", "vino-cart", "vino-phone", "vino-sommelier", "vino-subscribe") as $jwScript) {
$jwAsset->addJs(SITE_TEMPLATE_PATH . "/assets/js/" . $jwScript . ".js");
}
$jwLang = LANGUAGE_ID;
$jwDemoMail = htmlspecialcharsbx(\Jinove\Vinoteca\Config::contacts()["demoMail"]);
?><!DOCTYPE html>
<html lang="<?= $jwLang ?>">
<head>
<meta charset="<?= LANG_CHARSET ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="<?= SITE_TEMPLATE_PATH ?>/assets/js/vino-reveal-init.js?v=1" data-skip-moving="true"></script>
<title><?php $APPLICATION->ShowTitle() ?></title>
<link rel="icon" href="/favicon.ico?v=5" sizes="any">
<link rel="icon" type="image/svg+xml" href="/favicon.svg?v=5">
<link rel="apple-touch-icon" href="/apple-touch-icon.png?v=5">
<?php
$jwCanon = \Jinove\Vinoteca\Seo::currentPath();
$APPLICATION->AddBufferContent(array(\Jinove\Vinoteca\Seo::class, "headLinks"), $jwCanon, VINO_HOST, VINO_LANGS, "en");
?>
<?php $APPLICATION->AddBufferContent(array(\Jinove\Vinoteca\Seo::class, "openGraph"), $jwCanon); ?>
<?php
$APPLICATION->ShowHead();
?>
</head>
<body class="vino-body <?php $APPLICATION->ShowProperty("body_class"); ?>">
<a class="vino-skip" href="#main"><?= Loc::getMessage("VINO_HEADER_SKIP") ?></a>
<?php $APPLICATION->ShowPanel(); ?>
<p class="vino-demo-bar" role="note"><?= Loc::getMessage("VINO_HEADER_DEMO", array(
"#JIMAGIE#" => '<a class="vino-demo-bar__link" href="https://jimagie.com' . SITE_DIR . '" target="_blank" rel="noopener">jimagie</a>',
"#MAIL#" => '<a class="vino-demo-bar__link" href="mailto:' . $jwDemoMail . '">' . $jwDemoMail . '</a>',
)) ?></p>
<header class="vino-header" data-header>
<div class="vino-header__inner">
<a class="vino-logo vino-logo--header" href="<?= SITE_DIR ?>" aria-label="Vinoteca">
<img class="vino-icon vino-logo__icon" src="<?= $tpl ?>/assets/brand/vinoteca-icon.svg?v=5" width="40" height="40" alt="" aria-hidden="true" loading="eager" decoding="async">
<span class="vino-logo__name" aria-hidden="true">Vinoteca</span>
</a>
<?php $APPLICATION->IncludeComponent(
"bitrix:menu", "vinoteca_top", array(
"ROOT_MENU_TYPE" => "top",
"MENU_CACHE_TYPE" => "A",
"MENU_CACHE_TIME" => "3600",
"MENU_CACHE_USE_GROUPS" => "Y",
"MENU_CACHE_GET_VARS" => array(),
"MAX_LEVEL" => "1",
"USE_EXT" => "N",
"DELAY" => "N",
"ALLOW_MULTI_SELECT" => "N",
),
false
); ?>
<div class="vino-actions">
<div class="vino-lang" data-lang>
<button type="button" class="vino-lang__current" aria-expanded="false" aria-controls="vino-lang-menu" data-lang-toggle>
<span class="vino-lang__label"><?php foreach (VINO_LANGS as $jwL => $jwLd): ?><span class="vino-lang__text<?= $jwL === $jwLang ? "" : " vino-lang__text--ghost" ?>"<?= $jwL === $jwLang ? "" : ' aria-hidden="true"' ?>><?= $jwLd["label"] ?></span><?php endforeach; ?></span>
<svg class="vino-lang__chev" viewBox="0 0 10 6" fill="none" aria-hidden="true"><path d="M1 1l4 4 4-4" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"></path></svg>
</button>
<div class="vino-lang__menu" id="vino-lang-menu">
<?php foreach (VINO_LANGS as $jwL => $jwLd): ?><a class="vino-lang__option<?= $jwL === $jwLang ? " vino-lang__option--active" : "" ?>" hreflang="<?= $jwL ?>" lang="<?= $jwL ?>" href="<?= htmlspecialcharsbx(\Jinove\Vinoteca\Language::url($jwL)) ?>"><?= $jwLd["label"] ?></a><?php endforeach; ?>
</div>
</div>
<button type="button" class="vino-act vino-act--search" aria-label="<?= htmlspecialcharsbx(Loc::getMessage("VINO_HEADER_SEARCH")) ?>" title="<?= htmlspecialcharsbx(Loc::getMessage("VINO_HEADER_SEARCH")) ?>" aria-expanded="false" aria-controls="vino-search" data-search-open><svg class="vino-icon vino-icon--search" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="7"></circle><path d="m20 20-3.6-3.6"></path></svg></button>
<a class="vino-act vino-act--account" href="<?= htmlspecialcharsbx(\Jinove\Vinoteca\Account::url()) ?>" aria-label="<?= htmlspecialcharsbx(\Jinove\Vinoteca\Account::label("VINO_HEADER_ACCOUNT", "VINO_HEADER_LOGIN")) ?>" title="<?= htmlspecialcharsbx(\Jinove\Vinoteca\Account::label("VINO_HEADER_ACCOUNT", "VINO_HEADER_LOGIN")) ?>"><svg class="vino-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="7.5" r="3.5"></circle><path d="M5 20a7 7 0 0 1 14 0"></path></svg></a>
<a class="vino-act vino-act--fav" href="<?= SITE_DIR ?>personal/favorites/" aria-label="<?= htmlspecialcharsbx(Loc::getMessage("VINO_HEADER_FAVORITES")) ?>" title="<?= htmlspecialcharsbx(Loc::getMessage("VINO_HEADER_FAVORITES")) ?>"><svg class="vino-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M19 14c1.5-1.5 3-3.2 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.8 0-3 .5-4.5 2-1.5-1.5-2.7-2-4.5-2A5.5 5.5 0 0 0 2 8.5C2 10.8 3.5 12.5 5 14l7 7Z"></path></svg><span class="vino-act__count" data-fav-count hidden></span></a>
<a class="vino-act vino-act--compare" href="<?= SITE_DIR ?>compare/" aria-label="<?= htmlspecialcharsbx(Loc::getMessage("VINO_HEADER_COMPARE")) ?>" title="<?= htmlspecialcharsbx(Loc::getMessage("VINO_HEADER_COMPARE")) ?>"><svg class="vino-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 20V11M12 20V4M18 20v-6"></path></svg><span class="vino-act__count" data-compare-count hidden></span></a>
<a class="vino-act vino-act--cart" href="<?= SITE_DIR ?>personal/cart/" aria-label="<?= htmlspecialcharsbx(Loc::getMessage("VINO_HEADER_CART")) ?>" title="<?= htmlspecialcharsbx(Loc::getMessage("VINO_HEADER_CART")) ?>"><svg class="vino-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="9" cy="20" r="1.3"></circle><circle cx="18" cy="20" r="1.3"></circle><path d="M2 3h2.2l2.3 12.1a1.5 1.5 0 0 0 1.5 1.2h9.6a1.5 1.5 0 0 0 1.5-1.2L21 6.5H5.3"></path></svg><span class="vino-act__count" aria-hidden="true" data-cart-count hidden></span></a>
<button type="button" class="vino-act vino-act--menu" aria-label="<?= htmlspecialcharsbx(Loc::getMessage("VINO_HEADER_MENU")) ?>" aria-expanded="false" aria-controls="vino-menu" data-menu-toggle><svg class="vino-icon" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="2" x2="18" y1="10" y2="10"></line><line x1="2" x2="18" y1="2" y2="2"></line><line x1="2" x2="18" y1="18" y2="18"></line></svg></button>
</div>
</div>
<?php $APPLICATION->IncludeComponent("jinove:catalog.megamenu", "", array(
"IBLOCK_ID" => VINO_CATALOG_IBLOCK,
"BRANDS_LIMIT" => 6,
"CACHE_TYPE" => "A",
"CACHE_TIME" => 86400,
), false, array("HIDE_ICONS" => "Y")); ?>
</header>
<div class="vino-search" id="vino-search" role="dialog" aria-modal="true" aria-label="<?= htmlspecialcharsbx(Loc::getMessage("VINO_HEADER_SEARCH")) ?>" data-search hidden>
<div class="vino-search__backdrop" data-search-close></div>
<div class="vino-search__bar">
<?php $APPLICATION->IncludeComponent("bitrix:search.title", "vinoteca", \Jinove\Vinoteca\Search::titleParams(), false, array("HIDE_ICONS" => "Y")); ?>
</div>
</div>
<main class="vino-main" id="main" tabindex="-1">