PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 1.2.31
Booking for Appointments and Events Calendar – Amelia v1.2.31
2.4.9 2.4.8 2.4.7 2.4.6 2.4.5 2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / v3 / src / views / common / CatalogFormConstruction / SideMenu / SideMenu.vue
ameliabooking / v3 / src / views / common / CatalogFormConstruction / SideMenu Last commit date
SideMenu.vue 1 year ago
SideMenu.vue
189 lines
1 <template>
2 <div
3 role="navigation"
4 class="am-cat__sidemenu"
5 :style="cssVars"
6 >
7 <div class="am-cat__sidemenu-item__wrapper">
8 <div
9 v-for="(item, index) in menuItems"
10 :key="index"
11 class="am-cat__sidemenu-item"
12 :class="{'am-active': props.initSelection === item[props.identifier]}"
13 @click="() => selectItem(item)"
14 >
15 {{ item[props.nameIdentifier] }}
16 </div>
17 </div>
18 <div v-if="props.companyEmail" class="am-cat__sidemenu-footer">
19 <span class="am-cat__sidemenu-footer__text">
20 {{ props.footerString }}
21 </span>
22 <a class="am-cat__sidemenu-footer__email" :href="`mailto:${props.companyEmail}`">
23 {{ props.companyEmail }}
24 </a>
25 </div>
26 </div>
27 </template>
28
29 <script setup>
30 import { computed, inject } from "vue";
31 import { useColorTransparency } from "../../../../assets/js/common/colorManipulation";
32
33 let props = defineProps({
34 menuItems: {
35 type: Array,
36 required: true
37 },
38 initSelection: {
39 type: [String, Number]
40 },
41 identifier: {
42 type: String,
43 required: true
44 },
45 nameIdentifier: {
46 type: String,
47 required: true
48 },
49 footerString: {
50 type: String,
51 default: ''
52 },
53 companyEmail: {
54 type: String,
55 default: ''
56 }
57 })
58 let emits = defineEmits(['click'])
59
60 function selectItem (item) {
61 emits('click', item)
62 }
63
64 // * Colors
65 let amColors = inject('amColors')
66
67 let cssVars = computed(() => {
68 return {
69 '--am-c-csm-text-op10': useColorTransparency(amColors.value.colorSbText, 0.1),
70 '--am-c-csm-primary-op10': useColorTransparency(amColors.value.colorPrimary, 0.1),
71 '--am-c-csm-text-op60': useColorTransparency(amColors.value.colorSbText, 0.6),
72 '--am-c-csm-text-op80': useColorTransparency(amColors.value.colorSbText, 0.8),
73 }
74 })
75 </script>
76
77 <script>
78 export default {
79 name: "SideMenu"
80 }
81 </script>
82
83 <style lang="scss">
84 @mixin catalog-sidebar {
85 // am- amelia
86 // -c- color
87 // -csm- category side menu
88 // -bgr background
89 .am-cat {
90 &__sidemenu {
91 --am-c-csm-bgr: var(--am-c-sb-bgr);
92 --am-c-csm-text: var(--am-c-sb-text);
93 --am-c-csm-primary: var(--am-c-primary);
94
95 width: 100%;
96 max-width: 208px;
97 position: relative;
98 display: flex;
99 flex-direction: column;
100 background-color: var(--am-c-csm-bgr);
101 border-radius: 6px;
102 margin: 0 12px 0 0;
103 padding: 0 0 80px;
104
105 &-item {
106 font-size: 14px;
107 font-weight: 500;
108 line-height: 1.42857;
109 text-overflow: ellipsis;
110 overflow: hidden;
111 white-space: nowrap;
112 color: var(--am-c-csm-text);
113 padding: 12px 8px;
114 margin: 0 0 2px;
115 border-radius: 6px;
116 cursor: pointer;
117 transition: all 0.2s ease-in-out;
118
119 &:last-child {
120 margin-bottom: 0;
121 }
122
123 &:hover {
124 background-color: var(--am-c-csm-text-op10);
125 }
126
127 &.am-active {
128 color: var(--am-c-csm-primary);
129 background-color: var(--am-c-csm-primary-op10);
130 }
131
132 &__wrapper {
133 margin: 8px;
134 }
135 }
136
137 &-footer {
138 width: 100%;
139 position: absolute;
140 bottom: 0;
141 left: 0;
142 display: flex;
143 flex-direction: column;
144 align-items: center;
145 justify-content: center;
146
147 &__text {
148 display: -webkit-box;
149 -webkit-line-clamp: 2;
150 -webkit-box-orient: vertical;
151 overflow: hidden;
152 text-overflow: ellipsis;
153 text-align: center;
154 font-size: 14px;
155 font-weight: 500;
156 line-height: 1.428571;
157 color: var(--am-c-csm-text-op60);
158 }
159
160 &__email {
161 display: -webkit-box;
162 -webkit-line-clamp: 2;
163 -webkit-box-orient: vertical;
164 overflow: hidden;
165 text-overflow: ellipsis;
166 text-align: center;
167 color: var(--am-c-csm-text-op80);
168 text-decoration: none;
169 font-size: 14px;
170 font-weight: 400;
171 line-height: 1.428571;
172
173 &:hover {
174 color: var(--am-c-csm-text);
175 }
176 }
177 }
178 }
179 }
180 }
181
182 .amelia-v2-booking #amelia-container {
183 @include catalog-sidebar;
184 }
185
186 #amelia-app-backend-new #amelia-container {
187 @include catalog-sidebar;
188 }
189 </style>