style: 移动端适配
This commit is contained in:
15
src/App.vue
15
src/App.vue
@@ -10,4 +10,19 @@ import RouteCache from '@/components/RouteCache.vue'
|
|||||||
#app {
|
#app {
|
||||||
font-size: 1.6rem;
|
font-size: 1.6rem;
|
||||||
}
|
}
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: 0;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
&::-webkit-scrollbar-thumb {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
&::-webkit-scrollbar-track {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
scrollbar-width: none;
|
||||||
|
-ms-overflow-style: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ body,
|
|||||||
#app {
|
#app {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
@keyframes loading {
|
@keyframes loading {
|
||||||
0% {
|
0% {
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ body,
|
|||||||
#app {
|
#app {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes loading {
|
@keyframes loading {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export default {
|
|||||||
sendEmail: 'Send Email',
|
sendEmail: 'Send Email',
|
||||||
copyMail: 'Successfully copied to clipboard!',
|
copyMail: 'Successfully copied to clipboard!',
|
||||||
sendEmailFailed: 'Failed to open email client, we have copied the email to your clipboard.',
|
sendEmailFailed: 'Failed to open email client, we have copied the email to your clipboard.',
|
||||||
applicationDeadline: 'Application Deadline:15th July 2026',
|
applicationDeadline: 'Application Deadline:\n15th July 2026',
|
||||||
howToApply: 'How to Apply',
|
howToApply: 'How to Apply',
|
||||||
stepByStep: 'Step by step',
|
stepByStep: 'Step by step',
|
||||||
step1Title: 'Step 1. Become an\nAiDA Subscriber',
|
step1Title: 'Step 1. Become an\nAiDA Subscriber',
|
||||||
@@ -145,7 +145,7 @@ export default {
|
|||||||
'Please review your submitted information in the AiDA in-platform message.\nYou may edit it if needed. Competition updates and results will be sent via email.',
|
'Please review your submitted information in the AiDA in-platform message.\nYou may edit it if needed. Competition updates and results will be sent via email.',
|
||||||
deadlinePassed: 'Application Deadline Passed',
|
deadlinePassed: 'Application Deadline Passed',
|
||||||
deadlinePassedDesc:
|
deadlinePassedDesc:
|
||||||
'The submission deadline for AiDA Global Fashion Award 2026 has ended.\nWe are no longer accepting new applications.',
|
'The submission deadline for AiDA Global Design Award 2026 has ended.\nWe are no longer accepting new applications.',
|
||||||
uploadInProgress: 'Upload in progress…',
|
uploadInProgress: 'Upload in progress…',
|
||||||
uploadSuccess: 'Uploaded Successfully',
|
uploadSuccess: 'Uploaded Successfully',
|
||||||
uploadFailed: 'Upload failed',
|
uploadFailed: 'Upload failed',
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export default {
|
|||||||
sendEmail: '发送邮件',
|
sendEmail: '发送邮件',
|
||||||
copyMail:'已成功复制到剪贴板',
|
copyMail:'已成功复制到剪贴板',
|
||||||
sendEmailFailed: '无法打开邮件客户端,我们已将邮箱地址复制到您的剪贴板。',
|
sendEmailFailed: '无法打开邮件客户端,我们已将邮箱地址复制到您的剪贴板。',
|
||||||
applicationDeadline: '申请期限:2026年7月15日',
|
applicationDeadline: '申请期限:\n2026年7月15日',
|
||||||
howToApply: '申请方法',
|
howToApply: '申请方法',
|
||||||
stepByStep: '步骤指南',
|
stepByStep: '步骤指南',
|
||||||
step1Title: '1. 成为 AiDA 订阅用户',
|
step1Title: '1. 成为 AiDA 订阅用户',
|
||||||
|
|||||||
@@ -569,10 +569,12 @@ ul {
|
|||||||
padding: 0 6rem 6.4rem;
|
padding: 0 6rem 6.4rem;
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
.list-items li::before {
|
.list-items {
|
||||||
|
li::before {
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.context {
|
.context {
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
padding: 0 6rem;
|
padding: 0 6rem;
|
||||||
|
|||||||
@@ -191,7 +191,8 @@ p {
|
|||||||
&.mobile {
|
&.mobile {
|
||||||
background: url('@/assets/images/mobile_version_background/bloom_bg.png') no-repeat;
|
background: url('@/assets/images/mobile_version_background/bloom_bg.png') no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
height: 83.1rem;
|
// height: 83.1rem;
|
||||||
|
height: 110vw;
|
||||||
padding-top: 6rem;
|
padding-top: 6rem;
|
||||||
.title {
|
.title {
|
||||||
font-size: 3.2rem;
|
font-size: 3.2rem;
|
||||||
@@ -202,7 +203,8 @@ p {
|
|||||||
margin-bottom: 6.2rem;
|
margin-bottom: 6.2rem;
|
||||||
}
|
}
|
||||||
.desc {
|
.desc {
|
||||||
padding: 0 6.5rem 0 6.7rem;
|
// padding: 0 6.5rem 0 6.7rem;
|
||||||
|
padding: 0 8.5vw;
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
line-height: 3rem;
|
line-height: 3rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ onBeforeUnmount(() => {
|
|||||||
grid-column-gap: 6rem;
|
grid-column-gap: 6rem;
|
||||||
grid-row-gap: 7rem;
|
grid-row-gap: 7rem;
|
||||||
.item {
|
.item {
|
||||||
width: 21rem;
|
width: initial;
|
||||||
height: initial;
|
height: initial;
|
||||||
&:nth-of-type(3) {
|
&:nth-of-type(3) {
|
||||||
width: 30rem;
|
width: 30rem;
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
<div
|
<div
|
||||||
ref="containerRef"
|
ref="containerRef"
|
||||||
class="timeline-container container flex flex-col align-center"
|
class="timeline-container container flex flex-col align-center"
|
||||||
:class="{ mobile: isMobileOrNarrow, vertical: showVertical }"
|
:class="{ mobile: isMobileOrNarrow, vertical: isMobile }"
|
||||||
>
|
>
|
||||||
<div class="timeline-title">{{ $t('AwardsPage.competitionTimeline') }}</div>
|
<div class="timeline-title">{{ $t('AwardsPage.competitionTimeline') }}</div>
|
||||||
<div class="desc">{{ $t('AwardsPage.shapingTheFuture') }}</div>
|
<div class="desc">{{ $t('AwardsPage.shapingTheFuture') }}</div>
|
||||||
|
|
||||||
<!-- 纵向时间线:移动端或宽度 <= 1200px -->
|
<!-- 纵向时间线:移动端或宽度 <= 1200px -->
|
||||||
<div
|
<div
|
||||||
v-if="showVertical"
|
v-if="isMobile"
|
||||||
class="timeline-point timeline-vertical flex flex-col"
|
class="timeline-point timeline-vertical flex flex-col"
|
||||||
ref="timelineRef"
|
ref="timelineRef"
|
||||||
>
|
>
|
||||||
@@ -73,8 +73,7 @@ const { t } = useI18n()
|
|||||||
const isMobile = inject<boolean>('isMobile')
|
const isMobile = inject<boolean>('isMobile')
|
||||||
const windowWidth = ref(typeof window !== 'undefined' ? window.innerWidth : 1201)
|
const windowWidth = ref(typeof window !== 'undefined' ? window.innerWidth : 1201)
|
||||||
|
|
||||||
const showVertical = computed(() => !!isMobile || windowWidth.value <= 1200)
|
const isMobileOrNarrow = computed(() => isMobile.value)
|
||||||
const isMobileOrNarrow = computed(() => showVertical.value)
|
|
||||||
|
|
||||||
const updateWindowWidth = () => {
|
const updateWindowWidth = () => {
|
||||||
windowWidth.value = window.innerWidth
|
windowWidth.value = window.innerWidth
|
||||||
@@ -123,7 +122,7 @@ const playAnimation = () => {
|
|||||||
const subtitle = containerRef.value.querySelector('.desc')
|
const subtitle = containerRef.value.querySelector('.desc')
|
||||||
const timeline = containerRef.value.querySelector('.timeline-point')
|
const timeline = containerRef.value.querySelector('.timeline-point')
|
||||||
const line = containerRef.value.querySelector(
|
const line = containerRef.value.querySelector(
|
||||||
showVertical.value ? '.vertical-line' : '.timeline-line'
|
isMobile.value ? '.vertical-line' : '.timeline-line'
|
||||||
)
|
)
|
||||||
|
|
||||||
const tl = gsap.timeline()
|
const tl = gsap.timeline()
|
||||||
@@ -131,7 +130,7 @@ const playAnimation = () => {
|
|||||||
|
|
||||||
// 整体 timeline 的裁剪展开(仅横向使用)
|
// 整体 timeline 的裁剪展开(仅横向使用)
|
||||||
// 纵向时跳过裁剪动画,改用每个 item 从上方落下的动画
|
// 纵向时跳过裁剪动画,改用每个 item 从上方落下的动画
|
||||||
if (timeline && !showVertical.value) {
|
if (timeline && !isMobile.value) {
|
||||||
tl.fromTo(
|
tl.fromTo(
|
||||||
timeline,
|
timeline,
|
||||||
{
|
{
|
||||||
@@ -149,7 +148,7 @@ const playAnimation = () => {
|
|||||||
// 线条动画:横向 scaleX,纵向 scaleY
|
// 线条动画:横向 scaleX,纵向 scaleY
|
||||||
// 纵向时线条与 item 动画同步进行
|
// 纵向时线条与 item 动画同步进行
|
||||||
if (line) {
|
if (line) {
|
||||||
if (showVertical.value) {
|
if (isMobile.value) {
|
||||||
tl.from(
|
tl.from(
|
||||||
line,
|
line,
|
||||||
{
|
{
|
||||||
@@ -192,11 +191,11 @@ const playAnimation = () => {
|
|||||||
|
|
||||||
// 行内内容:桌面端用 .grid-cell,纵向用 .vertical-item
|
// 行内内容:桌面端用 .grid-cell,纵向用 .vertical-item
|
||||||
// 纵向时,每个 item 从上方落下 + 渐显
|
// 纵向时,每个 item 从上方落下 + 渐显
|
||||||
const textItems = showVertical.value
|
const textItems = isMobile.value
|
||||||
? containerRef.value.querySelectorAll('.vertical-item')
|
? containerRef.value.querySelectorAll('.vertical-item')
|
||||||
: containerRef.value.querySelectorAll('.grid-cell')
|
: containerRef.value.querySelectorAll('.grid-cell')
|
||||||
if (textItems && textItems.length) {
|
if (textItems && textItems.length) {
|
||||||
if (showVertical.value) {
|
if (isMobile.value) {
|
||||||
// 纵向:每个 item 从上方落下 + 渐显
|
// 纵向:每个 item 从上方落下 + 渐显
|
||||||
tl.from(
|
tl.from(
|
||||||
textItems,
|
textItems,
|
||||||
|
|||||||
@@ -91,6 +91,7 @@
|
|||||||
{{ $t('AwardsPage.sendEmail') }}
|
{{ $t('AwardsPage.sendEmail') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <div class="contact-modal-mobile-wrapper"></div> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -261,20 +262,6 @@ const handleBtnClick = () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.award-container {
|
|
||||||
overflow: auto;
|
|
||||||
height: 100vh;
|
|
||||||
// 隐藏滚动条箭头,只显示滚动条本体
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
&::-webkit-scrollbar {
|
|
||||||
display: none;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
scrollbar-width: none;
|
|
||||||
-ms-overflow-style: none;
|
|
||||||
}
|
|
||||||
.header-wrapper {
|
.header-wrapper {
|
||||||
.header-placeholder {
|
.header-placeholder {
|
||||||
height: 8rem;
|
height: 8rem;
|
||||||
@@ -478,13 +465,13 @@ const handleBtnClick = () => {
|
|||||||
width: 3.4rem;
|
width: 3.4rem;
|
||||||
height: 2.6rem;
|
height: 2.6rem;
|
||||||
}
|
}
|
||||||
.language{
|
.language {
|
||||||
padding: 0 0.56rem;
|
padding: 0 0.56rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.footer{
|
.footer {
|
||||||
row-gap: 0.8rem;
|
row-gap: 0.8rem;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="award-page" :class="{ 'is-zh': isZh }">
|
<div class="award-page" :class="{ 'is-zh': isZh, mobile: isMobile }">
|
||||||
<div class="banner" :class="{ 'mobile': isMobile }">
|
<div class="banner" :class="{ mobile: isMobile }">
|
||||||
<video
|
<video
|
||||||
:src="bannerUrl"
|
:src="bannerUrl"
|
||||||
autoplay
|
autoplay
|
||||||
@@ -59,11 +59,16 @@ const isZh = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const bannerUrl = computed(() => {
|
const bannerUrl = computed(() => {
|
||||||
|
let url = null
|
||||||
if (isMobile.value) {
|
if (isMobile.value) {
|
||||||
return isZh.value ? bannerZhMobile : bannerMobile
|
console.log('移动端-----------')
|
||||||
|
url = isZh.value ? bannerZhMobile : bannerMobile
|
||||||
} else {
|
} else {
|
||||||
return isZh.value ? bannerZh : banner
|
url = isZh.value ? bannerZh : banner
|
||||||
}
|
}
|
||||||
|
console.log('url-----------', url)
|
||||||
|
|
||||||
|
return url
|
||||||
})
|
})
|
||||||
|
|
||||||
const handleSubmitApplication = () => {
|
const handleSubmitApplication = () => {
|
||||||
@@ -138,12 +143,18 @@ const handleSubmitApplication = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 1200px) {
|
|
||||||
.banner {
|
.banner.mobile {
|
||||||
height: 123.4rem;
|
height: auto;
|
||||||
.submit-btn {
|
.submit-btn {
|
||||||
bottom: 57rem;
|
top: 48%;
|
||||||
left: 6.6rem;
|
left: 8%;
|
||||||
|
width: 48rem;
|
||||||
|
.ddl {
|
||||||
|
white-space: pre-line;
|
||||||
|
text-align: left;
|
||||||
|
padding-left: 4rem;
|
||||||
|
bottom: -6rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user