feat(首页): 添加三师七证模块及响应式设计
添加三师七证模块,包含三个栏目(三师七证、戒子、义工)及其交互功能 实现模块的响应式布局,适配不同屏幕尺寸 优化现有样式和查看更多按钮功能
Showing
2 changed files
with
387 additions
and
16 deletions
931 KB
| ... | @@ -91,6 +91,56 @@ | ... | @@ -91,6 +91,56 @@ |
| 91 | </div> | 91 | </div> |
| 92 | </div> | 92 | </div> |
| 93 | </div> | 93 | </div> |
| 94 | + | ||
| 95 | + <!-- 三师七证 --> | ||
| 96 | + <div class="three-masters-section"> | ||
| 97 | + <!-- 标题图片 --> | ||
| 98 | + <div class="common-title"> | ||
| 99 | + <img src="/src/assets/images/02 西园戒幢律寺三坛大戒法会/三師七證@2x.png" alt="三师七证" class="title-image"> | ||
| 100 | + </div> | ||
| 101 | + | ||
| 102 | + <!-- 三个栏目 --> | ||
| 103 | + <div class="three-columns"> | ||
| 104 | + <!-- 三师七证栏目 --> | ||
| 105 | + <div class="column-item"> | ||
| 106 | + <div class="column-content"> | ||
| 107 | + <div class="column-overlay"></div> | ||
| 108 | + <div class="column-text"> | ||
| 109 | + <h3 class="column-title">三師七證</h3> | ||
| 110 | + <div class="more-button" @click="viewMore('masters')"> | ||
| 111 | + <span class="more-text">查看更多</span> | ||
| 112 | + </div> | ||
| 113 | + </div> | ||
| 114 | + </div> | ||
| 115 | + </div> | ||
| 116 | + | ||
| 117 | + <!-- 戒子栏目 --> | ||
| 118 | + <div class="column-item"> | ||
| 119 | + <div class="column-content"> | ||
| 120 | + <div class="column-overlay"></div> | ||
| 121 | + <div class="column-text"> | ||
| 122 | + <h3 class="column-title">戒子</h3> | ||
| 123 | + <div class="more-button" @click="viewMore('students')"> | ||
| 124 | + <span class="more-text">查看更多</span> | ||
| 125 | + </div> | ||
| 126 | + </div> | ||
| 127 | + </div> | ||
| 128 | + </div> | ||
| 129 | + | ||
| 130 | + <!-- 义工栏目 --> | ||
| 131 | + <div class="column-item"> | ||
| 132 | + <div class="column-content"> | ||
| 133 | + <div class="column-overlay"></div> | ||
| 134 | + <div class="column-text"> | ||
| 135 | + <h3 class="column-title">义工</h3> | ||
| 136 | + <div class="more-button" @click="viewMore('volunteers')"> | ||
| 137 | + <span class="more-text">查看更多</span> | ||
| 138 | + </div> | ||
| 139 | + </div> | ||
| 140 | + </div> | ||
| 141 | + </div> | ||
| 142 | + </div> | ||
| 143 | + </div> | ||
| 94 | </div> | 144 | </div> |
| 95 | </div> | 145 | </div> |
| 96 | </template> | 146 | </template> |
| ... | @@ -222,9 +272,29 @@ watch(currentStep, () => { | ... | @@ -222,9 +272,29 @@ watch(currentStep, () => { |
| 222 | }, { deep: true }) | 272 | }, { deep: true }) |
| 223 | 273 | ||
| 224 | // 查看更多按钮点击事件 | 274 | // 查看更多按钮点击事件 |
| 225 | -const viewMore = () => { | 275 | +const viewMore = (type) => { |
| 226 | - console.log('查看更多:', currentStep.value.name) | 276 | + if (type) { |
| 227 | - // 这里可以添加跳转到详情页面的逻辑 | 277 | + // 三师七证模块的点击事件 |
| 278 | + console.log('查看更多:', type) | ||
| 279 | + switch (type) { | ||
| 280 | + case 'masters': | ||
| 281 | + console.log('跳转到三师七证页面') | ||
| 282 | + // 这里可以添加跳转到三师七证页面的逻辑 | ||
| 283 | + break | ||
| 284 | + case 'students': | ||
| 285 | + console.log('跳转到戒子页面') | ||
| 286 | + // 这里可以添加跳转到戒子页面的逻辑 | ||
| 287 | + break | ||
| 288 | + case 'volunteers': | ||
| 289 | + console.log('跳转到义工页面') | ||
| 290 | + // 这里可以添加跳转到义工页面的逻辑 | ||
| 291 | + break | ||
| 292 | + } | ||
| 293 | + } else { | ||
| 294 | + // 原有的法会流程查看更多 | ||
| 295 | + console.log('查看更多:', currentStep.value.name) | ||
| 296 | + // 这里可以添加跳转到详情页面的逻辑 | ||
| 297 | + } | ||
| 228 | } | 298 | } |
| 229 | </script> | 299 | </script> |
| 230 | 300 | ||
| ... | @@ -291,6 +361,298 @@ const viewMore = () => { | ... | @@ -291,6 +361,298 @@ const viewMore = () => { |
| 291 | } | 361 | } |
| 292 | 362 | ||
| 293 | /* 响应式设计 */ | 363 | /* 响应式设计 */ |
| 364 | +@media (max-width: 768px) { | ||
| 365 | + .ceremony-process { | ||
| 366 | + padding: 2rem 1rem; | ||
| 367 | + } | ||
| 368 | + | ||
| 369 | + .ceremony-intro { | ||
| 370 | + padding: 1.5rem; | ||
| 371 | + } | ||
| 372 | + | ||
| 373 | + .ceremony-title { | ||
| 374 | + font-size: 1.5rem; | ||
| 375 | + } | ||
| 376 | + | ||
| 377 | + .ceremony-subtitle { | ||
| 378 | + font-size: 0.875rem; | ||
| 379 | + } | ||
| 380 | + | ||
| 381 | + .ceremony-description { | ||
| 382 | + font-size: 0.875rem; | ||
| 383 | + } | ||
| 384 | + | ||
| 385 | + .process-steps { | ||
| 386 | + gap: 1rem; | ||
| 387 | + } | ||
| 388 | + | ||
| 389 | + .step-item { | ||
| 390 | + height: 15rem; | ||
| 391 | + } | ||
| 392 | + | ||
| 393 | + .step-title-text { | ||
| 394 | + font-size: 2rem; /* 从1.5rem调整为2rem */ | ||
| 395 | + } | ||
| 396 | + | ||
| 397 | + .more-button { | ||
| 398 | + height: 2.5rem; | ||
| 399 | + } | ||
| 400 | + | ||
| 401 | + .more-text { | ||
| 402 | + font-size: 0.75rem; | ||
| 403 | + } | ||
| 404 | +} | ||
| 405 | + | ||
| 406 | +/* 三师七证模块样式 */ | ||
| 407 | +.three-masters-section { | ||
| 408 | + padding: 2rem 1rem; | ||
| 409 | + background: #E5DAC2; | ||
| 410 | +} | ||
| 411 | + | ||
| 412 | +/* 通用标题样式 */ | ||
| 413 | +.common-title { | ||
| 414 | + text-align: center; | ||
| 415 | + margin-bottom: 2rem; | ||
| 416 | +} | ||
| 417 | + | ||
| 418 | +.common-title img { | ||
| 419 | + max-width: 15rem; /* 比原来的12rem更大 */ | ||
| 420 | + height: auto; | ||
| 421 | +} | ||
| 422 | + | ||
| 423 | +/* 标题图片样式 - 保持向下兼容 */ | ||
| 424 | +.section-title { | ||
| 425 | + text-align: center; | ||
| 426 | + margin-bottom: 2rem; | ||
| 427 | +} | ||
| 428 | + | ||
| 429 | +.title-image { | ||
| 430 | + max-width: 15rem; /* 调整为更大的尺寸 */ | ||
| 431 | + height: auto; | ||
| 432 | +} | ||
| 433 | + | ||
| 434 | +/* 三个栏目容器 */ | ||
| 435 | +.three-columns { | ||
| 436 | + display: flex !important; | ||
| 437 | + flex-direction: row !important; | ||
| 438 | + gap: 1rem; | ||
| 439 | + justify-content: space-between; | ||
| 440 | + align-items: stretch; | ||
| 441 | +} | ||
| 442 | + | ||
| 443 | +/* 强制桌面端水平布局 */ | ||
| 444 | +@media (min-width: 481px) { | ||
| 445 | + .three-columns { | ||
| 446 | + display: flex !important; | ||
| 447 | + flex-direction: row !important; | ||
| 448 | + } | ||
| 449 | +} | ||
| 450 | + | ||
| 451 | +/* 单个栏目样式 */ | ||
| 452 | +.column-item { | ||
| 453 | + flex: 1; | ||
| 454 | + min-height: 20rem; | ||
| 455 | + height: 20rem; | ||
| 456 | +} | ||
| 457 | + | ||
| 458 | +.column-content { | ||
| 459 | + position: relative; | ||
| 460 | + width: 100%; | ||
| 461 | + height: 100%; | ||
| 462 | + min-height: 20rem; | ||
| 463 | + border-radius: 1.17rem; | ||
| 464 | + border: 0.08rem solid #C1A16A; | ||
| 465 | + background-image: url('/src/assets/images/02 西园戒幢律寺三坛大戒法会/截图/全家福3_副本.jpg'); | ||
| 466 | + background-size: cover; | ||
| 467 | + background-position: center; | ||
| 468 | + background-repeat: no-repeat; | ||
| 469 | + overflow: hidden; | ||
| 470 | + cursor: pointer; | ||
| 471 | + transition: all 0.3s ease; | ||
| 472 | +} | ||
| 473 | + | ||
| 474 | +.column-content:hover { | ||
| 475 | + transform: translateY(-0.25rem); | ||
| 476 | + box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2); | ||
| 477 | +} | ||
| 478 | + | ||
| 479 | +/* 蒙版效果 */ | ||
| 480 | +.column-overlay { | ||
| 481 | + position: absolute; | ||
| 482 | + top: 0; | ||
| 483 | + left: 0; | ||
| 484 | + width: 100%; | ||
| 485 | + height: 100%; | ||
| 486 | + background: linear-gradient(to bottom, transparent 0%, rgba(152, 81, 34, 0.3) 50%, rgba(152, 81, 34, 0.8) 100%); | ||
| 487 | + z-index: 1; | ||
| 488 | +} | ||
| 489 | + | ||
| 490 | +/* 栏目文字内容 */ | ||
| 491 | +.column-text { | ||
| 492 | + position: absolute; | ||
| 493 | + bottom: 0; | ||
| 494 | + left: 0; | ||
| 495 | + right: 0; | ||
| 496 | + padding: 1.5rem; | ||
| 497 | + z-index: 2; | ||
| 498 | + text-align: center; | ||
| 499 | + display: flex; | ||
| 500 | + flex-direction: column; | ||
| 501 | + align-items: center; | ||
| 502 | + justify-content: center; | ||
| 503 | +} | ||
| 504 | + | ||
| 505 | +.column-title { | ||
| 506 | + color: white; | ||
| 507 | + font-size: 1.25rem; | ||
| 508 | + font-weight: 700; | ||
| 509 | + margin-bottom: 1rem; | ||
| 510 | + text-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.8); | ||
| 511 | + width: 100%; | ||
| 512 | + text-align: center; | ||
| 513 | +} | ||
| 514 | + | ||
| 515 | +/* 栏目内的查看更多按钮 */ | ||
| 516 | +.column-text .more-button { | ||
| 517 | + position: static; | ||
| 518 | + margin: 0 auto; | ||
| 519 | + height: 2.5rem; | ||
| 520 | + width: 6rem; | ||
| 521 | + background-image: url('/src/assets/images/02 西园戒幢律寺三坛大戒法会/button-bg@2x.png'); | ||
| 522 | + background-size: contain; | ||
| 523 | + background-position: center; | ||
| 524 | + background-repeat: no-repeat; | ||
| 525 | + display: flex; | ||
| 526 | + align-items: center; | ||
| 527 | + justify-content: center; | ||
| 528 | + cursor: pointer; | ||
| 529 | + z-index: 3; | ||
| 530 | + transition: all 0.3s ease; | ||
| 531 | +} | ||
| 532 | + | ||
| 533 | +.column-text .more-button:hover { | ||
| 534 | + transform: scale(1.05); | ||
| 535 | + filter: brightness(1.1); | ||
| 536 | +} | ||
| 537 | + | ||
| 538 | +.column-text .more-text { | ||
| 539 | + color: white; | ||
| 540 | + font-size: 0.75rem; | ||
| 541 | + font-weight: 600; | ||
| 542 | + text-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.5); | ||
| 543 | +} | ||
| 544 | + | ||
| 545 | +/* 三师七证模块响应式设计 */ | ||
| 546 | + | ||
| 547 | +/* 大屏幕 (>1200px) */ | ||
| 548 | +@media (min-width: 1200px) { | ||
| 549 | + .column-title { | ||
| 550 | + font-size: 1.5rem; | ||
| 551 | + } | ||
| 552 | + | ||
| 553 | + .column-text .more-text { | ||
| 554 | + font-size: 0.875rem; | ||
| 555 | + } | ||
| 556 | + | ||
| 557 | + .column-text .more-button { | ||
| 558 | + height: 3rem; | ||
| 559 | + width: 7rem; | ||
| 560 | + } | ||
| 561 | +} | ||
| 562 | + | ||
| 563 | +/* 中等屏幕 (768px - 1199px) */ | ||
| 564 | +@media (min-width: 768px) and (max-width: 1199px) { | ||
| 565 | + .column-title { | ||
| 566 | + font-size: 1.25rem; | ||
| 567 | + } | ||
| 568 | + | ||
| 569 | + .column-text .more-text { | ||
| 570 | + font-size: 0.75rem; | ||
| 571 | + } | ||
| 572 | + | ||
| 573 | + .column-text .more-button { | ||
| 574 | + height: 2.5rem; | ||
| 575 | + width: 6rem; | ||
| 576 | + } | ||
| 577 | +} | ||
| 578 | + | ||
| 579 | +/* 小屏幕 (481px - 767px) */ | ||
| 580 | +@media (min-width: 481px) and (max-width: 767px) { | ||
| 581 | + .column-title { | ||
| 582 | + font-size: 1.125rem; | ||
| 583 | + } | ||
| 584 | + | ||
| 585 | + .column-text .more-text { | ||
| 586 | + font-size: 0.6875rem; | ||
| 587 | + } | ||
| 588 | + | ||
| 589 | + .column-text .more-button { | ||
| 590 | + height: 2.25rem; | ||
| 591 | + width: 5.5rem; | ||
| 592 | + } | ||
| 593 | + | ||
| 594 | + .column-text { | ||
| 595 | + padding: 1.25rem; | ||
| 596 | + } | ||
| 597 | +} | ||
| 598 | + | ||
| 599 | +/* 超小屏幕 (321px - 480px) */ | ||
| 600 | +@media (min-width: 321px) and (max-width: 480px) { | ||
| 601 | + .column-title { | ||
| 602 | + font-size: 1rem; | ||
| 603 | + } | ||
| 604 | + | ||
| 605 | + .column-text .more-text { | ||
| 606 | + font-size: 0.625rem; | ||
| 607 | + } | ||
| 608 | + | ||
| 609 | + .column-text .more-button { | ||
| 610 | + height: 2rem; | ||
| 611 | + width: 5rem; | ||
| 612 | + } | ||
| 613 | + | ||
| 614 | + .column-text { | ||
| 615 | + padding: 1rem; | ||
| 616 | + } | ||
| 617 | +} | ||
| 618 | + | ||
| 619 | +/* 三师七证模块响应式设计 - 只在很小的屏幕上使用垂直布局 */ | ||
| 620 | +@media (max-width: 320px) { | ||
| 621 | + .three-masters-section { | ||
| 622 | + padding: 2rem 1rem; | ||
| 623 | + } | ||
| 624 | + | ||
| 625 | + .three-columns { | ||
| 626 | + flex-direction: column !important; | ||
| 627 | + gap: 1rem; | ||
| 628 | + } | ||
| 629 | + | ||
| 630 | + .column-item { | ||
| 631 | + min-height: 15rem; | ||
| 632 | + height: 15rem; | ||
| 633 | + } | ||
| 634 | + | ||
| 635 | + .title-image { | ||
| 636 | + max-width: 10rem; /* 从8rem调整为10rem */ | ||
| 637 | + } | ||
| 638 | + | ||
| 639 | + .column-title { | ||
| 640 | + font-size: 0.875rem; | ||
| 641 | + } | ||
| 642 | + | ||
| 643 | + .column-text .more-text { | ||
| 644 | + font-size: 0.5rem; | ||
| 645 | + } | ||
| 646 | + | ||
| 647 | + .column-text .more-button { | ||
| 648 | + height: 1.75rem; | ||
| 649 | + width: 4.5rem; | ||
| 650 | + } | ||
| 651 | + | ||
| 652 | + .column-text { | ||
| 653 | + padding: 0.75rem; | ||
| 654 | + } | ||
| 655 | +} | ||
| 294 | @media (max-width: 48rem) { | 656 | @media (max-width: 48rem) { |
| 295 | .bottom-left-decoration { | 657 | .bottom-left-decoration { |
| 296 | width: 60%; | 658 | width: 60%; |
| ... | @@ -309,7 +671,6 @@ const viewMore = () => { | ... | @@ -309,7 +671,6 @@ const viewMore = () => { |
| 309 | .ceremony-wrapper { | 671 | .ceremony-wrapper { |
| 310 | position: relative; | 672 | position: relative; |
| 311 | width: 100vw; | 673 | width: 100vw; |
| 312 | - min-height: 100vh; | ||
| 313 | background-image: url('/src/assets/images/02 西园戒幢律寺三坛大戒法会/背景@2x.png'); | 674 | background-image: url('/src/assets/images/02 西园戒幢律寺三坛大戒法会/背景@2x.png'); |
| 314 | background-size: cover; | 675 | background-size: cover; |
| 315 | background-position: center; | 676 | background-position: center; |
| ... | @@ -451,13 +812,20 @@ const viewMore = () => { | ... | @@ -451,13 +812,20 @@ const viewMore = () => { |
| 451 | /* 响应式调整 */ | 812 | /* 响应式调整 */ |
| 452 | @media (max-width: 48rem) { | 813 | @media (max-width: 48rem) { |
| 453 | .ceremony-process { | 814 | .ceremony-process { |
| 454 | - padding: 1.5rem 0.5rem; | 815 | + padding: 2.5rem 0.5rem; |
| 455 | } | 816 | } |
| 456 | 817 | ||
| 457 | - .ceremony-title img { | 818 | +.ceremony-title img { |
| 458 | - max-width: 10rem; | 819 | + max-width: 12.5rem; /* 从10rem调整为12.5rem */ |
| 820 | + } | ||
| 821 | + | ||
| 822 | + .title-image { | ||
| 823 | + max-width: 12.5rem; /* 从10rem调整为12.5rem */ | ||
| 459 | } | 824 | } |
| 460 | 825 | ||
| 826 | + .common-title img { | ||
| 827 | + max-width: 12.5rem; | ||
| 828 | + } | ||
| 461 | .step-content { | 829 | .step-content { |
| 462 | width: 3rem; | 830 | width: 3rem; |
| 463 | height: 8rem; | 831 | height: 8rem; |
| ... | @@ -475,13 +843,20 @@ const viewMore = () => { | ... | @@ -475,13 +843,20 @@ const viewMore = () => { |
| 475 | 843 | ||
| 476 | @media (max-width: 30rem) { | 844 | @media (max-width: 30rem) { |
| 477 | .ceremony-process { | 845 | .ceremony-process { |
| 478 | - padding: 1rem 0.25rem; | 846 | + padding: 2rem 0.25rem; |
| 847 | + } | ||
| 848 | + | ||
| 849 | +.ceremony-title img { | ||
| 850 | + max-width: 10rem; /* 从8rem调整为10rem */ | ||
| 479 | } | 851 | } |
| 480 | 852 | ||
| 481 | - .ceremony-title img { | 853 | + .title-image { |
| 482 | - max-width: 8rem; | 854 | + max-width: 10rem; /* 从8rem调整为10rem */ |
| 483 | } | 855 | } |
| 484 | 856 | ||
| 857 | + .common-title img { | ||
| 858 | + max-width: 10rem; | ||
| 859 | + } | ||
| 485 | .step-content { | 860 | .step-content { |
| 486 | width: 2.5rem; | 861 | width: 2.5rem; |
| 487 | height: 6.5rem; | 862 | height: 6.5rem; |
| ... | @@ -566,7 +941,7 @@ const viewMore = () => { | ... | @@ -566,7 +941,7 @@ const viewMore = () => { |
| 566 | 941 | ||
| 567 | .step-title-text { | 942 | .step-title-text { |
| 568 | color: white; | 943 | color: white; |
| 569 | - font-size: 2rem; | 944 | + font-size: 2.5rem; /* 从2rem调整为2.5rem,更大 */ |
| 570 | font-weight: 700; | 945 | font-weight: 700; |
| 571 | writing-mode: vertical-rl; | 946 | writing-mode: vertical-rl; |
| 572 | text-orientation: mixed; | 947 | text-orientation: mixed; |
| ... | @@ -627,11 +1002,7 @@ const viewMore = () => { | ... | @@ -627,11 +1002,7 @@ const viewMore = () => { |
| 627 | } | 1002 | } |
| 628 | 1003 | ||
| 629 | .step-title-text { | 1004 | .step-title-text { |
| 630 | - font-size: 1.75rem; | 1005 | + font-size: 2.25rem; /* 从1.75rem调整为2.25rem */ |
| 631 | - } | ||
| 632 | - | ||
| 633 | - .decorative-line { | ||
| 634 | - /* 响应式下的装饰线样式,位置由JavaScript动态计算 */ | ||
| 635 | } | 1006 | } |
| 636 | 1007 | ||
| 637 | .more-button { | 1008 | .more-button { | ... | ... |
-
Please register or login to post a comment