added minoo theme part

pull/49/head
A1Gard 1 month ago
parent 48ae713ae1
commit 8a5dec377e

@ -15,7 +15,7 @@
font-size: 20px;
font-weight: 300;
color: var(--xshop-text);
height: 2.1em;
height: 2.5em;
overflow: hidden;
}

@ -0,0 +1,40 @@
<div class="MinooProductGrid">
<a href="{{$product->webUrl()}}">
<img src="{{$product->imgUrl()}}" alt="{{$product->name}}" loading="lazy">
<img src="{{$product->imgUrl2()}}" class="img-2" alt="{{$product->name}}" loading="lazy">
<div class="">
<div class="btns">
<a href="{{ route('client.product-card-toggle',$product->slug) }}"
class="btn btn-primary add-to-card">
<i class="ri-shopping-bag-3-line"></i>
{{__("Add to card")}}
</a>
<a class="btn btn-outline-dark compare-btn text-dark" data-slug="{{$product->slug}}"
data-bs-custom-class="custom-tooltip"
data-bs-toggle="tooltip" data-bs-placement="top"
title="{{__("Add to/ Remove from compare list")}}">
<i class="ri-scales-3-line"></i>
</a>
<a class="btn btn-outline-secondary fav-btn" data-slug="{{$product->slug}}" data-is-fav="{{$product->isFav()}}"
data-bs-custom-class="custom-tooltip"
data-bs-toggle="tooltip" data-bs-placement="top" title="{{__("Add to / Remove from favorites")}}">
<i class="ri-heart-line"></i>
<i class="ri-heart-fill"></i>
</a>
</div>
</div>
<h3>
{{$product->name}}
</h3>
<div class="prices">
@if($product->hasDiscount())
<span class="old-price">
{{$product->oldPrice()}}
</span>
@endif
<span class="price">
{{$product->getPrice()}}
</span>
</div>
</a>
</div>

@ -0,0 +1,10 @@
{
"name": "MinooProductGrid",
"version": "1.0",
"author": "xStack",
"email": "xshop@xstack.ir",
"license": "GPL-3.0-or-later",
"url": "https:\/\/xstack.ir",
"author_url": "https:\/\/4xmen.ir",
"packages": []
}

@ -0,0 +1,21 @@
<?php
namespace Resources\Views\Segments;
use App\Models\Part;
class MinooProductGrid
{
public static function onAdd(Part $part = null)
{
}
public static function onRemove(Part $part = null)
{
}
public static function onMount(Part $part = null)
{
return $part;
}
}

@ -0,0 +1,104 @@
.MinooProductGrid {
//border: 1px solid silver;
//box-shadow: var(--xshop-shadow);
border-radius: var(--xshop-border-radius);
position: relative;
overflow: hidden;
img {
width: 100%;
}
h3 {
margin-top: 1rem;
text-align: start;
font-size: 20px;
font-weight: 300;
color: var(--xshop-text);
height: 1.3em;
overflow: hidden;
}
.prices {
display: grid;
grid-auto-columns: minmax(0, 1fr);
grid-auto-flow: column;
text-align: start;
span {
display: block;
padding: .5rem;
}
.old-price {
text-decoration: red line-through;
color: gray;
}
}
.fav-btn, .compare-btn {
//position: absolute;
//inset-inline-start: -12%;
//top: 3%;
width: 40px;
height: 40px;
background: #ffffff55;
font-size: 25px;
display: flex;
align-items: center;
justify-content: center;
z-index: 4;
cursor: pointer;
transition: .4s;
&:hover {
background: var(--xshop-primary);
color: var(--xshop-diff);
}
}
.fav-btn {
top: calc(3% + 50px);
&[data-is-fav="-1"] {
display: none;
}
&[data-is-fav="1"] {
.ri-heart-line {
display: none;
}
}
&[data-is-fav="0"] {
.ri-heart-fill {
display: none;
}
}
}
.btns {
display: flex;
flex: 1;
.add-to-card {
flex-grow: 4;
}
}
.img-2 {
position: absolute;
left: 0;
right: 0;
opacity: 0;
transition: 500ms;
}
&:hover {
.img-2 {
opacity: 1;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 KiB

Loading…
Cancel
Save