Berkarar/themes/berkarar/pages/shop.htm

177 lines
13 KiB
HTML

title = "shop"
url = "/shop/:id"
layout = "default"
is_hidden = 0
==
<?php
function onStart(){
$id = $this->param('id');
$this['shop'] = Tps\Shops\Models\Shop::where("id", $id)->get()->first();
$this['others'] = Tps\Shops\Models\Shop::where("id", "!=", $id)->where("category_id", $this['shop']->category_id)->get();
if(!$this['others']->isEmpty()){
$this['others'] = $this['others']->random($this['others']->count() > 4 ? 4 : $this['others']->count())->values();
}
}
?>
==
{% put styles %}
<style>
.post_photo {
width: 650px;
margin-left: 60px;
display: block;
}
</style>
{% endput %}
<section class="crumb">
<div class="auto_container">
<div class="crumb_wrap">
<div class="crumb_row">
<a href="{{'home'|page}}" class="crumb_title">
<span>
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path
d="M1.25 12.88V6.91459C1.25 6.33752 1.51642 5.79278 1.97193 5.4385L6.85193 1.64294C7.52721 1.11773 8.47279 1.11773 9.14807 1.64294L14.0281 5.4385C14.4836 5.79278 14.75 6.33752 14.75 6.91459V12.88C14.75 13.9128 13.9128 14.75 12.88 14.75H10.75C10.4739 14.75 10.25 14.5261 10.25 14.25V11.6487C10.25 11.3855 10.207 11.1193 10.0677 10.896C9.88545 10.6039 9.64228 10.3523 9.35303 10.1595C8.95253 9.89251 8.48167 9.75 8 9.75C7.51833 9.75 7.04747 9.89251 6.64697 10.1595C6.35772 10.3523 6.11455 10.6039 5.93234 10.896C5.79305 11.1193 5.75 11.3855 5.75 11.6487V14.25C5.75 14.5261 5.52614 14.75 5.25 14.75H3.12C2.08723 14.75 1.25 13.9128 1.25 12.88Z"
stroke="#292929" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round" />
</svg>
</span>
{{'Главная'|_}}
</a>
<h4 class="crumb_title">
<!-- <a href="{{ url('/') }}/main-category/{{shop.category.top_category.id}}/{{shop.category.top_category.name}}"> -->
<a href="{{ url('/') }}/main-category/{{shop.category.top_category.id}}">
{{shop.category.top_category.name}}
</a>
</h4>
<h4 class="crumb_title">
<!-- <a href="{{ url('/') }}/category/{{shop.category.id}}/{{shop.category.name}}"> -->
<a href="{{ url('/') }}/category/{{shop.category.id}}">
{{shop.category.name}}
</a>
</h4>
<h4 class="crumb_title">
{{shop.name}}
</h4>
</div>
</div>
</div>
</section>
<section class="post">
<div class="auto_container">
<div class="post_wrap">
<div class="post_box">
<div class="post_info">
<h2 class="post_info-title wow fadeInUp" data-wow-duration=".3s" data-wow-delay=".1s">
{{shop.name}}
</h2>
<div class="post_info-row">
<h6 class="post_info-cnt wow fadeInUp" data-wow-duration=".3s" data-wow-delay=".1s">
{{shop.floor}} {{'ЭТАЖ'|_}}
</h6>
<h6 class="post_info-cnt wow fadeInUp" data-wow-duration=".3s" data-wow-delay=".1s">
{{shop.shop_number}}
</h6>
<h6 class="post_info-cnt wow fadeInUp" data-wow-duration=".3s" data-wow-delay=".13s">
<span>
<svg width="18" height="17" viewBox="0 0 18 17" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path
d="M8.88949 1.41675C7.48854 1.41675 6.11905 1.83218 4.9542 2.61051C3.78935 3.38883 2.88146 4.4951 2.34534 5.78941C1.80922 7.08372 1.66895 8.50794 1.94226 9.88197C2.21557 11.256 2.89019 12.5181 3.88082 13.5088C4.87144 14.4994 6.13357 15.174 7.5076 15.4473C8.88163 15.7206 10.3059 15.5803 11.6002 15.0442C12.8945 14.5081 14.0007 13.6002 14.7791 12.4354C15.5574 11.2705 15.9728 9.90103 15.9728 8.50008C15.9728 7.56989 15.7896 6.6488 15.4336 5.78941C15.0777 4.93002 14.5559 4.14916 13.8982 3.49141C13.2404 2.83366 12.4596 2.31191 11.6002 1.95593C10.7408 1.59996 9.81969 1.41675 8.88949 1.41675ZM8.88949 14.1667C7.76873 14.1667 6.67314 13.8344 5.74126 13.2117C4.80938 12.5891 4.08307 11.7041 3.65417 10.6686C3.22528 9.63317 3.11306 8.4938 3.33171 7.39457C3.55036 6.29534 4.09005 5.28564 4.88255 4.49314C5.67505 3.70065 6.68475 3.16095 7.78398 2.9423C8.8832 2.72365 10.0226 2.83587 11.058 3.26476C12.0935 3.69366 12.9785 4.41997 13.6012 5.35185C14.2238 6.28373 14.5562 7.37932 14.5562 8.50008C14.5562 10.003 13.9591 11.4443 12.8964 12.507C11.8337 13.5697 10.3924 14.1667 8.88949 14.1667Z"
fill="#292929" />
<path
d="M11.7228 7.79159H9.59782V5.66659C9.59782 5.47872 9.52319 5.29856 9.39035 5.16572C9.25751 5.03288 9.07735 4.95825 8.88949 4.95825C8.70162 4.95825 8.52146 5.03288 8.38862 5.16572C8.25578 5.29856 8.18115 5.47872 8.18115 5.66659V8.49992C8.18115 8.68778 8.25578 8.86795 8.38862 9.00079C8.52146 9.13363 8.70162 9.20825 8.88949 9.20825H11.7228C11.9107 9.20825 12.0908 9.13363 12.2237 9.00079C12.3565 8.86795 12.4312 8.68778 12.4312 8.49992C12.4312 8.31206 12.3565 8.13189 12.2237 7.99905C12.0908 7.86621 11.9107 7.79159 11.7228 7.79159Z"
fill="#292929" />
</svg>
</span>
{{shop.open_time}}
</h6>
<a href="tel:+993 61 616161" class="post_info-cnt wow hov fadeInUp" data-wow-duration=".3s" data-wow-delay=".17s">
<span>
<svg width="18" height="17" viewBox="0 0 18 17" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path
d="M12.7145 15.5833C9.82257 15.5795 7.05017 14.429 5.00527 12.3841C2.96037 10.3392 1.8099 7.56684 1.80615 4.67492C1.80615 3.81075 2.14944 2.98198 2.7605 2.37093C3.37155 1.75987 4.20032 1.41658 5.06449 1.41658C5.24748 1.41519 5.43016 1.4318 5.6099 1.46617C5.78366 1.49188 5.95448 1.53459 6.1199 1.59367C6.23624 1.63449 6.33992 1.70497 6.42067 1.79814C6.50142 1.89132 6.55645 2.00396 6.58032 2.12492L7.55074 6.37492C7.57689 6.49028 7.57374 6.61035 7.54157 6.72419C7.5094 6.83802 7.44924 6.94198 7.36657 7.02659C7.27449 7.12575 7.2674 7.13283 6.39615 7.58617C7.09386 9.11677 8.318 10.3459 9.84574 11.0499C10.3062 10.1716 10.3132 10.1645 10.4124 10.0724C10.497 9.98975 10.601 9.92958 10.7148 9.89741C10.8286 9.86524 10.9487 9.86209 11.0641 9.88825L15.3141 10.8587C15.4312 10.8858 15.5394 10.9424 15.6286 11.0229C15.7179 11.1034 15.7851 11.2054 15.8241 11.3191C15.8839 11.4872 15.9289 11.6602 15.9587 11.8362C15.9872 12.0142 16.0014 12.1942 16.0012 12.3745C15.9881 13.235 15.6352 14.0553 15.0194 14.6565C14.4036 15.2577 13.575 15.5908 12.7145 15.5833ZM5.06449 2.83325C4.57662 2.83512 4.10927 3.02975 3.76429 3.37472C3.41932 3.7197 3.22468 4.18705 3.22282 4.67492C3.2247 7.19169 4.22531 9.60484 6.00494 11.3845C7.78456 13.1641 10.1977 14.1647 12.7145 14.1666C13.2024 14.1647 13.6697 13.9701 14.0147 13.6251C14.3597 13.2801 14.5543 12.8128 14.5562 12.3249V12.0912L11.2695 11.3333L11.0641 11.7228C10.7453 12.3391 10.5116 12.7853 9.91657 12.5445C8.74278 12.1244 7.67731 11.448 6.79759 10.5646C5.91787 9.68123 5.24598 8.61295 4.83074 7.43742C4.57574 6.88492 5.0574 6.62992 5.66657 6.31117L6.05615 6.11992L5.29824 2.83325H5.06449Z"
fill="#292929" />
</svg>
</span>
+993 {{shop.phone}}
</a>
<h6 class="post_info-cnt wow fadeInUp" data-wow-duration=".3s" data-wow-delay=".2s">
<span>
<svg width="16" height="15" viewBox="0 0 16 15" fill="none"
xmlns="http://www.w3.org/2000/svg">
<rect x="1.42139" y="1.03125" width="12.9375" height="12.9375" rx="3.5"
stroke="#292929" stroke-width="1.5" />
<path
d="M10.7636 7.40494C10.776 7.78228 10.7141 8.15839 10.5812 8.51179C10.4483 8.86519 10.2472 9.18895 9.98917 9.4646C9.73118 9.74025 9.42142 9.96239 9.07757 10.1183C8.73373 10.2743 8.36254 10.3609 7.9852 10.3734C7.60785 10.3859 7.23175 10.3239 6.87835 10.1911C6.52495 10.0582 6.20118 9.85703 5.92553 9.59904C5.64988 9.34104 5.42775 9.03128 5.27181 8.68744C5.11588 8.34359 5.02919 7.9724 5.01671 7.59506C5.00423 7.21772 5.06619 6.84161 5.19906 6.48821C5.33193 6.13481 5.5331 5.81105 5.7911 5.5354C6.04909 5.25975 6.35886 5.03761 6.7027 4.88168C7.04654 4.72574 7.41773 4.63906 7.79508 4.62657C8.17242 4.61409 8.54853 4.67605 8.90193 4.80892C9.25532 4.94179 9.57909 5.14297 9.85474 5.40096C10.1304 5.65896 10.3525 5.96872 10.5085 6.31256C10.6644 6.65641 10.7511 7.0276 10.7636 7.40494Z"
stroke="#292929" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round" />
<path
d="M11.4743 4.65625C11.0601 4.65625 10.7243 4.32046 10.7243 3.90625C10.7243 3.49204 11.0601 3.15625 11.4743 3.15625V4.65625ZM11.4839 3.15625C11.8981 3.15625 12.2339 3.49204 12.2339 3.90625C12.2339 4.32046 11.8981 4.65625 11.4839 4.65625V3.15625ZM11.4743 3.15625H11.4839V4.65625H11.4743V3.15625Z"
fill="#292929" />
</svg>
</span>
{{shop.instagram_name}}
</h6>
</div>
<div class="post_info-txt wow fadeInUp" data-wow-duration=".3s" data-wow-delay=".23s">
{{shop.description}}
</div>
</div>
{% if shop.images|length > 0%}
<div class="post_photo wow fadeInRight" data-wow-duration=".3s" data-wow-delay=".1s">
<div class="shop_slider">
{% for image in shop.images %}
<div class="shop_slider-item">
<img src="{{image.path}}" alt="restaurant-photo">
</div>
{% endfor %}
</div>
</div>
{% endif %}
</div>
{% if others|length > 0 %}
<h2 class="post_slider-title wow fadeInUp" data-wow-duration=".3s" data-wow-delay=".1s">
{{'Другие'|_}}
</h2>
<div class="post_slider">
{% for shop in others %}
{% partial 'home/shop_item' shop=shop %}
{% endfor %}
</div>
<div class="post_link">
<!-- <a href="{{ url('/') }}/category/{{shop.category.id}}/{{shop.category.name}}"> -->
<a href="{{ url('/') }}/category/{{shop.category.id}}">
Посмотреть все
<span>
<svg width="14" height="12" viewBox="0 0 14 12" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path
d="M1.16732 6.83329H11.0507L8.02565 10.4666C7.95561 10.5509 7.90286 10.6481 7.8704 10.7528C7.83794 10.8574 7.82641 10.9675 7.83647 11.0766C7.85678 11.2969 7.9638 11.5002 8.13398 11.6416C8.30416 11.7831 8.52356 11.8511 8.74392 11.8308C8.96428 11.8105 9.16753 11.7035 9.30898 11.5333L13.4756 6.5333C13.5037 6.49353 13.5288 6.45175 13.5507 6.40829C13.5507 6.36663 13.5923 6.34163 13.609 6.29996C13.6468 6.20441 13.6665 6.1027 13.6673 5.99996C13.6665 5.89722 13.6468 5.79551 13.609 5.69996C13.609 5.6583 13.5673 5.6333 13.5507 5.59163C13.5288 5.54818 13.5037 5.5064 13.4756 5.46663L9.30898 0.466628C9.23063 0.372559 9.13251 0.296909 9.02161 0.245058C8.91071 0.193207 8.78974 0.166429 8.66732 0.166628C8.47261 0.166247 8.28391 0.23406 8.13398 0.358294C8.0496 0.428252 7.97985 0.514169 7.92872 0.611125C7.8776 0.708081 7.8461 0.814171 7.83604 0.923318C7.82597 1.03247 7.83754 1.14253 7.87008 1.2472C7.90262 1.35187 7.95548 1.44909 8.02565 1.53329L11.0507 5.16663H1.16732C0.946304 5.16663 0.734342 5.25443 0.578062 5.41071C0.421782 5.56699 0.333984 5.77895 0.333984 5.99996C0.333984 6.22098 0.421782 6.43294 0.578062 6.58922C0.734342 6.7455 0.946304 6.83329 1.16732 6.83329Z"
fill="#292929" />
</svg>
</span>
</a>
</div>
{% endif %}
</div>
</div>
</section>