locale update

This commit is contained in:
gerchek 2024-03-20 09:09:00 +05:00
parent 60f0582052
commit 4ae00b5a28
4 changed files with 227 additions and 10 deletions

View File

@ -24,6 +24,7 @@ function onStart(){
?>
==
{% partial 'home/slider' %}
{% partial 'home/sales' %}
{% partial 'home/sales_home' %}
{% partial 'home/movies' %}
{% partial 'home/shops' %}
{% partial 'home/shops' %}

View File

@ -6,10 +6,10 @@ is_hidden = 0
<?php
function onStart(){
$this['sales'] = Tps\Shops\Models\Sale::all();
$this['sales_all'] = $this['sales']->slice(0, 9);
$this['sales_news'] = $this['sales']->where("type", "news")->slice(0, 9);
$this['sales_promo'] = $this['sales']->where("type", "promo")->slice(0, 9);
$this['sales_discount'] = $this['sales']->where("type", "discount")->slice(0, 9);
$this['sales_all'] = $this['sales'];
$this['sales_news'] = $this['sales']->where("type", "news");
$this['sales_promo'] = $this['sales']->where("type", "promo");
$this['sales_discount'] = $this['sales']->where("type", "discount");
}
?>
==

View File

@ -1,5 +1,10 @@
==
<!-- Shops ============================ -->
<style>
.pagination-buttons{
margin-top: 30px;
}
</style>
<section class="shops">
<div class="auto_container">
<div class="shops_wrap">
@ -338,7 +343,7 @@
<!-- Shops end ========================= -->
<script>
document.addEventListener("DOMContentLoaded", function () {
var itemsPerPage = 3;
var itemsPerPage = 9;
var currentPage = 0;
var items = document.querySelectorAll(".shops_item_data");
var totalPages = Math.ceil(items.length / itemsPerPage);
@ -408,7 +413,7 @@
<script>
document.addEventListener("DOMContentLoaded", function () {
var itemsPerPage = 3;
var itemsPerPage = 9;
var currentPage = 0;
var items = document.querySelectorAll("#news .shops_item");
var totalPages = Math.ceil(items.length / itemsPerPage);
@ -474,7 +479,7 @@
<script>
document.addEventListener("DOMContentLoaded", function () {
var itemsPerPage = 3;
var itemsPerPage = 9;
var currentPage = 0;
var items = document.querySelectorAll("#discount .shops_item");
var totalPages = Math.ceil(items.length / itemsPerPage);
@ -537,7 +542,7 @@
<script>
document.addEventListener("DOMContentLoaded", function () {
var itemsPerPage = 3;
var itemsPerPage = 9;
var currentPage = 0;
var items = document.querySelectorAll("#stocks .shops_item");
var totalPages = Math.ceil(items.length / itemsPerPage);

View File

@ -0,0 +1,211 @@
==
<!-- Shops ============================ -->
<section class="shops">
<div class="auto_container">
<div class="shops_wrap">
<div class="shops_tab">
<h4 class="shops_tab-link tabBtn active" data-tab="#all">
{{'ВСЕ'|_}}
</h4>
<h4 class="shops_tab-link tabBtn" data-tab="#news">
{{'Новости'|_}}
</h4>
<h4 class="shops_tab-link tabBtn" data-tab="#discount">
{{'Скидки'|_}}
</h4>
<h4 class="shops_tab-link tabBtn" data-tab="#stocks">
{{'АКЦИИ'|_}}
</h4>
</div>
<div class="shops_block tabItem active" id="all">
{% for sale in sales_all %}
<a href="{{ url('/') }}/sale/{{sale.id}}" class="shops_item wow fadeInUp shops_item_data" data-wow-duration=".3s" data-wow-delay=".1s">
<div class="shops_item-photo">
<img src="{{sale.images.first.path}}" alt="shop-photo">
</div>
<h6 class="shops_item-label">
{% if sale.type == "news"%}
{{'НОВОСТИ'|_}}
{% elseif sale.type == "promo"%}
{{'АКЦИЯ'|_}}
{% elseif sale.type == "discount"%}
{{'СКИДКИ'|_}}
{% endif %}
</h6>
<div class="shops_item-info">
<h5 class="shops_item-name">
{{sale.shop.name}}
</h5>
<h5 class="shops_item-floor">
{{sale.shop.floor}}
<span>
{{'ЭТАЖ'|_}}
</span>
</h5>
</div>
<div class="shops_item-content">
{% if sale.start_date and sale.end_date%}
<p>
<span>
<img src="{{ 'assets/images/svg/clock.svg'|theme }}" alt="clock-icon">
</span>
{{sale.start_date|date('Y-m-d')}} - {{sale.end_date|date('Y-m-d')}}
</p>
{% endif %}
<h4 class="shops_item-content-txt">
{{sale.name}}
</h4>
</div>
</a>
{% endfor %}
</div>
<div class="shops_block tabItem" id="news">
{% for sale in sales_news %}
<a href="{{ url('/') }}/sale/{{sale.id}}" class="shops_item">
<div class="shops_item-photo">
<img src="{{sale.images.first.path}}" alt="shop-photo">
</div>
<h6 class="shops_item-label">
{{'НОВОСТИ'|_}}
</h6>
{% if sale.shop%}
<div class="shops_item-info">
<h5 class="shops_item-name">
{{ sale.shop.name}}
</h5>
<h5 class="shops_item-floor">
{{ sale.shop.floor}}
<span>
{{'ЭТАЖ'|_}}
</span>
</h5>
</div>
{% endif %}
<div class="shops_item-content">
{% if sale.start_date and sale.end_date%}
<p>
<span>
<img src="{{ 'assets/images/svg/clock.svg'|theme }}" alt="clock-icon">
</span>
{{sale.start_date}} - {{sale.end_date}}
</p>
{% endif %}
<h4 class="shops_item-content-txt">
{{sale.name}}
</h4>
</div>
</a>
{% endfor %}
</div>
<div class="shops_block tabItem" id="discount">
{% for sale in sales_discount %}
<a href="{{ url('/') }}/sale/{{sale.id}}" class="shops_item">
<div class="shops_item-photo">
<img src="{{sale.images.first.path}}" alt="shop-photo">
</div>
<h6 class="shops_item-label">
{{'СКИДКИ'|_}}
</h6>
{% if sale.shop%}
<div class="shops_item-info">
<h5 class="shops_item-name">
{{ sale.shop.name}}
</h5>
<h5 class="shops_item-floor">
{{ sale.shop.floor}}
<span>
{{'ЭТАЖ'|_}}
</span>
</h5>
</div>
{% endif %}
<div class="shops_item-content">
{% if sale.start_date and sale.end_date%}
<p>
<span>
<img src="{{ 'assets/images/svg/clock.svg'|theme }}" alt="clock-icon">
</span>
{{sale.start_date}} - {{sale.end_date}}
</p>
{% endif %}
<h4 class="shops_item-content-txt">
{{sale.name}}
</h4>
</div>
</a>
{% endfor %}
</div>
<div class="shops_block tabItem" id="stocks">
{% for sale in sales_promo %}
<a href="{{ url('/') }}/sale/{{sale.id}}" class="shops_item">
<div class="shops_item-photo">
<img src="{{sale.images.first.path}}" alt="shop-photo">
</div>
<h6 class="shops_item-label">
{{'АКЦИЯ'|_}}
</h6>
{% if sale.shop%}
<div class="shops_item-info">
<h5 class="shops_item-name">
{{ sale.shop.name}}
</h5>
<h5 class="shops_item-floor">
{{ sale.shop.floor}}
<span>
{{'ЭТАЖ'|_}}
</span>
</h5>
</div>
{% endif %}
<div class="shops_item-content">
{% if sale.start_date and sale.end_date%}
<p>
<span>
<img src="{{ 'assets/images/svg/clock.svg'|theme }}" alt="clock-icon">
</span>
{{sale.start_date}} - {{sale.end_date}}
</p>
{% endif %}
<h4 class="shops_item-content-txt">
{{sale.name}}
</h4>
</div>
</a>
{% endfor %}
</div>
</div>
</div>
</section>
<!-- Shops end ========================= -->