главная добита по визуалу

This commit is contained in:
Alisa
2026-06-07 23:13:03 +03:00
parent 66e931e0d6
commit 3a065b34d6
12 changed files with 196 additions and 104 deletions
+7 -7
View File
@@ -77,13 +77,13 @@ $faviconSvg = <<<'SVG'
SVG;
$faviconHref = 'data:image/svg+xml,' . rawurlencode($faviconSvg);
$homeEmbeddedImages = [
'home-hero-picnic' => '/assets/images/home/hero-picnic-sunset.png',
'home-warehouse-fish' => '/assets/images/home/warehouse-fish.jpg',
'home-banner-meat' => '/assets/images/home/banner-meat-grill.png',
'home-banner-seafood' => '/assets/images/home/banner-seafood-fresh.png',
'home-warehouse-main' => '/assets/images/home/warehouse-main.jpg',
'home-warehouse-arrival' => '/assets/images/home/warehouse-arrival.jpg',
'home-warehouse-cold' => '/assets/images/home/warehouse-cold.jpg',
'home-hero-picnic' => '/assets/images/home/hero-picnic-sunset.webp',
'home-warehouse-fish' => '/assets/images/home/warehouse-fish.webp',
'home-banner-meat' => '/assets/images/home/banner-meat-grill.webp',
'home-banner-seafood' => '/assets/images/home/banner-seafood-fresh.webp',
'home-warehouse-main' => '/assets/images/home/warehouse-main.webp',
'home-warehouse-arrival' => '/assets/images/home/warehouse-arrival.webp',
'home-warehouse-cold' => '/assets/images/home/warehouse-cold.webp',
];
try {
$megaCategories = (new \App\Repositories\CategoryRepository())->tree();
+2 -35
View File
@@ -235,9 +235,9 @@ $arrivalDate = $lastArrival->format('j') . ' ' . $months[(int) $lastArrival->for
<div class="home-catalog-heading">
<div>
<p class="eyebrow">Каталог продукции</p>
<h2>Подборки по категориям</h2>
<h2>Акции и новые поступления</h2>
</div>
<a class="subtle-link" href="/catalog">Весь каталог</a>
<a class="home-catalog-main-link" href="/catalog">Перейти во весь каталог</a>
</div>
<?php if (($homeCatalogSections ?? []) === []): ?>
@@ -245,7 +245,6 @@ $arrivalDate = $lastArrival->format('j') . ' ' . $months[(int) $lastArrival->for
<p class="muted">После наполнения каталога товары появятся здесь по категориям.</p>
</div>
<?php else: ?>
<?php $wishlistRequestRendered = false; ?>
<?php foreach ($homeCatalogSections as $section): ?>
<?php
$sectionProducts = $section['products'] ?? [];
@@ -254,10 +253,6 @@ $arrivalDate = $lastArrival->format('j') . ' ' . $months[(int) $lastArrival->for
}
$sectionKind = (string) ($section['kind'] ?? 'category');
?>
<?php if (!$wishlistRequestRendered && ($section['key'] ?? '') === 'myaso'): ?>
<?php require base_path('views/partials/wishlist-request-panel.php'); ?>
<?php $wishlistRequestRendered = true; ?>
<?php endif; ?>
<section class="home-product-section is-<?= e($sectionKind) ?>" id="home-<?= e((string) ($section['key'] ?? 'section')) ?>">
<div class="home-product-section-head">
<h3><?= e((string) ($section['title'] ?? 'Категория')) ?></h3>
@@ -277,35 +272,7 @@ $arrivalDate = $lastArrival->format('j') . ' ' . $months[(int) $lastArrival->for
<?php endforeach; ?>
</div>
</section>
<?php if (($section['key'] ?? '') === 'frukty-ovoschi-yagody-griby'): ?>
<section class="home-delivery-separator" aria-label="Расчет доставки">
<div>
<p class="eyebrow">Доставка и самовывоз</p>
<h3>Рассчитаем доставку до подъезда и подъем отдельно</h3>
<p>Внутри МКАД бесплатно от <?= e((string) ($settings['inside_mkad_free_from'] ?? '5000')) ?> руб. За МКАД бесплатная доставка от 10000 руб. до 10 км, дальше сумма бесплатной доставки зависит от расстояния.</p>
</div>
<form class="home-delivery-mini" action="/delivery" method="get">
<label>
<span>Сумма заказа</span>
<input type="number" name="amount" min="0" step="100" value="5000">
</label>
<label>
<span>Получение</span>
<select name="method">
<option value="pickup">Самовывоз</option>
<option value="inside" selected>Доставка внутри МКАД</option>
<option value="outside">Доставка за МКАД</option>
</select>
</label>
<button class="primary-button" type="submit">Открыть расчет</button>
</form>
</section>
<?php endif; ?>
<?php endforeach; ?>
<?php if (!$wishlistRequestRendered): ?>
<?php require base_path('views/partials/wishlist-request-panel.php'); ?>
<?php endif; ?>
<?php endif; ?>
</section>
+2 -2
View File
@@ -79,11 +79,11 @@ $isPurchasable = $isPublished && $isAvailable && $activePackagePrice > 0;
<?php if (!empty($product['main_image_path']) && $isPurchasable): ?>
<a class="product-card-image" href="/product/<?= e($product['slug']) ?>" aria-label="<?= e($product['name']) ?>">
<img src="<?= e((string) $product['main_image_path']) ?>" alt="<?= e((string) $product['name']) ?>">
<img src="<?= e((string) $product['main_image_path']) ?>" alt="<?= e((string) $product['name']) ?>" loading="lazy" decoding="async">
</a>
<?php elseif (!empty($product['main_image_path'])): ?>
<div class="product-card-image" aria-label="<?= e($product['name']) ?>">
<img src="<?= e((string) $product['main_image_path']) ?>" alt="<?= e((string) $product['name']) ?>">
<img src="<?= e((string) $product['main_image_path']) ?>" alt="<?= e((string) $product['name']) ?>" loading="lazy" decoding="async">
</div>
<?php elseif ($isPurchasable): ?>
<a class="product-card-image product-card-image-placeholder" href="/product/<?= e($product['slug']) ?>" aria-label="<?= e($product['name']) ?>">