Home.vue
7.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
<template>
<div class="home-container">
<!-- 全屏背景图 - 海报@2x.png -->
<div class="full-background"></div>
<!-- 左下角背景装饰图 - bg@2x.png -->
<div class="bottom-left-decoration"></div>
<!-- 主要内容区域 -->
<div class="main-content">
<!-- 顶部Banner图片 -->
<div class="banner-section">
<img
src="@/assets/images/02 西园戒幢律寺三坛大戒法会/banner@2x.png"
alt="三坛大戒法会Banner"
class="banner-image"
/>
</div>
<!-- 视频播放器区域 -->
<div class="video-section">
<VideoPlayer
:video-url="videoUrl"
video-id="home-video"
:autoplay="false"
:options="videoOptions"
/>
</div>
<!-- 法会流程 -->
<div class="ceremony-process">
<!-- 标题 -->
<div class="ceremony-title">
<img src="/src/assets/images/02 西园戒幢律寺三坛大戒法会/法會流程@2x.png" alt="法会流程" />
</div>
<!-- 流程步骤 -->
<div class="process-container">
<!-- 麻绳背景 -->
<div class="rope-background"></div>
<!-- 流程步骤 -->
<div class="process-steps">
<div
v-for="(step, index) in processSteps"
:key="index"
class="process-step"
:class="{ active: step.active }"
@click="selectStep(index)"
>
<!-- 顶部白色圆形占位(选中状态) -->
<div class="top-circle"></div>
<!-- 步骤内容 -->
<div class="step-content">
<span class="step-text">{{ step.name }}</span>
</div>
<!-- 底部箭头(选中状态) -->
<div v-if="step.active" class="bottom-arrow">
<img src="/src/assets/images/02 西园戒幢律寺三坛大戒法会/点@2x.png" alt="选中" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { ref } from 'vue'
import VideoPlayer from '@/components/VideoPlayer.vue'
// 视频配置
const videoUrl = ref('/src/assets/images/02 西园戒幢律寺三坛大戒法会/sample-10s.mp4')
const videoOptions = ref({
fluid: true,
responsive: true,
aspectRatio: '16:9',
controls: true,
preload: 'metadata',
poster: '',
playbackRates: [0.5, 1, 1.25, 1.5, 2],
sources: [{
src: '/src/assets/images/02 西园戒幢律寺三坛大戒法会/sample-10s.mp4',
type: 'video/mp4'
}]
})
// 法会流程步骤数据
const processSteps = ref([
{ name: '准 备', active: true },
{ name: '正式开堂', active: false },
{ name: '封堂洒净', active: false },
{ name: '正授沙弥戒', active: false },
{ name: '二坛比丘戒', active: false },
{ name: '三坛菩萨戒', active: false },
{ name: '圆 满', active: false }
])
// 点击切换步骤状态
const selectStep = (index) => {
processSteps.value.forEach((step, i) => {
step.active = i === index
})
}
</script>
<style scoped>
.home-container {
position: relative;
min-height: 100vh;
width: 100%;
overflow-x: hidden;
}
/* 全屏背景图 - 海报@2x.png */
.full-background {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('@/assets/images/02 西园戒幢律寺三坛大戒法会/海报@2x.png');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
z-index: -2;
}
/* 左下角背景装饰图 - bg@2x.png */
.bottom-left-decoration {
position: fixed;
bottom: 0;
left: 0;
width: 50%;
height: 50%;
background-image: url('@/assets/images/02 西园戒幢律寺三坛大戒法会/bg@2x.png');
background-size: contain;
background-position: bottom left;
background-repeat: no-repeat;
z-index: -1;
pointer-events: none;
}
/* 主要内容区域 */
.main-content {
position: relative;
z-index: 1;
width: 100%;
}
/* Banner区域 */
.banner-section {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.banner-image {
width: 100%;
height: auto;
display: block;
object-fit: cover;
}
/* 视频播放器区域 */
.video-section {
width: 100%;
margin: 0;
padding: 0;
}
.video-section :deep(.video-player-container) {
width: 100%;
background: transparent;
}
.video-section :deep(.video-player) {
width: 100%;
height: auto;
}
/* 响应式设计 */
@media (max-width: 48rem) {
.bottom-left-decoration {
width: 60%;
height: 40%;
}
}
@media (max-width: 30rem) {
.bottom-left-decoration {
width: 70%;
height: 35%;
}
}
/* 法会流程模块 */
.ceremony-process {
width: 100%;
padding: 2rem 1rem;
position: relative;
z-index: 2;
}
/* 标题部分 */
.ceremony-title {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 2rem;
}
.ceremony-title img {
max-width: 12rem;
height: auto;
}
/* 流程容器 */
.process-container {
position: relative;
width: 100%;
}
/* 麻绳背景 */
.rope-background {
position: absolute;
top: 10%;
left: 0;
right: 0;
height: 0.3rem;
background-image: url('@/assets/images/02 西园戒幢律寺三坛大戒法会/麻绳@2x.png');
background-size: cover;
background-position: top;
background-repeat: repeat-x;
transform: translateY(-10%);
z-index: 1;
}
/* 流程步骤容器 */
.process-steps {
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
z-index: 2;
padding: 0 0.5rem;
gap: 0.5rem;
}
/* 单个流程步骤 */
.process-step {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
flex: 1;
cursor: pointer;
transition: transform 0.2s ease;
}
.process-step:hover {
transform: scale(1.05);
}
/* 步骤内容 */
.step-content {
width: 4rem;
height: 10rem;
background: linear-gradient(180deg, #DAC39E 0%, #BE9C63 100%);
border-radius: 0.75rem;
display: flex;
align-items: center;
justify-content: center;
position: relative;
transition: all 0.3s ease;
box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}
/* 选中状态的步骤内容 */
.process-step.active .step-content {
background: linear-gradient(180deg, #C8916C 0%, #975021 100%);
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}
/* 步骤文字 */
.step-text {
color: white;
font-size: 1rem;
font-weight: 600;
text-align: center;
line-height: 1.3;
writing-mode: vertical-rl;
text-orientation: mixed;
text-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
margin-top: 0.85rem;
/* 文字间隔 */
letter-spacing: 0.05rem;
}
/* 顶部白色圆形占位 */
.top-circle {
position: absolute;
top: 0.5rem;
left: 50%;
transform: translateX(-50%);
width: 0.5rem;
height: 0.5rem;
background: white;
border-radius: 50%;
z-index: 3;
}
/* 底部箭头 */
.bottom-arrow {
position: absolute;
bottom: -1.25rem;
left: 50%;
transform: translateX(-50%);
z-index: 3;
}
.bottom-arrow img {
width: 1rem;
height: 1rem;
}
/* 响应式调整 */
@media (max-width: 48rem) {
.ceremony-process {
padding: 1.5rem 0.5rem;
}
.ceremony-title img {
max-width: 10rem;
}
.step-content {
width: 3rem;
height: 8rem;
}
.step-text {
font-size: 0.9rem;
}
.process-steps {
padding: 0 0.25rem;
gap: 0.25rem;
}
}
@media (max-width: 30rem) {
.ceremony-process {
padding: 1rem 0.25rem;
}
.ceremony-title img {
max-width: 8rem;
}
.step-content {
width: 2.5rem;
height: 6.5rem;
}
.step-text {
font-size: 0.8rem;
}
.top-circle {
width: 0.75rem;
height: 0.75rem;
}
.bottom-arrow img {
width: 1rem;
height: 0.75rem;
}
.process-steps {
gap: 0.125rem;
}
}
</style>