diff --git a/src/assets/images/mixi/mixi-banner.jpg b/src/assets/images/mixi/bg.jpg similarity index 100% rename from src/assets/images/mixi/mixi-banner.jpg rename to src/assets/images/mixi/bg.jpg diff --git a/src/assets/images/mixi/mixi-intro-bg.jpg b/src/assets/images/mixi/intro-bg.jpg similarity index 100% rename from src/assets/images/mixi/mixi-intro-bg.jpg rename to src/assets/images/mixi/intro-bg.jpg diff --git a/src/assets/images/mixi/mixi-video-thumb.jpg b/src/assets/images/mixi/video-thumb.jpg similarity index 100% rename from src/assets/images/mixi/mixi-video-thumb.jpg rename to src/assets/images/mixi/video-thumb.jpg diff --git a/src/components/email-box.vue b/src/components/email-box.vue new file mode 100644 index 0000000..a12a1cd --- /dev/null +++ b/src/components/email-box.vue @@ -0,0 +1,82 @@ + + + + diff --git a/src/directives/custom-animation.js b/src/directives/custom-animation.js index b7aad0f..2c3069f 100644 --- a/src/directives/custom-animation.js +++ b/src/directives/custom-animation.js @@ -204,18 +204,18 @@ function setDocumentStyles(parent, el, p = 0) { `opacity ${oDuration} ${oDelay} ${oEasing}`, ] el.style.transition = transitionArr.join(', ') - const tX = getCurrentValue(el, T.translateX_s, T.translateX, p) - const tY = getCurrentValue(el, T.translateY_s, T.translateY, p) - const sx = getCurrentValue(el, T.scaleX_s, T.scaleX, p, T.scale_s, T.scale, 1) - const sy = getCurrentValue(el, T.scaleY_s, T.scaleY, p, T.scale_s, T.scale, 1) - const r = getCurrentValue(el, T.rotate_s, T.rotate, p) - const rx = getCurrentValue(el, T.rotateX_s, T.rotateX, p) - const ry = getCurrentValue(el, T.rotateY_s, T.rotateY, p) - const rz = getCurrentValue(el, T.rotateZ_s, T.rotateZ, p) - const transform = `translate(${tX}px, ${tY}px) scale(${sx}, ${sy}) rotate(${r}deg) rotateX(${rx}deg) rotateY(${ry}deg) rotateZ(${rz}deg)` + const { num: tX, unit: tXUnit } = getCurrentValue(el, T.translateX_s, T.translateX, p) + const { num: tY, unit: tYUnit } = getCurrentValue(el, T.translateY_s, T.translateY, p) + const { num: sx } = getCurrentValue(el, T.scaleX_s, T.scaleX, p, T.scale_s, T.scale, 1) + const { num: sy } = getCurrentValue(el, T.scaleY_s, T.scaleY, p, T.scale_s, T.scale, 1) + const { num: r } = getCurrentValue(el, T.rotate_s, T.rotate, p) + const { num: rx } = getCurrentValue(el, T.rotateX_s, T.rotateX, p) + const { num: ry } = getCurrentValue(el, T.rotateY_s, T.rotateY, p) + const { num: rz } = getCurrentValue(el, T.rotateZ_s, T.rotateZ, p) + const transform = `translate(${tX}${tXUnit || 'px'}, ${tY}${tYUnit || 'px'}) scale(${sx}, ${sy}) rotate(${r}deg) rotateX(${rx}deg) rotateY(${ry}deg) rotateZ(${rz}deg)` el.style.transform = transform if (hasAttr(el, [T.opacity_s, T.opacity])) { - el.style.opacity = getCurrentValue(el, T.opacity_s, T.opacity, p, T.opacity_s, T.opacity, 1) + el.style.opacity = getCurrentValue(el, T.opacity_s, T.opacity, p, T.opacity_s, T.opacity, 1).num } } function getAttrs(el, attrs = {}) { @@ -227,9 +227,16 @@ function getAttrs(el, attrs = {}) { return obj } function getCurrentValue(el, start, end, progress, bStart, bEnd, defaultValue = 0) { - const startNum = hasAttr(el, start) ? Number(el.getAttribute(start)) : hasAttr(el, bStart) ? Number(el.getAttribute(bStart)) : defaultValue - const endNum = hasAttr(el, end) ? Number(el.getAttribute(end)) : hasAttr(el, bEnd) ? Number(el.getAttribute(bEnd)) : defaultValue - return startNum + (endNum - startNum) * progress + const startStr = hasAttr(el, start) ? el.getAttribute(start) : hasAttr(el, bStart) ? el.getAttribute(bStart) : String(defaultValue) + const endStr = hasAttr(el, end) ? el.getAttribute(end) : hasAttr(el, bEnd) ? el.getAttribute(bEnd) : String(defaultValue) + const startNum = parseInt(startStr) + const endNum = parseInt(endStr) + const starUnit = startStr.match(/(px|deg|%|rem|em|vh|vw|pt|pc|mm|cm|in)$/i)?.[1] || '' + const endUnit = endStr.match(/(px|deg|%|rem|em|vh|vw|pt|pc|mm|cm|in)$/i)?.[1] || '' + return { + num: startNum + (endNum - startNum) * progress, + unit: starUnit || endUnit + } } function hasAttr(el, attr) { if (Array.isArray(attr)) { diff --git a/src/pages/contact-us/index.vue b/src/pages/contact-us/index.vue index b98b164..025dffb 100644 --- a/src/pages/contact-us/index.vue +++ b/src/pages/contact-us/index.vue @@ -2,7 +2,7 @@
-

+

{{ $t('MainHeader.ContactUs') }}

@@ -12,40 +12,16 @@ info@code-create.com.hk
-
-

{{ $t('GetInTouch') }}

-
{{ $t('StayUpToDate') }}
- -
{{ error }}
- -
+
@@ -104,44 +80,8 @@ > .contact-input { padding: 100px; background-color: #faf8f8; - > .box { + > .email-box { max-width: 860px; - width: 100%; - padding: 80px; - margin: 0 auto; - background-color: #fff; - box-shadow: 0px 0px 40px 0px rgba(0, 0, 0, 0.2); - border-radius: 40px; - > .title { - font-size: 40px; - color: #222; - margin-bottom: 10px; - } - > .tip { - color: #4d4d4d; - margin-bottom: 20px; - } - > input { - width: 100%; - border-radius: 40px; - height: 40px; - padding: 0 20px; - border: 1px solid #e1e1e1; - outline: none; - color: #222; - } - > .error { - font-size: 14px; - color: #dc3232; - } - > button { - margin-top: 10px; - width: 100%; - border-radius: 50px; - height: 50px; - font-weight: bold; - --hover-backcolor: #000; - } } } } diff --git a/src/pages/media/index.vue b/src/pages/media/index.vue index 324f9bd..bd82acd 100644 --- a/src/pages/media/index.vue +++ b/src/pages/media/index.vue @@ -2,7 +2,7 @@
-

+

{{ $t('MainHeader.Media') }}

diff --git a/src/pages/mixi/index.vue b/src/pages/mixi/index.vue new file mode 100644 index 0000000..b22bf33 --- /dev/null +++ b/src/pages/mixi/index.vue @@ -0,0 +1,179 @@ + + + + diff --git a/src/routes.ts b/src/routes.ts index 54f074b..47beb43 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -37,6 +37,11 @@ export const routes: RouteRecordRaw[] = [ name: 'Aida', component: () => import('./pages/aida/index.vue') }, + { + path: 'mixi', + name: 'mixi', + component: () => import('./pages/mixi/index.vue') + }, { path: 'events', name: 'events', component: () => import('./pages/events/index.vue')