Files
Code-Create/src/pages/events/all-events.vue
X1627315083@163.com 7e8fdf315b all-events页面
2026-05-19 14:48:36 +08:00

149 lines
3.1 KiB
Vue

<script setup lang="ts">
import { ref } from "vue";
const eventList = ref([
{
url:'https://code-create.com.hk/wp-content/uploads/2026/05/45e19bf9012eac5071ace52896e4f53f-600x331.png',
title:'Elevate Operation Efficiency',
},
{
url:'https://code-create.com.hk/wp-content/uploads/2026/04/award_qrcode_en-600x750.gif',
title:'Elevate Operation Efficiency',
},
])
defineExpose({})
</script>
<template>
<section class="mission">
<div class="content">
<h2>ALL EVENTS</h2>
<div class="all-events">
<div v-for="item in eventList" :key="item.url" class="img-item">
<div class="img-box">
<img :src="item.url" alt="">
<div class="line">
<div class="day">11</div>
<div class="month">May</div>
</div>
</div>
<h3>{{item.title}}</h3>
<div class="info">
<p>
2026-05-11 10:00 - 12:00
</p>
</div>
<a href="#" class="read-more" target="_blank">
Read More
<span class="iconfont icon-direction-right"></span>
</a>
</div>
</div>
</div>
</section>
</template>
<style lang="less" scoped>
.mission{
width: 100%;
background-color: #f9f9f9;
> .content{
margin: 0 auto;
padding: 40px 0px 40px 0px;
max-width: 1120px;
> h2{
text-align: center;
margin-bottom: 50px;
font-size: 40px;
color: #222222;
font-family: "Poppins", Sans-serif;
}
> .all-events{
display: grid;
grid-template-columns: repeat(3, minmax(100px, 1fr));
grid-gap: 20px 30px;
> .img-item{
&:hover{
> .img-box{
> img{
transform: scale(1.1);
}
}
}
> .img-box{
border-radius: 20px;
overflow: hidden;
max-width: 100%;
width: 100%;
position: relative;
margin-bottom: 20px;
> img{
transition: all .3s;
width: 100%;
height: 100%;
object-fit: cover;
}
> .line{
position: absolute;
width: 54px;
height: 54px;
left: 15px;
top: 15px;
border-radius: 50%;
background-color: #fff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
> .day{
font-family: "Poppins", Sans-serif;
font-size: 20px;
font-weight: 600;
line-height: 1;
}
> .month{
font-size: 12px;
line-height: 1;
}
}
}
> h3{
font-size: 20px;
font-weight: 600;
line-height: 1;
margin-bottom: 10px;
}
> .info{
font-size: 16px;
font-weight: 400;
line-height: 1;
color: #555;
margin-bottom: 15px;
}
.read-more{
color: #9A2125;
box-shadow: none;
font-size: 14px;
text-decoration: none;
position: relative;
&:hover{
&::after{
width: 100%;
}
}
&::after{
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 1px;
background-color: #9A2125;
transition: all .3s;
}
> span{
margin-left: 10px;
}
}
}
}
}
}
</style>