@ecomplus/widget-martan 1.1.22 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/.version +0 -0
  2. package/CHANGELOG.md +14 -0
  3. package/cms.config.js +78 -83
  4. package/dist/public/widget-martan.0.min.js +62 -0
  5. package/dist/public/widget-martan.0.min.js.map +1 -0
  6. package/dist/public/widget-martan.1.min.js.map +1 -1
  7. package/dist/public/widget-martan.2.min.js +1 -1
  8. package/dist/public/widget-martan.2.min.js.map +1 -1
  9. package/dist/public/widget-martan.3.min.js +1 -1
  10. package/dist/public/widget-martan.3.min.js.map +1 -1
  11. package/dist/public/widget-martan.4.min.js +1 -1
  12. package/dist/public/widget-martan.4.min.js.map +1 -1
  13. package/dist/public/widget-martan.5.min.js +1 -1
  14. package/dist/public/widget-martan.5.min.js.map +1 -1
  15. package/dist/public/widget-martan.6.min.js +2 -0
  16. package/dist/public/widget-martan.6.min.js.map +1 -0
  17. package/dist/public/widget-martan.7.min.js +2 -0
  18. package/dist/public/widget-martan.7.min.js.map +1 -0
  19. package/dist/public/widget-martan.8.min.js +2 -0
  20. package/dist/public/widget-martan.8.min.js.map +1 -0
  21. package/dist/public/widget-martan.9.min.js +2 -0
  22. package/dist/public/widget-martan.9.min.js.map +1 -0
  23. package/dist/public/widget-martan.var.min.js +3 -3
  24. package/dist/public/widget-martan.var.min.js.map +1 -1
  25. package/dist/widget-martan.0.min.js +62 -0
  26. package/dist/widget-martan.0.min.js.map +1 -0
  27. package/dist/widget-martan.1.min.js.map +1 -1
  28. package/dist/widget-martan.2.min.js +1 -1
  29. package/dist/widget-martan.2.min.js.map +1 -1
  30. package/dist/widget-martan.3.min.js +1 -1
  31. package/dist/widget-martan.3.min.js.map +1 -1
  32. package/dist/widget-martan.4.min.js +1 -1
  33. package/dist/widget-martan.4.min.js.map +1 -1
  34. package/dist/widget-martan.5.min.js +1 -1
  35. package/dist/widget-martan.5.min.js.map +1 -1
  36. package/dist/widget-martan.6.min.js +2 -0
  37. package/dist/widget-martan.6.min.js.map +1 -0
  38. package/dist/widget-martan.7.min.js +2 -0
  39. package/dist/widget-martan.7.min.js.map +1 -0
  40. package/dist/widget-martan.8.min.js +2 -0
  41. package/dist/widget-martan.8.min.js.map +1 -0
  42. package/dist/widget-martan.9.min.js +2 -0
  43. package/dist/widget-martan.9.min.js.map +1 -0
  44. package/dist/widget-martan.min.js +3 -3
  45. package/dist/widget-martan.min.js.map +1 -1
  46. package/package.json +2 -2
  47. package/src/append/product-block.ejs +5 -1
  48. package/src/append/product-card-slots.ejs +1 -1
  49. package/src/append/product-slots.ejs +1 -9
  50. package/src/index.js +17 -12
  51. package/src/utils/configProps.js +29 -0
  52. package/src/utils/lighten-color.js +20 -0
  53. package/src/utils/widget-initializer.js +60 -0
  54. package/src/widgets/questions/Questions.vue +436 -0
  55. package/src/widgets/questions/index.js +10 -0
  56. package/src/widgets/ratings/Rating.vue +223 -0
  57. package/src/widgets/ratings/index.js +232 -0
  58. package/src/widgets/reviews/Reviews.vue +317 -288
  59. package/src/widgets/reviews/components/Quickview.vue +390 -0
  60. package/src/widgets/reviews/components/Rating.vue +106 -0
  61. package/src/widgets/reviews/components/RatingBreakdown.vue +171 -0
  62. package/src/widgets/reviews/components/RatingHistogram.vue +306 -0
  63. package/src/widgets/reviews/components/RatingSummary.vue +226 -0
  64. package/src/widgets/reviews/components/RatingSummaryG.vue +104 -0
  65. package/src/widgets/reviews/components/ReviewCard.vue +223 -0
  66. package/src/widgets/reviews/{ReviewReply.vue → components/ReviewReply.vue} +42 -1
  67. package/src/widgets/reviews/{Score.vue → components/Score.vue} +3 -4
  68. package/src/widgets/reviews/{Sort.vue → components/Sort.vue} +1 -1
  69. package/src/widgets/reviews/components/SortDropdown.vue +184 -0
  70. package/src/widgets/reviews/components/VerifiedPurchase.vue +121 -0
  71. package/src/widgets/reviews/headers/Center.vue +248 -0
  72. package/src/widgets/reviews/headers/Compact.vue +225 -0
  73. package/src/widgets/reviews/headers/Histogram.vue +224 -0
  74. package/src/widgets/reviews/headers/Padrao.vue +113 -0
  75. package/src/widgets/reviews/headers/Summary.vue +217 -0
  76. package/src/widgets/reviews/index.js +2 -48
  77. package/src/append/body.ejs +0 -79
  78. package/src/append/head.ejs +0 -5
  79. package/src/append/stamps.ejs +0 -3
  80. package/src/widgets/reviews/AuthorAndRating.vue +0 -30
  81. package/src/widgets/reviews/AverageScore.vue +0 -160
  82. package/src/widgets/reviews/AverageTotal.vue +0 -35
  83. package/src/widgets/reviews/CardReview.vue +0 -87
  84. package/src/widgets/reviews/GridView.vue +0 -113
  85. package/src/widgets/reviews/HeaderExpanded.vue +0 -84
  86. package/src/widgets/reviews/HeaderMinimal.vue +0 -110
  87. package/src/widgets/reviews/ListView.vue +0 -47
  88. package/src/widgets/reviews/Quickview.vue +0 -397
  89. package/src/widgets/reviews/ReviewBody.vue +0 -39
  90. package/src/widgets/reviews/ThumbsPictures.vue +0 -135
  91. package/src/widgets/reviews/Total.vue +0 -79
  92. package/src/widgets/reviews/VerifiedPurchase.vue +0 -110
  93. package/src/widgets/reviews/isRecommended.vue +0 -44
  94. package/src/widgets/snippets/Rating.vue +0 -71
  95. package/src/widgets/snippets/Snippets.vue +0 -311
  96. package/src/widgets/snippets/index.js +0 -45
  97. /package/src/widgets/reviews/{VideoPlayer.vue → components/VideoPlayer.vue} +0 -0
@@ -1,107 +1,80 @@
1
1
  <template>
2
- <div
3
- :data-header="headerLayout"
4
- :data-layout="reviewsLayout"
5
- >
6
- <div class="mt-reviews container" :class="'mt-theme--' + headerLayout">
7
- <p class="lead">
8
- <a href="#reviews" :name="title || 'reviews'">#</a>
9
- {{ title }}
10
- </p>
11
-
12
- <total v-if="headerLayout !== 'header-expanded' && headerLayout !== 'header-minimal'"
13
- @onSort="onSort" :reviews="{ list, orderRating, total }" />
14
-
15
- <component @updateOrderByAverage="updateOrderBy" @onSort="onSort" :is="headerLayout"
16
- :reviews="{ averageTotal, average, total, orderRating }" :starColor="starColor"></component>
17
-
18
- <total v-if="headerLayout === 'header-expanded'"
19
- @onSort="onSort" :reviews="{ list, orderRating, total }" />
20
-
21
- <component :reviews="{ list, orderRating, total }" :starColor="starColor" @openQuickview="openQuickview"
22
- :is="reviewsLayout"></component>
23
-
24
- <div class="mt-questions__actions" v-if="showLoadMore()">
25
- <div class="mt-questions__pagination" id="mt-more-questions">
26
- <button class="btn btn-primary" @click="loadMore" :disabled="loading">
27
- {{ loading ? "Carregando.." : "Carregar mais" }}
28
- </button>
29
- </div>
2
+ <div v-show="total > 0" class="martan-reviews container">
3
+ <p class="lead" v-if="title">
4
+ <a href="#reviews" :name="title || 'reviews'">#</a>
5
+ {{ title }}
6
+ </p>
7
+
8
+ <component :is="config.widget_review.header_layout" :config="config" :rating="average"
9
+ :recommended="totalRecommended" :average="averageTotal" :total-rating="total" @rating-selected="updateOrderBy"
10
+ :list="list" :order-rating="orderRating" :offset="offset" />
11
+
12
+ <div :class="config.widget_review.reviews_layout">
13
+ <transition-group name="review-list" tag="div" :class="config.widget_review.reviews_layout">
14
+ <review-card
15
+ v-for="review in list"
16
+ :key="review.id"
17
+ :review="review"
18
+ :star-color="config.widget_review.star_color"
19
+ class="masonry-item"
20
+ @openQuickview="openQuickview"
21
+ />
22
+ </transition-group>
23
+ </div>
24
+
25
+ <div class="actions" v-if="showLoadMore()">
26
+ <div class="pagination">
27
+ <button class="btn btn-primary" @click="loadMore" :disabled="loading">
28
+ {{ loading ? "Carregando.." : "Mostrar mais avaliações" }}
29
+ </button>
30
30
  </div>
31
31
  </div>
32
32
 
33
- <quickview @onClose="onCloseQuickview" :isOpen="isOpenQuickView"
34
- :review="selectedReview" :starColor="starColor" />
33
+ <Quickview @onClose="onCloseQuickview" :isOpen="isOpenQuickView" :review="selectedReview" :starColor="config.widget_review.star_color" />
34
+
35
+ <div class="credit">
36
+ Avaliações reais, auditadas por
37
+ <a :href="getUrl" target="_blank" rel="noopener">MARTAN.app</a>
38
+ </div>
35
39
  </div>
36
40
  </template>
37
41
 
38
42
  <script>
43
+ import { MARTAN_API } from "../..";
39
44
 
40
- import ListView from "./ListView.vue";
41
- import GridView from "./GridView.vue";
42
- import Total from "./Total.vue";
43
- import Quickview from "./Quickview.vue";
44
- import { MARTAN_API } from '../..';
45
+ import Ratings from "../ratings";
46
+
47
+ import { configProp } from "../../utils/configProps";
45
48
 
46
49
  export default {
47
50
  name: "Reviews",
48
51
 
49
52
  props: {
50
- storeId: {
51
- type: Number,
52
- required: true
53
- },
54
- webId: {
55
- type: String,
56
- required: true
57
- },
53
+ ...configProp,
58
54
  product: {
59
55
  type: String,
60
- required: true
61
- },
62
- backgroundColor: {
63
- type: String,
64
- default: "#fff",
65
- },
66
- starColor: {
67
- type: String,
68
- default: "#212529",
69
- },
70
- primaryColor: {
71
- type: String,
72
- default: "#212529",
73
- },
74
- headerLayout: {
75
- type: String,
76
- default: "header-minimal",
77
- },
78
- reviewsLayout: {
79
- type: String,
80
- default: "list-grid",
81
- },
82
- title: {
83
- type: String,
84
- },
85
- showTitle: {
86
- type: Boolean,
87
- default: true,
88
- },
56
+ required: true,
57
+ }
89
58
  },
90
59
 
91
60
  data() {
92
61
  return {
93
62
  list: [],
94
63
  total: 0,
95
- limit: 5,
64
+ limit: 4,
96
65
  offset: 0,
66
+
97
67
  loading: false,
68
+
98
69
  orderRating: null,
99
70
  orderReviews: null,
100
- averageTotal: 0,
101
71
 
102
72
  $isSorting: false,
103
73
  $count: null,
74
+ hasMore: false,
104
75
 
76
+ averageTotal: 0,
77
+ totalRecommended: null,
105
78
  average: {
106
79
  one: 0,
107
80
  two: 0,
@@ -112,10 +85,18 @@ export default {
112
85
 
113
86
  isOpenQuickView: false,
114
87
  selectedReview: null,
88
+ isScrollable: false,
89
+
90
+ $listEl: null,
115
91
  };
116
92
  },
117
93
 
118
94
  watch: {
95
+ onlyWithPictures: function (newVal) {
96
+ if (!this.$listEl && newVal.length > 0) {
97
+ this.$listEl = document.querySelector(".reviews-with-pictures");
98
+ }
99
+ },
119
100
  orderRating: function (oldOrder, newOrder) {
120
101
  if (oldOrder !== newOrder) {
121
102
  this.list = [];
@@ -139,6 +120,28 @@ export default {
139
120
  },
140
121
  },
141
122
 
123
+ computed: {
124
+ i19basedOn$1Reviews: () => "Baseado em $1 avaliações",
125
+ i19basedOn$1Review: () => "Baseado em $1 avaliação",
126
+ i19noReview: () => "Nenhuma avaliação",
127
+ onlyWithPictures() {
128
+ return this.list.filter(
129
+ (review) => review.pictures && review.pictures.length > 0
130
+ );
131
+ },
132
+ getUrl() {
133
+ const url = new URL(window.location.href);
134
+ const ref = url.origin;
135
+ return `https://www.martan.app/?ref=${ref}`;
136
+ },
137
+ title() {
138
+ if (this.config.widget_review.title) {
139
+ return this.config.widget_review.title;
140
+ }
141
+ return null;
142
+ }
143
+ },
144
+
142
145
  methods: {
143
146
  fetchReviews() {
144
147
  const params = {
@@ -161,16 +164,19 @@ export default {
161
164
  this.loading = true;
162
165
 
163
166
  axios({
164
- url: MARTAN_API + '/reviews.json',
167
+ url: MARTAN_API + "/api/v1/reviews.json",
165
168
  headers: {
166
- "X-Store-Id": this.storeId,
167
- "X-Web-Id": this.webId,
169
+ "X-Store-Id": this.config.store_id,
170
+ "X-Api-Key": this.config.web_id,
168
171
  },
169
172
  params,
170
173
  })
171
174
  .then(({ data }) => {
172
175
  const { result, count } = data;
173
176
  let list = [];
177
+
178
+ this.hasMore = result.length >= this.limit;
179
+
174
180
  if (
175
181
  (Array.isArray(this.list) && !this.orderReviews) ||
176
182
  (this.orderReviews && this.$isSorting)
@@ -183,7 +189,7 @@ export default {
183
189
  }
184
190
  }
185
191
 
186
- list = [...this.list, ...list];
192
+ list = [...this.list];
187
193
  } else if (
188
194
  (Array.isArray(this.list) && this.orderReviews) ||
189
195
  this.orderRating
@@ -201,7 +207,6 @@ export default {
201
207
  } else {
202
208
  this.total = count;
203
209
  }
204
-
205
210
  this.list = list;
206
211
 
207
212
  return list;
@@ -216,28 +221,23 @@ export default {
216
221
  });
217
222
  },
218
223
 
219
- fetchAverage() {
220
- axios({
221
- url: MARTAN_API + '/average.json',
222
- headers: {
223
- "X-Store-Id": this.storeId,
224
- "X-Web-Id": this.webId,
225
- },
226
- params: {
227
- sku: this.product,
228
- },
229
- })
230
- .then(({ data }) => {
231
- if (data.length) {
232
- const { average, rating } = data[0];
233
- Object.assign(this.average, rating);
234
- this.averageTotal = average;
235
- }
224
+ async fetchAverage() {
225
+ try {
226
+ const rating = new Ratings({
227
+ store_id: this.config.store_id,
228
+ web_id: this.config.web_id,
236
229
  })
237
-
238
- .finally(() => {
239
- this.loading = false;
240
- });
230
+ await rating.fetchRatings()
231
+ const data = rating.getProductRatingFromList(this.product);
232
+ if (data) {
233
+ const { average, rate, recommended_percentage } = data;
234
+ Object.assign(this.average, rate);
235
+ this.averageTotal = average;
236
+ this.totalRecommended = recommended_percentage;
237
+ }
238
+ } catch (error) {
239
+ console.error('Failed to load average from Martan', error);
240
+ }
241
241
  },
242
242
 
243
243
  loadMore() {
@@ -249,34 +249,34 @@ export default {
249
249
  },
250
250
 
251
251
  showLoadMore() {
252
- if (
253
- !this.orderRating &&
254
- this.total > 0 &&
255
- this.list.length < this.total
256
- ) {
257
- return true;
252
+ if (this.loading) {
253
+ return false;
258
254
  }
259
255
 
260
- if (
261
- this.orderRating &&
262
- this.$count > 0 &&
263
- this.list.length < this.$count
264
- ) {
265
- return true;
256
+ if (!this.hasMore) {
257
+ return false;
258
+ }
259
+
260
+ if (this.orderRating) {
261
+ return this.$count > 0 && this.list.length < this.$count;
262
+ } else {
263
+ return this.total > 0 && this.list.length < this.total;
266
264
  }
267
265
  },
268
266
 
269
- updateOrderBy({ rating }) {
267
+ updateOrderBy(rating) {
270
268
  if (rating === this.orderRating) {
271
269
  this.orderRating = null;
272
270
  } else {
273
271
  this.offset = 0;
274
272
  this.orderRating = rating;
275
273
  }
274
+ this.hasMore = true;
276
275
  },
277
276
 
278
277
  onSort({ order }) {
279
278
  this.orderReviews = order;
279
+ this.hasMore = true;
280
280
  },
281
281
 
282
282
  openQuickview: function ({ review }) {
@@ -288,209 +288,238 @@ export default {
288
288
  this.isOpenQuickView = false;
289
289
  this.selectedReview = null;
290
290
  },
291
- },
292
-
293
- mounted() {
294
- Promise.all([this.fetchAverage(), this.fetchReviews()]);
295
- },
296
-
297
- components: {
298
- "list-grid": () => import("./GridView.vue"),
299
- "list-expanded": () => import("./ListView.vue"),
300
- "header-expanded": () => import("./HeaderExpanded.vue"),
301
- "header-minimal": () => import("./HeaderMinimal.vue"),
302
- Total,
303
- ListView,
304
- GridView,
305
- Quickview
306
- },
307
- };
308
- </script>
309
-
310
- <style lang="scss">
311
- .mt-review {
312
- padding: 25px 0 22px;
313
-
314
- &:first-child {
315
- padding-top: 0;
316
- }
317
- }
318
291
 
319
- .mt-review__title {
320
- color: #6b6d76;
321
- font-size: 16px;
322
- }
292
+ checkScrollability() {
293
+ const list = this.$listEl;
294
+ if (!list) return;
323
295
 
324
- .mt-review__date {
325
- font-size: 10px;
326
- color: #475569;
327
- color: #777;
328
- }
329
-
330
- .mt-review__body {
331
- opacity: 0.9;
332
- margin-top: 10px;
333
- font-size: 16px;
334
- line-height: 1.6;
335
- text-align: justify;
336
- }
296
+ this.isScrollable = list.scrollWidth > list.clientWidth;
297
+ },
298
+ scrollLeft() {
299
+ const list = this.$listEl;
300
+ if (!list) return;
337
301
 
338
- .mt-rating__group {
339
- width: 100%;
340
- display: flex;
341
- flex-direction: column;
342
- gap: 5px;
343
- }
302
+ list.scrollBy({ left: -1500, behavior: "smooth" });
303
+ },
304
+ scrollRight() {
305
+ const list = this.$listEl;
306
+ if (!list) return;
344
307
 
345
- .mt-review__author {
346
- font-size: 14px;
347
- color: #333;
348
- font-weight: bolder;
349
- display: flex;
350
- align-items: center;
351
- justify-content: center;
352
- gap: 5px;
353
- }
308
+ list.scrollBy({ left: 1500, behavior: "smooth" });
309
+ },
354
310
 
355
- .mt-review__reactions svg {
356
- width: 18px;
357
- cursor: pointer;
358
- }
311
+ initMasonry() {
312
+ const supportsMasonry = CSS.supports('grid-template-rows', 'masonry');
359
313
 
360
- .mt-review__reactions {
361
- display: flex;
362
- align-items: center;
363
- font-size: 11px;
364
- margin-top: 0.75rem;
365
- color: #777;
366
- border: 1px solid #777;
367
- border-radius: 50px;
368
- max-width: 100px;
369
- justify-content: space-evenly;
370
- height: 30px;
371
- }
314
+ if (!supportsMasonry) {
315
+ const gridContainer = this.$el.querySelector('.list-grid');
316
+ if (gridContainer) {
317
+ gridContainer.classList.add('list-grid--masonry-fallback');
372
318
 
373
- .mt-reviews__list {
374
- padding: 5px 0;
375
- }
319
+ const cards = gridContainer.querySelectorAll('review-card');
320
+ cards.forEach(card => {
321
+ card.classList.add('masonry-item');
322
+ });
323
+ }
324
+ } else {
325
+ const gridContainer = this.$el.querySelector('.list-grid');
326
+ if (gridContainer) {
327
+ gridContainer.classList.remove('list-grid--masonry-fallback');
328
+ }
329
+ }
330
+ },
331
+ },
376
332
 
377
- .mt-reviews__votesdown,
378
- .mt-reviews__votesup {
379
- display: flex;
380
- align-items: center;
381
- }
333
+ mounted() {
334
+ Promise.all([this.fetchAverage(), this.fetchReviews()]).then(() => {
335
+ this.checkScrollability();
336
+ this.initMasonry();
337
+ window.addEventListener("resize", () => {
338
+ this.checkScrollability();
339
+ this.initMasonry();
340
+ });
341
+ });
342
+ },
382
343
 
383
- .mt-reviews__votesup {
384
- margin-right: 10px;
385
- }
344
+ beforeDestroy() {
345
+ window.removeEventListener("resize", this.checkScrollability);
346
+ },
386
347
 
387
- .mt-reply {
388
- margin: 10px 0 0;
389
- display: flex;
390
- flex-direction: column;
391
- background: rgb(241, 241, 241);
392
- padding: 20px;
393
- border-radius: 12px;
394
- font-size: 15px;
395
- line-height: 1.6;
396
- gap: 10px;
397
- border-right: 1px solid #1717171a;
398
- border-left: 3px solid rgb(230, 230, 230);
399
- }
348
+ components: {
349
+ ReviewCard: () => import("./components/ReviewCard.vue"),
350
+ Quickview: () => import("./components/Quickview.vue"),
351
+ Compact: () => import("./headers/Compact.vue"),
352
+ Center: () => import("./headers/Center.vue"),
353
+ Summary: () => import("./headers/Summary.vue"),
354
+ Padrao: () => import("./headers/Padrao.vue"),
355
+ Histogram: () => import("./headers/Histogram.vue"),
356
+ },
357
+ };
358
+ </script>
400
359
 
401
- @media (max-width: 580px) {
402
- .mt-reply {
403
- margin: 10px 0;
360
+ <style lang="scss" scoped>
361
+ .martan-reviews {
362
+ color: #444;
363
+ .widget-header {
364
+ display: flex;
365
+ justify-content: space-between;
366
+ align-items: center;
367
+ gap: 1rem;
368
+
369
+ &__score {
370
+ max-width: 500px;
371
+ width: 100%;
372
+ }
373
+
374
+ &__score-average {
375
+ font-size: 1.25rem;
376
+ color: #444;
377
+ }
404
378
  }
405
- }
406
-
407
- .mt-reply__date {
408
- font-weight: normal;
409
- font-size: 14px;
410
- text-decoration: none;
411
- color: #475569;
412
- color: #777;
413
- }
414
379
 
415
- .mt-reply__body {
416
- font-weight: 600;
417
- font-size: 14px;
418
- text-decoration: none;
419
- }
380
+ .list-expanded {
381
+ display: flex;
382
+ flex-direction: column;
383
+ gap: 1rem;
384
+ }
420
385
 
421
- .mt-is__recomended {
422
- font-size: 12px;
423
- font-weight: 600;
424
- color: #6b6d76;
425
- }
386
+ .list-grid {
387
+ display: grid;
388
+ grid-template-columns: repeat(2, 1fr);
389
+ grid-template-rows: masonry;
390
+ gap: 1rem;
391
+ max-width: 1200px;
392
+ margin: 0 auto;
393
+ align-items: start;
394
+
395
+ @media (max-width: 768px) {
396
+ grid-template-columns: 1fr;
397
+ grid-template-rows: masonry;
398
+ max-width: 100%;
399
+ gap: 0.75rem;
400
+ }
401
+
402
+ @media (min-width: 769px) and (max-width: 1200px) {
403
+ grid-template-columns: repeat(2, 1fr);
404
+ grid-template-rows: masonry;
405
+ max-width: 100%;
406
+ }
407
+
408
+ @media (min-width: 1201px) {
409
+ grid-template-columns: repeat(2, minmax(0, 580px));
410
+ grid-template-rows: masonry;
411
+ justify-content: center;
412
+ }
413
+
414
+ @supports not (grid-template-rows: masonry) {
415
+ display: flex;
416
+ flex-direction: column;
417
+ flex-wrap: wrap;
418
+ max-height: none;
419
+ align-content: flex-start;
420
+
421
+ @media (min-width: 769px) {
422
+ flex-direction: row;
423
+ align-content: flex-start;
424
+ }
425
+ }
426
+ }
426
427
 
427
- .mt-questions__actions {
428
- padding: 20px;
429
- display: flex;
430
- justify-content: center;
431
- }
428
+ .list-grid--masonry-fallback {
429
+ display: block;
430
+ column-count: 1;
431
+ column-gap: 1rem;
432
+
433
+ @media (min-width: 769px) {
434
+ column-count: 2;
435
+ }
436
+
437
+ @media (min-width: 1201px) {
438
+ column-count: 2;
439
+ max-width: 1200px;
440
+ margin: 0 auto;
441
+ }
442
+
443
+ .masonry-item {
444
+ break-inside: avoid;
445
+ margin-bottom: 1rem;
446
+ display: inline-block;
447
+ width: 100%;
448
+ }
449
+ }
432
450
 
433
- .mt-rating__option {
434
- background-color: #fff;
435
- height: 35px;
436
- width: 140px;
437
- border-radius: 20px;
438
- color: #777;
439
- border: 1px solid #777;
440
- cursor: pointer;
441
- transition: all 0.5s ease;
442
- }
451
+ .reviews-with-pictures {
452
+ display: flex;
453
+ gap: 0.5rem;
454
+ flex-direction: column;
455
+ background-color: rgba(255, 236, 219, 0.102);
456
+ border: 1px solid rgba(255, 236, 219, 0.102);
457
+ border-radius: 0.25rem;
458
+ display: flex;
459
+ font-size: 80%;
460
+ margin-top: 1rem;
461
+ padding: 2rem;
462
+ width: 100%;
443
463
 
444
- .mt-rating__option:hover {
445
- background-color: #777;
446
- color: #fff;
447
- }
464
+ .list {
465
+ display: flex;
466
+ gap: 1rem;
467
+ flex-direction: row;
468
+ overflow-x: auto;
469
+ scroll-snap-type: x mandatory;
470
+ -webkit-overflow-scrolling: touch;
471
+ scrollbar-width: none;
472
+
473
+ &::-webkit-scrollbar {
474
+ display: none;
475
+ }
448
476
 
449
- .mt-reviews.mt-theme--vertical .mt-header--vertical {
450
- width: 30%;
451
- }
477
+ img {
478
+ width: 80px;
479
+ height: 80px;
480
+ object-fit: cover;
481
+ border-radius: 0.25rem;
482
+ cursor: pointer;
483
+ }
484
+ }
485
+ }
452
486
 
453
- .mt-reviews.mt-theme--vertical .mt-reviews__list {
454
- width: 70%;
455
- }
487
+ .credit {
488
+ margin-top: 1rem;
489
+ font-size: 0.75rem;
490
+ line-height: 1rem;
491
+ text-align: right;
492
+ color: rgb(161 161 170 / 1);
456
493
 
457
- @media (max-width: 580px) {
458
- .mt-reviews.mt-theme--vertical .mt-reviews__list {
459
- width: 100%;
494
+ a {
495
+ color: rgb(15 23 42 / 1) !important;
496
+ }
460
497
  }
461
498
 
462
- .mt-reviews.mt-theme--vertical .mt-header--vertical {
463
- width: 100%;
464
- border-right: none;
499
+ .actions {
500
+ display: flex;
501
+ justify-content: center;
502
+ margin-top: 1rem;
503
+ margin-bottom: 1rem;
465
504
  }
466
505
 
467
- .mt-reviews.mt-theme--vertical .mt-reviews__rating {
468
- flex-direction: column;
506
+ .review-list-enter-active,
507
+ .review-list-leave-active {
508
+ transition: all 0.3s ease;
469
509
  }
470
510
 
471
- .mt-reviews.mt-theme--vertical .mt-header--vertical .mt-rating__options {
472
- max-width: inherit;
511
+ .review-list-enter-from {
512
+ opacity: 0;
513
+ transform: translateY(20px);
473
514
  }
474
- }
475
515
 
476
- .mt-rating__user {
477
- position: relative;
478
- max-width: 40px;
479
- height: fit-content;
480
- width: 100%;
481
- margin-right: 8px;
482
- border-radius: 50%;
483
- background: #858585;
484
- display: inline-flex;
485
- align-items: center;
486
- justify-content: center;
487
- color: #fff;
488
- font-size: 25px;
489
- font-weight: 500;
490
- }
516
+ .review-list-leave-to {
517
+ opacity: 0;
518
+ transform: translateY(-20px);
519
+ }
491
520
 
492
- .mt-reviews.mt-theme--vertical .mt-rating__average__sort {
493
- border-bottom: 1px solid #eee;
494
- padding-bottom: 1rem;
521
+ .review-list-move {
522
+ transition: transform 0.3s ease;
523
+ }
495
524
  }
496
525
  </style>