Skeleton.vue
92 lines
| 1 | <template> |
| 2 | <!-- Skeleton --> |
| 3 | <el-skeleton animated class="am-skeleton-congratz"> |
| 4 | <template #template> |
| 5 | <div class="am-skeleton-congratz-heading"> |
| 6 | <el-skeleton-item variant="circle" /> |
| 7 | <el-skeleton-item variant="h3" /> |
| 8 | <el-skeleton-item variant="text" /> |
| 9 | </div> |
| 10 | <div class="am-skeleton-congratz-booking-info"> |
| 11 | <div |
| 12 | v-for="(item, i) in new Array(10)" |
| 13 | :key="item" |
| 14 | :class="{ 'am-customer-info': i === 6 }" |
| 15 | > |
| 16 | <el-skeleton-item |
| 17 | variant="text" |
| 18 | :style="{ width: `${useRandomIntFromInterval(14, 36)}%` }" |
| 19 | /> |
| 20 | <el-skeleton-item |
| 21 | variant="text" |
| 22 | :style="{ width: `${useRandomIntFromInterval(14, 36)}%` }" |
| 23 | /> |
| 24 | </div> |
| 25 | </div> |
| 26 | </template> |
| 27 | </el-skeleton> |
| 28 | <!-- /Skeleton --> |
| 29 | </template> |
| 30 | |
| 31 | <script setup> |
| 32 | // * Composables |
| 33 | import { useRandomIntFromInterval } from '../../../../../assets/js/common/formatting.js' |
| 34 | </script> |
| 35 | |
| 36 | <script> |
| 37 | export default { |
| 38 | name: 'LoadingSkeleton', |
| 39 | } |
| 40 | </script> |
| 41 | |
| 42 | <style lang="scss"> |
| 43 | @mixin congrats-skeleton-block { |
| 44 | .am-skeleton-congratz { |
| 45 | &-heading { |
| 46 | display: flex; |
| 47 | flex-direction: column; |
| 48 | align-items: center; |
| 49 | margin-bottom: 13px; |
| 50 | |
| 51 | :first-child { |
| 52 | width: 52px; |
| 53 | height: 52px; |
| 54 | margin-bottom: 9px; |
| 55 | } |
| 56 | |
| 57 | :nth-child(2) { |
| 58 | height: 28px; |
| 59 | max-width: 132px; |
| 60 | margin-bottom: 4px; |
| 61 | } |
| 62 | |
| 63 | :last-child { |
| 64 | max-width: 148px; |
| 65 | height: 18px; |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | &-booking-info { |
| 70 | & > div { |
| 71 | display: flex; |
| 72 | justify-content: space-between; |
| 73 | margin-bottom: 12px; |
| 74 | |
| 75 | .el-skeleton__item { |
| 76 | height: 20px; |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | .am-customer-info { |
| 81 | border-bottom: 1px solid var(--am-c-skeleton-op20); |
| 82 | padding-bottom: 12px; |
| 83 | } |
| 84 | } |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | .amelia-v2-booking #amelia-container { |
| 89 | @include congrats-skeleton-block; |
| 90 | } |
| 91 | </style> |
| 92 |