AddToCalendar.vue
1 month ago
AppointmentInfo.vue
2 days ago
AppointmentInfoService.vue
1 month ago
Calendar.vue
1 month ago
CartItemBody.vue
1 month ago
CartItemHead.vue
1 month ago
CustomerCongratsInfo.vue
1 month ago
PackageInfo.vue
1 month ago
PackageInfoService.vue
1 month ago
PaymentCongratsInfo.vue
1 month ago
PaymentPackageInfo.vue
1 month ago
AddToCalendar.vue
250 lines
| 1 | <template> |
| 2 | <div :class="`am-atc-${generatedClass}`" :style="cssVars"> |
| 3 | <p> |
| 4 | {{ calendarString }} |
| 5 | </p> |
| 6 | <div :class="`am-atc-${generatedClass}-cals`"> |
| 7 | <div v-for="cal in calendars" :key="cal.type" :class="`am-atc-${generatedClass}-cals-cards`"> |
| 8 | <a |
| 9 | :style="{ borderColor: 'var(--am-c-atc-text-op10)' }" |
| 10 | :class="`am-atc-${generatedClass}-cals-card`" |
| 11 | > |
| 12 | <div> |
| 13 | <span :class="`am-icon-${cal.type}`"></span> |
| 14 | </div> |
| 15 | <p :style="{ color: 'var(--am-c-atc-text)' }"> |
| 16 | {{ cal.label }} |
| 17 | </p> |
| 18 | </a> |
| 19 | </div> |
| 20 | </div> |
| 21 | </div> |
| 22 | </template> |
| 23 | |
| 24 | <script setup> |
| 25 | // * Import from Vue |
| 26 | import { computed, ref, inject } from 'vue' |
| 27 | |
| 28 | // * Composables |
| 29 | import { useColorTransparency } from '../../../../../assets/js/common/colorManipulation.js' |
| 30 | |
| 31 | // * Component Properties |
| 32 | defineProps({ |
| 33 | calendarString: { |
| 34 | type: String, |
| 35 | required: true, |
| 36 | }, |
| 37 | }) |
| 38 | |
| 39 | let calendars = ref([ |
| 40 | { |
| 41 | type: 'google', |
| 42 | label: 'Google', |
| 43 | }, |
| 44 | { |
| 45 | type: 'outlook', |
| 46 | label: 'Outlook', |
| 47 | }, |
| 48 | { |
| 49 | type: 'yahoo', |
| 50 | label: 'Yahoo', |
| 51 | }, |
| 52 | { |
| 53 | type: 'apple', |
| 54 | label: 'Apple', |
| 55 | }, |
| 56 | ]) |
| 57 | |
| 58 | // * Bookable type |
| 59 | let bookableType = inject('bookableType') |
| 60 | |
| 61 | let generatedClass = computed(() => { |
| 62 | if (bookableType.value !== 'event') { |
| 63 | return 'sbs' |
| 64 | } |
| 65 | |
| 66 | return 'event' |
| 67 | }) |
| 68 | |
| 69 | // * Colors |
| 70 | let amColors = inject('amColors') |
| 71 | |
| 72 | // * Css Variables |
| 73 | const cssVars = computed(() => { |
| 74 | if (bookableType.value === 'event') { |
| 75 | return { |
| 76 | '--am-c-atc-text': amColors.value.colorMainText, |
| 77 | '--am-c-atc-text-op10': useColorTransparency(amColors.value.colorMainText, 0.1), |
| 78 | '--am-c-atc-text-op5': useColorTransparency(amColors.value.colorMainText, 0.05), |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | return { |
| 83 | '--am-c-atc-text': amColors.value.colorSbText, |
| 84 | '--am-c-atc-text-op10': useColorTransparency(amColors.value.colorSbText, 0.1), |
| 85 | '--am-c-atc-text-op5': useColorTransparency(amColors.value.colorSbText, 0.05), |
| 86 | } |
| 87 | }) |
| 88 | </script> |
| 89 | |
| 90 | <script> |
| 91 | export default { |
| 92 | name: 'AddToCalendar', |
| 93 | } |
| 94 | </script> |
| 95 | |
| 96 | <style lang="scss"> |
| 97 | #amelia-app-backend-new #amelia-container { |
| 98 | // atc - add to calendar |
| 99 | .am-atc { |
| 100 | // sbs - step by step |
| 101 | &-sbs { |
| 102 | --am-c-atc-text: var(--am-c-sb-text); |
| 103 | |
| 104 | & > p { |
| 105 | text-align: center; |
| 106 | font-size: 18px; |
| 107 | line-height: 20px; |
| 108 | color: var(--am-c-atc-text); |
| 109 | font-weight: 400; |
| 110 | margin-bottom: 16px; |
| 111 | } |
| 112 | |
| 113 | &-cals { |
| 114 | display: flex; |
| 115 | flex-wrap: wrap; |
| 116 | justify-content: center; |
| 117 | |
| 118 | &-cards { |
| 119 | display: flex; |
| 120 | flex-direction: row; |
| 121 | align-items: center; |
| 122 | justify-content: center; |
| 123 | margin-bottom: 8px; |
| 124 | } |
| 125 | |
| 126 | &-card { |
| 127 | display: flex; |
| 128 | flex-direction: column; |
| 129 | justify-content: center; |
| 130 | align-items: center; |
| 131 | width: 86px; |
| 132 | text-decoration: none; |
| 133 | color: var(--am-c-atc-text); |
| 134 | border: 1px solid; |
| 135 | border-radius: 4px; |
| 136 | background-color: var(--am-c-atc-text-op50); |
| 137 | padding: 16px 0 8px; |
| 138 | margin-right: 8px; |
| 139 | box-sizing: border-box; |
| 140 | box-shadow: 0 1px 1px rgba(115, 134, 169, 0.06); |
| 141 | cursor: pointer; |
| 142 | |
| 143 | p { |
| 144 | font-style: normal; |
| 145 | font-weight: 500; |
| 146 | font-size: 15px; |
| 147 | line-height: 24px; |
| 148 | margin: 0; |
| 149 | padding: 0; |
| 150 | } |
| 151 | |
| 152 | div { |
| 153 | display: flex; |
| 154 | height: 24px; |
| 155 | align-items: center; |
| 156 | |
| 157 | span { |
| 158 | font-size: 24px; |
| 159 | color: var(--am-c-atc-text); |
| 160 | } |
| 161 | |
| 162 | .am-icon-yahoo { |
| 163 | font-size: 17px; |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | &:hover { |
| 168 | background-color: var(--am-c-atc-text-op10); |
| 169 | } |
| 170 | } |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | // - event |
| 175 | &-event { |
| 176 | --am-c-atc-text: var(--am-c-sb-text); |
| 177 | |
| 178 | & > p { |
| 179 | text-align: center; |
| 180 | font-size: 18px; |
| 181 | line-height: 1.55555; |
| 182 | font-weight: 500; |
| 183 | color: var(--am-c-atc-text); |
| 184 | margin-bottom: 16px; |
| 185 | } |
| 186 | |
| 187 | &-cals { |
| 188 | display: flex; |
| 189 | flex-wrap: wrap; |
| 190 | justify-content: center; |
| 191 | |
| 192 | &-cards { |
| 193 | display: flex; |
| 194 | flex-direction: row; |
| 195 | align-items: center; |
| 196 | justify-content: center; |
| 197 | margin-bottom: 8px; |
| 198 | } |
| 199 | |
| 200 | &-card { |
| 201 | display: flex; |
| 202 | flex-direction: column; |
| 203 | justify-content: center; |
| 204 | align-items: center; |
| 205 | width: 86px; |
| 206 | text-decoration: none; |
| 207 | color: var(--am-c-atc-text); |
| 208 | border: 1px solid; |
| 209 | border-radius: 4px; |
| 210 | background-color: var(--am-c-atc-text-op50); |
| 211 | padding: 16px 0 8px; |
| 212 | margin-right: 8px; |
| 213 | box-sizing: border-box; |
| 214 | box-shadow: 0 1px 1px rgba(115, 134, 169, 0.06); |
| 215 | cursor: pointer; |
| 216 | |
| 217 | p { |
| 218 | font-style: normal; |
| 219 | font-weight: 500; |
| 220 | font-size: 15px; |
| 221 | line-height: 24px; |
| 222 | margin: 0; |
| 223 | padding: 0; |
| 224 | } |
| 225 | |
| 226 | div { |
| 227 | display: flex; |
| 228 | height: 24px; |
| 229 | align-items: center; |
| 230 | |
| 231 | span { |
| 232 | font-size: 24px; |
| 233 | color: var(--am-c-atc-text); |
| 234 | } |
| 235 | |
| 236 | .am-icon-yahoo { |
| 237 | font-size: 17px; |
| 238 | } |
| 239 | } |
| 240 | |
| 241 | &:hover { |
| 242 | background-color: var(--am-c-atc-text-op10); |
| 243 | } |
| 244 | } |
| 245 | } |
| 246 | } |
| 247 | } |
| 248 | } |
| 249 | </style> |
| 250 |