Merge pull request #5813 from devansh-webkul/screen-width-adjusted
Screen Width Adjusted #5703
This commit is contained in:
commit
e8563a8318
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"/js/jquery-ez-plus.js": "/js/jquery-ez-plus.js?id=ba3c7cada62de152fd8f",
|
||||
"/js/velocity-core.js": "/js/velocity-core.js?id=8010dfb021a49555afa7",
|
||||
"/js/velocity.js": "/js/velocity.js?id=b7d7f53b5f50b56ea3d2",
|
||||
"/js/velocity.js": "/js/velocity.js?id=41ab97a1e8fa27ba1e09",
|
||||
"/js/manifest.js": "/js/manifest.js?id=3cded37ef514b0fb89b1",
|
||||
"/js/components.js": "/js/components.js?id=187f9cabca320d6d5194",
|
||||
"/js/components.js": "/js/components.js?id=4390fa88845ac905ec54",
|
||||
"/css/velocity.css": "/css/velocity.css?id=997141add2dccbf451e9",
|
||||
"/css/velocity-admin.css": "/css/velocity-admin.css?id=b67a82956e53163b5e3f",
|
||||
"/images/icon-calendar.svg": "/images/icon-calendar.svg?id=870d0f733a5837742276",
|
||||
|
|
|
|||
|
|
@ -1,53 +1,77 @@
|
|||
<template>
|
||||
<div :class="`stars mr5 fs${size ? size : '16'} ${pushClass ? pushClass : ''}`">
|
||||
<div
|
||||
:class="`stars mr5 fs${size ? size : '16'} ${
|
||||
pushClass ? pushClass : ''
|
||||
}`"
|
||||
>
|
||||
<input
|
||||
v-if="editable"
|
||||
type="number"
|
||||
:value="showFilled"
|
||||
name="rating"
|
||||
class="d-none" />
|
||||
class="d-none"
|
||||
/>
|
||||
|
||||
<i
|
||||
:class="`material-icons ${editable ? 'cursor-pointer' : ''}`"
|
||||
v-for="(rating, index) in parseInt((showFilled != 'undefined') ? showFilled : 3)"
|
||||
v-for="(rating, index) in parseInt(
|
||||
showFilled != 'undefined' ? showFilled : 3
|
||||
)"
|
||||
:key="`${index}${Math.random()}`"
|
||||
@click="updateRating(index + 1)">
|
||||
@click="updateRating(index + 1)"
|
||||
>
|
||||
star
|
||||
</i>
|
||||
|
||||
<template v-if="!hideBlank">
|
||||
<i
|
||||
:class="`material-icons ${editable ? 'cursor-pointer' : ''}`"
|
||||
v-for="(blankStar, index) in (5 - ((showFilled != 'undefined') ? showFilled : 3))"
|
||||
v-for="(blankStar, index) in 5 -
|
||||
(showFilled != 'undefined' ? showFilled : 3)"
|
||||
:key="`${index}${Math.random()}`"
|
||||
@click="updateRating(showFilled + index + 1)">
|
||||
@click="updateRating(showFilled + index + 1)"
|
||||
>
|
||||
star_border
|
||||
</i>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script type="text/javascript">
|
||||
export default {
|
||||
props: [
|
||||
'size',
|
||||
'ratings',
|
||||
'editable',
|
||||
'hideBlank',
|
||||
'pushClass',
|
||||
],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
showFilled: this.ratings,
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
updateRating: function (index) {
|
||||
index = Math.abs(index);
|
||||
this.editable ? this.showFilled = index : '';
|
||||
}
|
||||
},
|
||||
<style lang="scss">
|
||||
/**
|
||||
* Font size 18px till 420px screen width.
|
||||
*/
|
||||
@media only screen and (max-width: 420px) {
|
||||
.stars .material-icons {
|
||||
font-size: 18px;
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
||||
/**
|
||||
* Font size 12px till 322px screen width.
|
||||
*/
|
||||
@media only screen and (max-width: 322px) {
|
||||
.stars .material-icons {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
export default {
|
||||
props: ['size', 'ratings', 'editable', 'hideBlank', 'pushClass'],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
showFilled: this.ratings,
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
updateRating: function (index) {
|
||||
index = Math.abs(index);
|
||||
this.editable ? (this.showFilled = index) : '';
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -27,20 +27,20 @@
|
|||
<div class="reviews-container">
|
||||
@if (! $reviews->isEmpty())
|
||||
@foreach ($reviews as $review)
|
||||
<div class="col-12 lg-card-container list-card product-card row">
|
||||
<div class="row col-12 lg-card-container list-card product-card">
|
||||
<div class="product-image">
|
||||
@php
|
||||
$image = productimage()->getProductBaseImage($review->product);
|
||||
@endphp
|
||||
|
||||
<a
|
||||
title="{{ $review->product->name }}"
|
||||
href="{{ url()->to('/').'/'.$review->product->url_key }}">
|
||||
|
||||
<img src="{{ $image['small_image_url'] }}" title="{{ $review->product->name }}">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="product-information">
|
||||
<div class="product-information p-2">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="product-name">
|
||||
<a
|
||||
|
|
@ -60,15 +60,16 @@
|
|||
<div>
|
||||
<form id="deleteReviewForm" action="{{ route('customer.review.delete', $review->id) }}" method="post">
|
||||
@method('delete')
|
||||
|
||||
@csrf
|
||||
</form>
|
||||
|
||||
<a class="unset" href="javascript:void(0);" onclick="confirm('{{ __('shop::app.customer.account.review.delete.confirmation-message') }}') ? document.getElementById('deleteReviewForm').submit() : null;">
|
||||
<span class="rango-delete fs24"></span>
|
||||
|
||||
<span class="align-vertical-top">{{ __('shop::app.checkout.cart.remove') }}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -77,13 +78,11 @@
|
|||
<div class="bottom-toolbar">
|
||||
{{ $reviews->links() }}
|
||||
</div>
|
||||
{{-- <load-more-btn></load-more-btn> --}}
|
||||
@else
|
||||
<div class="fs16">
|
||||
{{ __('customer::app.reviews.empty') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.reviews.list.after', ['reviews' => $reviews]) !!}
|
||||
|
|
@ -118,7 +117,7 @@
|
|||
splitedParamsObject[page]
|
||||
}
|
||||
}
|
||||
})
|
||||
})()
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
@endpush
|
||||
|
|
|
|||
Loading…
Reference in New Issue