241 lines
4.6 KiB
Vue
241 lines
4.6 KiB
Vue
<template>
|
|
<div class="poster-container festival-theme" :style="containerStyle">
|
|
<!-- 背景图层 -->
|
|
<div class="background-layer">
|
|
<img :src="backgroundImage" alt="节日背景" class="background-image" />
|
|
</div>
|
|
|
|
<!-- 纯色遮罩层 -->
|
|
<div class="color-overlay" :style="overlayStyle"></div>
|
|
|
|
<!-- 装饰元素层 -->
|
|
<div class="decoration-layer">
|
|
<img :src="decorationImage" alt="节日装饰" class="decoration-image" />
|
|
</div>
|
|
|
|
<!-- 内容层 -->
|
|
<div class="content-layer">
|
|
<!-- 南开logo -->
|
|
<div class="logo-section">
|
|
<img src="../outputs/nankai.png" alt="南开大学" class="nankai-logo" />
|
|
</div>
|
|
|
|
<!-- 单位名称 -->
|
|
<div class="university-section">
|
|
<h1 class="university-name">{{ universityName }}</h1>
|
|
</div>
|
|
|
|
<!-- 节日名称 -->
|
|
<div class="festival-section">
|
|
<h2 class="festival-name">{{ festivalName }}</h2>
|
|
</div>
|
|
|
|
<!-- 目的主题 -->
|
|
<div class="theme-section">
|
|
<div class="theme-background"></div>
|
|
<h3 class="theme-text">{{ themeText }}</h3>
|
|
</div>
|
|
|
|
<!-- 日期元素 -->
|
|
<div class="date-section">
|
|
<div class="date-background"></div>
|
|
<p class="date-text">{{ dateText }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'FestivalPoster',
|
|
data() {
|
|
return {
|
|
universityName: '南开大学',
|
|
festivalName: '端午节',
|
|
themeText: '粽叶飘香,龙舟竞渡',
|
|
dateText: '2025年07月12日',
|
|
backgroundImage: '../outputs/background.png',
|
|
decorationImage: '../outputs/lotus.jpg',
|
|
mainColor: '#d4a574' // 中秋主色调
|
|
}
|
|
},
|
|
computed: {
|
|
containerStyle() {
|
|
return {
|
|
width: '1080px',
|
|
height: '1920px',
|
|
position: 'relative',
|
|
overflow: 'hidden'
|
|
}
|
|
},
|
|
overlayStyle() {
|
|
return {
|
|
backgroundColor: this.mainColor,
|
|
opacity: 0.3
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.poster-container {
|
|
margin: 0 auto;
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.background-layer {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
z-index: 1;
|
|
}
|
|
|
|
.background-image {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.color-overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
z-index: 2;
|
|
}
|
|
|
|
.decoration-layer {
|
|
position: absolute;
|
|
top: 60%;
|
|
right: 5%;
|
|
width: 300px;
|
|
height: 300px;
|
|
z-index: 3;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.decoration-image {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
border-radius: 50%;
|
|
filter: blur(1px);
|
|
}
|
|
|
|
.content-layer {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
z-index: 4;
|
|
}
|
|
|
|
.logo-section {
|
|
position: absolute;
|
|
top: 8%;
|
|
left: 8%;
|
|
width: 150px;
|
|
height: 150px;
|
|
}
|
|
|
|
.nankai-logo {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: contain;
|
|
filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
|
|
}
|
|
|
|
.university-section {
|
|
position: absolute;
|
|
top: 25%;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
text-align: center;
|
|
}
|
|
|
|
.university-name {
|
|
font-size: 48px;
|
|
color: #2c3e50;
|
|
font-weight: bold;
|
|
font-family: 'SimHei', 'Microsoft YaHei', sans-serif;
|
|
text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
|
|
}
|
|
|
|
.festival-section {
|
|
position: absolute;
|
|
top: 35%;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
text-align: center;
|
|
}
|
|
|
|
.festival-name {
|
|
font-size: 96px;
|
|
color: #d4a574;
|
|
font-weight: bold;
|
|
font-family: 'SimSun', 'KaiTi', serif;
|
|
text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.theme-section {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
text-align: center;
|
|
position: relative;
|
|
}
|
|
|
|
.theme-background {
|
|
position: absolute;
|
|
top: -20px;
|
|
left: -40px;
|
|
width: calc(100% + 80px);
|
|
height: calc(100% + 40px);
|
|
background: linear-gradient(135deg, rgba(212, 165, 116, 0.2), rgba(212, 165, 116, 0.1));
|
|
border-radius: 20px;
|
|
z-index: -1;
|
|
}
|
|
|
|
.theme-text {
|
|
font-size: 56px;
|
|
color: #8b4513;
|
|
font-weight: 500;
|
|
font-family: 'KaiTi', serif;
|
|
text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.6);
|
|
}
|
|
|
|
.date-section {
|
|
position: absolute;
|
|
bottom: 12%;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
text-align: center;
|
|
position: relative;
|
|
}
|
|
|
|
.date-background {
|
|
position: absolute;
|
|
top: -15px;
|
|
left: -30px;
|
|
width: calc(100% + 60px);
|
|
height: calc(100% + 30px);
|
|
background: linear-gradient(135deg, rgba(212, 165, 116, 0.3), rgba(212, 165, 116, 0.2));
|
|
border-radius: 15px;
|
|
z-index: -1;
|
|
}
|
|
|
|
.date-text {
|
|
font-size: 32px;
|
|
color: #654321;
|
|
font-weight: 400;
|
|
font-family: 'Microsoft YaHei', sans-serif;
|
|
margin: 0;
|
|
}
|
|
</style>
|