index.blade.php 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. {{-- resources/views/library/index.blade.php
  2. Library 门户首页。
  3. 区块:Hero → 三藏分类 → 最新译文 → 栏目导航
  4. --}}
  5. @extends('layouts.library')
  6. @section('title', __('library.portal_title'))
  7. @push('styles')
  8. @vite('resources/css/modules/library-index.css')
  9. @endpush
  10. {{-- Hero --}}
  11. @section('hero')
  12. <section class="hero-section"
  13. style="background-image: url('{{ URL::asset('assets/images/hero-2.jpg') }}')">
  14. <div class="hero-overlay"></div>
  15. <div class="hero-content">
  16. <h1 class="hero-title">{{ __('library.portal_hero_title') }}</h1>
  17. <p class="hero-subtitle">{{ __('library.portal_hero_subtitle') }}</p>
  18. <div class="search-box">
  19. <x-ui.search-input
  20. :placeholder="__('library.search_placeholder_home')"
  21. size="lg" />
  22. </div>
  23. </div>
  24. </section>
  25. @endsection
  26. @section('content')
  27. <div class="page-body">
  28. <div class="container-xl">
  29. {{-- ── 一、三藏分类卡片 ── --}}
  30. <div class="lib-section">
  31. <div class="lib-section__header">
  32. <h2 class="lib-section__title">
  33. <i class="ti ti-books"></i>
  34. {{ __('library.section_tipitaka') }}
  35. </h2>
  36. <a href="{{ route('library.tipitaka.index') }}"
  37. class="lib-section__more">
  38. {{ __('library.enter_tipitaka') }} <i class="ti ti-arrow-right"></i>
  39. </a>
  40. </div>
  41. <div class="row g-3">
  42. @foreach($categoryData as $data)
  43. <div class="col-6 col-md-3">
  44. <div class="wiki-card h-100">
  45. <div class="lib-cat-card__head">
  46. <span class="lib-cat-card__name">
  47. {{ $data['category']['local_name'] }}
  48. </span>
  49. <a href="{{ route('library.tipitaka.category', ['id' => $data['category']['id']]) }}"
  50. class="lib-cat-card__more">
  51. {{ __('library.more') }} <i class="ti ti-arrow-right"></i>
  52. </a>
  53. </div>
  54. <ul class="wiki-cat-list">
  55. @foreach($data['children'] as $child)
  56. <li>
  57. <a href="{{ route('library.tipitaka.category', ['id' => $child['id']]) }}">
  58. {{ $child['local_name'] }}
  59. </a>
  60. </li>
  61. @endforeach
  62. </ul>
  63. </div>
  64. </div>
  65. @endforeach
  66. </div>
  67. </div>
  68. {{-- ── 二、最新译文 ── --}}
  69. @isset($recentBooks)
  70. <div class="lib-section">
  71. <div class="lib-section__header">
  72. <h2 class="lib-section__title">
  73. <i class="ti ti-clock"></i>
  74. {{ __('library.section_recent') }}
  75. <span class="lib-live-badge">
  76. <span class="lib-live-dot"></span>
  77. {{ __('library.updating_badge') }}
  78. </span>
  79. </h2>
  80. <a href="{{ route('library.tipitaka.index') }}"
  81. class="lib-section__more">
  82. {{ __('library.view_all') }} <i class="ti ti-arrow-right"></i>
  83. </a>
  84. </div>
  85. <div class="wiki-card lib-recent">
  86. @foreach($recentBooks as $book)
  87. <a href="{{ route('library.tipitaka.show', $book['id']) }}"
  88. class="lib-recent__item">
  89. {{-- 封面缩略图 --}}
  90. <x-ui.book-cover
  91. :image="$book['cover'] ?? null"
  92. :gradient="$book['cover_gradient'] ?? 'linear-gradient(135deg,#2d2010,#1a1208)'"
  93. :title="$book['title']"
  94. size="sm"
  95. :style3d="false" />
  96. {{-- 信息 --}}
  97. <div class="lib-recent__info">
  98. <div class="lib-recent__title">{{ $book['title'] }}</div>
  99. <div class="lib-recent__meta">
  100. <span class="lib-recent__category">{{ $book['category'] }}</span>
  101. <span class="lib-recent__sep">·</span>
  102. <span class="lib-recent__author">{{ $book['author'] }}</span>
  103. </div>
  104. </div>
  105. {{-- 右侧:标签 + 时间 --}}
  106. <div class="lib-recent__right">
  107. @if($book['is_new'])
  108. <span class="lib-new-badge">{{ __('library.badge_new') }}</span>
  109. @else
  110. <span class="lib-update-badge">{{ __('library.badge_updated') }}</span>
  111. @endif
  112. <span class="lib-recent__time">{{ $book['updated_at'] }}</span>
  113. </div>
  114. </a>
  115. @endforeach
  116. </div>
  117. </div>
  118. @endisset
  119. {{-- ── 三、工具箱 ── --}}
  120. <div class="lib-section">
  121. <div class="lib-section__header">
  122. <h2 class="lib-section__title">
  123. <i class="ti ti-tools"></i>
  124. {{ __('labels.toolbox') }}
  125. </h2>
  126. </div>
  127. <div class="row g-3">
  128. <div class="col-6 col-sm-4 col-md-3">
  129. <a href="{{ route('library.tools.script-convertor') }}" class="lib-nav-card">
  130. <i class="ti ti-transform lib-nav-card__icon"></i>
  131. <div class="lib-nav-card__name">{{ __('labels.tool_script_convertor') }}</div>
  132. <div class="lib-nav-card__desc">{{ __('labels.tool_script_convertor_desc') }}</div>
  133. </a>
  134. </div>
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. @endsection