This commit is contained in:
X1627315083@163.com
2026-05-19 09:57:24 +08:00
parent 6523c30d9f
commit 0bc1bd79ed
12 changed files with 169 additions and 17 deletions

View File

@@ -13,6 +13,7 @@ p {
}
* {
box-sizing: border-box;
font-family: Poppins;
}
h1,
h2,

View File

@@ -14,6 +14,7 @@ p {
* {
box-sizing: border-box;
font-family: Poppins;
}
h1,

View File

@@ -0,0 +1,5 @@
/* 字体定义 */
@font-face {
font-family: 'Poppins';
src: url('./poppins.woff2') format('woff2');
}

Binary file not shown.

View File

@@ -1,14 +1,14 @@
import { gsap, } from 'gsap'
import { ScrollTrigger } from 'gsap/ScrollTrigger'
export default {
name: 'tween-Y',
name: 'tween',
mounted(el: HTMLElement, binding: any) {
const params = binding.value
// if(!binding.value.isGsap)return
let dom = document.querySelector('body')
gsap.registerPlugin(ScrollTrigger);
let tl1 = gsap.timeline();
tl1.from(el,1, {y:params || '30px',opacity:0},)
tl1.from(el,1, params,)
ScrollTrigger.create({
trigger: el, // 触发器元素
start: "top 90%", // 滚动触发器的起始滚动位置

View File

@@ -1,8 +1,8 @@
import { createI18n } from 'vue-i18n'
import enLocale from './en.ts'
import zhCnLocale from './zh-cn.ts'
import zhTwLocale from './zh-tw.ts'
import enLocale from './en'
import zhCnLocale from './zh-cn'
import zhTwLocale from './zh-tw'
export const LangType = {
en: "en", // 英文

View File

@@ -20,8 +20,8 @@ const {} = toRefs(data);
<template>
<section class="strategic-partners">
<div class="content">
<h2 v-tween-Y="'30px'">Strategic Partners</h2>
<div class="img-box" v-tween-Y="'30px'">
<h2 v-tween="{'y':'30px','opacity':0}">Strategic Partners</h2>
<div class="img-box" v-tween="{'y':'30px','opacity':0}">
<a href="https://www.aidlab.hk/">
<img src="https://code-create.com.hk/wp-content/uploads/2022/11/about_partners_01.png" alt="">
</a>

View File

@@ -0,0 +1,22 @@
<script setup lang="ts">
import Swiper from './swiper.vue'
defineExpose({})
</script>
<template>
<div class="events">
<div class="placeholder"></div>
<Swiper />
</div>
</template>
<style lang="less" scoped>
.events{
.placeholder{
height: var(--main-header-height, 100px);
width: 100%;
position: sticky;
top: 0;
background-color: #000;
}
}
</style>

115
src/pages/events/swiper.vue Normal file
View File

@@ -0,0 +1,115 @@
<script setup lang="ts">
import { ref, onMounted, onUnmounted, reactive, toRefs } from "vue";
import { Carousel as KagolCarousel } from '@kagol/vue-carousel'
import '@kagol/vue-carousel/dist/style.css'
//const props = defineProps({
//})
//const emit = defineEmits([
//])
let list = ref([
{
url:'https://code-create.com.hk/wp-content/uploads/2026/04/award_qrcode_en-819x1024.gif'
},
{
url:'https://code-create.com.hk/wp-content/uploads/2026/03/Code-Create-Limited-1536x1029.jpg'
},
{
url:'https://code-create.com.hk/wp-content/uploads/2026/04/award_qrcode_en-819x1024.gif'
},
{
url:'https://code-create.com.hk/wp-content/uploads/2026/03/Code-Create-Limited-1536x1029.jpg'
},
])
const activePage = ref(0)
onMounted(()=>{
})
onUnmounted(()=>{
})
defineExpose({})
</script>
<template>
<section class="events-swiper">
<div class="content">
<KagolCarousel
:autoplay="false"
:interval="1000"
class="events-carousel"
>
<div class="carousel-item" v-for="(item,index) in list" :key="index">
<img :src="item.url" alt="">
<div class="text-box">
<div class="title">
Honored to be selected as Alibaba JUMPSTARTER 2026 Top 30 Startup | Code-Create
</div>
<div class="info">
Honored to be selected as a Alibaba JUMPSTARTER 2026 Top 30 Startup |...
</div>
<div class="read-more">
Read More
<span class="iconfont icon-direction-right"></span>
</div>
</div>
</div>
<template #pagination="{ prevPage, nextPage }">
<div class="prev-page" @click="prevPage">
<span class="iconfont icon-direction-left"></span>
</div>
<div class="next-page" @click="nextPage">
<span class="iconfont icon-direction-right"></span>
</div>
</template>
<template #indicator></template>
</KagolCarousel>
</div>
</section>
</template>
<style lang="less" scoped>
.events-swiper{
width: 100%;
background-color: #f9f9f9;
padding: 40px 0px 40px 0px;
> .content{
margin: 0 auto;
max-width: 1120px;
position: relative;
> .events-carousel{
.carousel-item{
img{
height: 600px;
width: 100%;
object-fit: cover;
background-color: #FFF;
border-radius: 20px;
}
}
}
.prev-page, .next-page{
width: 96px;
height: 96px;
margin: 0 10px;
border: 1px solid #e1e1e1;
background-color: #fff;
border-radius: 50%;
transition: all .3s;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
bottom: 0;
> span{
font-size: 38px;
}
&:hover{
border: 1px solid #000;
}
}
.prev-page{
right: 112px;
}
.next-page{
right: 0;
}
}
}
</style>

View File

@@ -31,6 +31,11 @@ export const routes: RouteRecordRaw[] = [
path: 'aida',
name: 'Aida',
component: () => import('./pages/aida/index.vue')
},
{
path: 'events',
name: 'events',
component: () => import('./pages/events/index.vue')
}
]
}