home.blade.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. {{-- resources/views/pages/home.blade.php
  2. WikiPāli 首页:顶部导航(logo + 旧版入口 + 语言切换)+ 品牌 hero + 2×2 分流卡片。
  3. 卡片数据全部来自 PageIndexController 传入的 $cards,模板不硬编码栏目文案。
  4. --}}
  5. @extends('layouts.base')
  6. @section('title', __('home.title'))
  7. @push('styles')
  8. @vite(['resources/css/home.css'])
  9. @endpush
  10. @section('body-class', 'home-page')
  11. @section('page')
  12. <main class="home">
  13. {{-- 顶部导航:左 logo,右 旧版入口 + 语言切换 --}}
  14. <nav class="home-nav">
  15. <div class="home-nav__inner">
  16. <a class="home-nav__brand" href="/" aria-label="WikiPāli">
  17. <img src="{{ asset('assets/images/wikipali_logo_dark.svg') }}" alt="WikiPāli" class="home-nav__logo" />
  18. </a>
  19. <div class="home-nav__actions">
  20. <a class="home-nav__legacy"
  21. href="{{ config('mint.server.dashboard_base_path') }}"
  22. target="_blank"
  23. rel="noopener">
  24. {{ __('home.legacy') }}
  25. </a>
  26. <div class="home-nav__lang">
  27. <x-language-switcher />
  28. </div>
  29. </div>
  30. </div>
  31. </nav>
  32. {{-- 品牌 Hero:站名 + 一行说明,居中 --}}
  33. <header class="home-hero">
  34. <h1 class="home-hero__title">{{ __('home.hero_title') }}</h1>
  35. <p class="home-hero__lead">{{ __('home.hero_lead') }}</p>
  36. </header>
  37. {{-- 四张分流卡片,2×2 网格 --}}
  38. <div class="home-grid">
  39. @foreach ($cards as $card)
  40. <x-home.card
  41. :slug="$card['slug']"
  42. :eyebrow="$card['eyebrow']"
  43. :title="$card['title']"
  44. :lead="$card['lead']"
  45. :icon="$card['icon']"
  46. :tint="$card['tint']"
  47. :href="$card['href']"
  48. :cta="$card['cta']"
  49. :available="$card['available']"
  50. />
  51. @endforeach
  52. </div>
  53. {{-- Footer:版权 + 备案号(ICP / 公安备案),参考 typhoon 模板 --}}
  54. <footer class="home-footer">
  55. <div class="home-footer__inner">
  56. <span class="home-footer__item">© {{ now()->year }} WikiPāli</span>
  57. @if (!empty(config('mint.app.icp_code')))
  58. <span class="home-footer__item">
  59. <span>ICP备案号:</span>
  60. <a href="https://beian.miit.gov.cn/" target="_blank" rel="noreferrer">{{ config('mint.app.icp_code') }}</a>
  61. </span>
  62. <span class="home-footer__item">
  63. <img src="{{ asset('assets/images/logo_mps.png') }}" alt="公安备案" class="home-footer__icon" />
  64. @if (empty(config('mint.app.mps_code')))
  65. <span>滇公网安备[审批中]号</span>
  66. @else
  67. <span>{{ config('mint.app.mps_code') }}</span>
  68. @endif
  69. </span>
  70. @endif
  71. </div>
  72. </footer>
  73. </main>
  74. @endsection