added shiva theme part

master
A1Gard 3 days ago
parent c316001abf
commit cd294fc596

@ -170,6 +170,11 @@ section {
object-fit: cover;
}
.old-price{
text-decoration: red line-through;
color: gray;
}
@media print {
.no-print {

@ -30,10 +30,6 @@
padding: .5rem;
}
.old-price{
text-decoration: red line-through;
color: gray;
}
}
.fav-btn, .compare-btn {

@ -31,10 +31,6 @@
padding: .5rem;
}
.old-price {
text-decoration: red line-through;
color: gray;
}
}
.fav-btn, .compare-btn {

@ -0,0 +1,37 @@
<section class='ShivaProductGrid'>
<a class="fav-btn" data-slug="{{$product->slug}}" data-is-fav="{{$product->isFav()}}"
data-bs-custom-class="custom-tooltip"
data-bs-toggle="tooltip" data-bs-placement="auto" title="{{__("Add to / Remove from favorites")}}">
<i class="ri-heart-line"></i>
<i class="ri-heart-fill"></i>
</a>
<a class="compare-btn" data-slug="{{$product->slug}}"
data-bs-custom-class="custom-tooltip"
data-bs-toggle="tooltip" data-bs-placement="auto"
title="{{__("Add to/ Remove from compare list")}}">
<i class="ri-scales-3-line"></i>
</a>
<a href="{{$product->webUrl()}}">
<img src="{{$product->imgUrl()}}" alt="{{$product->name}}" loading="lazy">
<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>
<div class="p-2">
<a href="{{ route('client.product-card-toggle',$product->slug) }}"
class="btn btn-outline-primary w-100 add-to-card">
<i class="ri-shopping-bag-3-line"></i>
{{__("Add to card")}}
</a>
</div>
</a>
</section>

@ -0,0 +1,10 @@
{
"name": "ShivaProductGrid",
"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 ShivaProductGrid
{
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,91 @@
.ShivaProductGrid {
// scss
border: 1px solid silver;
box-shadow: var(--xshop-shadow);
border-radius: var(--xshop-border-radius);
position: relative;
overflow: hidden;
img{
width: 100%;
transition: 500ms;
}
h3 {
margin-top: 1rem;
text-align: center;
font-size: 20px;
font-weight: 300;
color: var(--xshop-text);
height: 2.5em;
overflow: hidden;
}
.prices {
position: absolute;
width: 100%;
display: grid;
grid-auto-columns: minmax(0, 1fr);
grid-auto-flow: column;
text-align: center;
inset-inline-end: 0;
top: 0;
border-radius: var(--xshop-border-radius);
span {
display: block;
padding: .5rem;
background: rgba(255, 255, 255, 0.76);
color: black;
}
}
.fav-btn, .compare-btn {
position: absolute;
inset-inline-end: -12%;
top: 60%;
width: 40px;
height: 40px;
background: #ffffff55;
font-size: 25px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
z-index: 4;
cursor: pointer;
transition: .4s;
&:hover {
background: var(--xshop-primary);
color: var(--xshop-diff);
}
}
.fav-btn {
top: calc(60% + 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;
}
}
}
&:hover {
.fav-btn, .compare-btn {
inset-inline-end: 3%;
}
img{
transform: scale(1.35) rotateZ(7deg);
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 KiB

@ -37,10 +37,7 @@
padding: .5rem;
}
.old-price{
text-decoration: red line-through;
color: gray;
}
}
.fav-btn, .compare-btn {

Loading…
Cancel
Save