app.blade.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428
  1. <!doctype html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge" />
  7. <title>@yield('title', '巴利书库')</title>
  8. @stack('styles')
  9. <link href="https://cdn.jsdelivr.net/npm/@tabler/core@latest/dist/css/tabler.min.css" rel="stylesheet" />
  10. <link href="https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@latest/tabler-icons.min.css" rel="stylesheet" />
  11. <script src="https://cdn.jsdelivr.net/npm/@tabler/core@1.3.2/dist/js/tabler.min.js"></script>
  12. <style>
  13. .book-card {
  14. transition: transform 0.2s;
  15. }
  16. .book-card:hover {
  17. transform: translateY(-2px);
  18. }
  19. .book-cover {
  20. height: 200px;
  21. object-fit: cover;
  22. }
  23. @media (max-width: 768px) {
  24. .book-cover {
  25. height: 150px;
  26. }
  27. }
  28. .hero-section {
  29. height: 250px;
  30. width: 100%;
  31. background-image: url('{{ URL::asset("assets/images/hero-2.jpg") }}');
  32. background-size: cover;
  33. background-position: center;
  34. background-repeat: no-repeat;
  35. position: relative;
  36. display: flex;
  37. align-items: center;
  38. justify-content: center;
  39. }
  40. .hero-overlay {
  41. position: absolute;
  42. top: 0;
  43. left: 0;
  44. right: 0;
  45. bottom: 0;
  46. background: rgba(0, 0, 0, 0.2);
  47. }
  48. .hero-content {
  49. position: relative;
  50. z-index: 2;
  51. text-align: center;
  52. color: white;
  53. max-width: 600px;
  54. padding: 0 1rem;
  55. }
  56. .hero-title {
  57. font-size: 2.5rem;
  58. font-weight: bold;
  59. margin-bottom: 1rem;
  60. text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  61. }
  62. .hero-subtitle {
  63. font-size: 1.2rem;
  64. margin-bottom: 2rem;
  65. text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  66. }
  67. .search-box {
  68. background: white;
  69. border-radius: 0.5rem;
  70. padding: 0.5rem;
  71. box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  72. max-width: 500px;
  73. margin: 0 auto;
  74. }
  75. .feature-card {
  76. transition: transform 0.3s ease, box-shadow 0.3s ease;
  77. height: 100%;
  78. }
  79. .feature-card:hover {
  80. transform: translateY(-5px);
  81. box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  82. }
  83. .stats-section {
  84. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  85. color: white;
  86. }
  87. .stat-item {
  88. text-align: center;
  89. padding: 2rem 1rem;
  90. }
  91. .stat-number {
  92. font-size: 2.5rem;
  93. font-weight: bold;
  94. display: block;
  95. }
  96. .stat-label {
  97. font-size: 1rem;
  98. opacity: 0.9;
  99. margin-top: 0.5rem;
  100. }
  101. /* Navigation Styles */
  102. .top-nav {
  103. height: 50px;
  104. width: 100%;
  105. display: flex;
  106. justify-content: flex-end;
  107. align-items: center;
  108. padding: 0 2rem;
  109. position: relative;
  110. z-index: 10;
  111. }
  112. .nav-menu {
  113. display: flex;
  114. align-items: center;
  115. gap: 1.5rem;
  116. list-style: none;
  117. margin: 0;
  118. padding: 0;
  119. }
  120. .nav-item a {
  121. color: white;
  122. text-decoration: none;
  123. font-size: 0.95rem;
  124. font-weight: 500;
  125. transition: opacity 0.2s;
  126. white-space: nowrap;
  127. }
  128. .nav-item a:hover {
  129. opacity: 0.8;
  130. }
  131. /* Hamburger Menu */
  132. .hamburger-btn {
  133. display: none;
  134. background: rgba(255, 255, 255, 0.2);
  135. border: 2px solid white;
  136. border-radius: 0.375rem;
  137. color: white;
  138. font-size: 1.5rem;
  139. cursor: pointer;
  140. padding: 0.5rem 0.75rem;
  141. z-index: 1001;
  142. transition: background 0.2s;
  143. width: 44px;
  144. height: 44px;
  145. align-items: center;
  146. justify-content: center;
  147. }
  148. .hamburger-btn:hover {
  149. background: rgba(255, 255, 255, 0.3);
  150. }
  151. /* CSS Hamburger Icon */
  152. .hamburger-icon {
  153. display: flex;
  154. flex-direction: column;
  155. gap: 4px;
  156. width: 24px;
  157. }
  158. .hamburger-icon span {
  159. display: block;
  160. height: 2px;
  161. background: white;
  162. border-radius: 2px;
  163. transition: all 0.3s;
  164. }
  165. .hamburger-btn.active .hamburger-icon span:nth-child(1) {
  166. transform: translateY(6px) rotate(45deg);
  167. }
  168. .hamburger-btn.active .hamburger-icon span:nth-child(2) {
  169. opacity: 0;
  170. }
  171. .hamburger-btn.active .hamburger-icon span:nth-child(3) {
  172. transform: translateY(-6px) rotate(-45deg);
  173. }
  174. .mobile-menu {
  175. display: none;
  176. position: fixed;
  177. top: 0;
  178. right: -100%;
  179. width: 280px;
  180. height: 100vh;
  181. background: rgba(0, 0, 0, 0.95);
  182. backdrop-filter: blur(10px);
  183. transition: right 0.3s ease;
  184. z-index: 1000;
  185. padding-top: 60px;
  186. }
  187. .mobile-menu.active {
  188. right: 0;
  189. }
  190. .mobile-nav-menu {
  191. list-style: none;
  192. padding: 0;
  193. margin: 0;
  194. }
  195. .mobile-nav-item {
  196. border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  197. }
  198. .mobile-nav-item a {
  199. display: block;
  200. color: white;
  201. text-decoration: none;
  202. padding: 1rem 2rem;
  203. font-size: 1rem;
  204. transition: background 0.2s;
  205. }
  206. .mobile-nav-item a:hover {
  207. background: rgba(255, 255, 255, 0.1);
  208. }
  209. .mobile-overlay {
  210. display: none;
  211. position: fixed;
  212. top: 0;
  213. left: 0;
  214. width: 100%;
  215. height: 100%;
  216. background: rgba(0, 0, 0, 0.5);
  217. z-index: 999;
  218. }
  219. .mobile-overlay.active {
  220. display: block;
  221. }
  222. /* Responsive */
  223. @media (max-width: 768px) {
  224. .hero-title {
  225. font-size: 2rem;
  226. }
  227. .hero-subtitle {
  228. font-size: 1rem;
  229. }
  230. .hero-section {
  231. height: 250px;
  232. }
  233. .stat-number {
  234. font-size: 2rem;
  235. }
  236. .top-nav {
  237. padding: 0 1rem;
  238. }
  239. .nav-menu {
  240. display: none;
  241. }
  242. .hamburger-btn {
  243. display: flex;
  244. }
  245. .mobile-menu {
  246. display: block;
  247. }
  248. }
  249. @media (max-width: 576px) {
  250. .hero-title {
  251. font-size: 1.5rem;
  252. }
  253. .hero-subtitle {
  254. font-size: 0.9rem;
  255. }
  256. .top-nav {
  257. padding: 0 0.5rem;
  258. }
  259. }
  260. </style>
  261. </head>
  262. <body>
  263. <div class="page">
  264. <!-- Mobile Overlay -->
  265. <div class="mobile-overlay" id="mobileOverlay"></div>
  266. <!-- Mobile Menu -->
  267. <div class="mobile-menu" id="mobileMenu">
  268. <ul class="mobile-nav-menu">
  269. <li class="mobile-nav-item">
  270. <a href="{{ route('library.home') }}">首页</a>
  271. </li>
  272. <li class="mobile-nav-item">
  273. <a href="{{ route('library.wiki') }}">百科</a>
  274. </li>
  275. <li class="mobile-nav-item">
  276. <a href="{{ route('library.download') }}">下载</a>
  277. </li>
  278. <li class="mobile-nav-item">
  279. @auth
  280. <a href="#">我的账户</a>
  281. @else
  282. <a href="#">注册/登录</a>
  283. @endauth
  284. </li>
  285. <li class="mobile-nav-item" style="padding: 1rem 2rem;">
  286. <x-language-switcher />
  287. </li>
  288. </ul>
  289. </div>
  290. <!-- Hero Section -->
  291. <section class="hero-section">
  292. <div class="hero-overlay">
  293. <div class="top-nav">
  294. <!-- Desktop Menu -->
  295. <ul class="nav-menu">
  296. <li class="nav-item">
  297. <a href="{{ route('library.home') }}">首页</a>
  298. </li>
  299. <li class="nav-item">
  300. <a href="{{ route('library.wiki') }}">百科</a>
  301. </li>
  302. <li class="nav-item">
  303. <a href="{{ route('library.download') }}">下载</a>
  304. </li>
  305. <li class="nav-item">
  306. @auth
  307. <a href="#">我的账户</a>
  308. @else
  309. <a href="#">注册/登录</a>
  310. @endauth
  311. </li>
  312. <li class="nav-item">
  313. <x-language-switcher />
  314. </li>
  315. </ul>
  316. <!-- Hamburger Button -->
  317. <button class="hamburger-btn" id="hamburgerBtn">
  318. <div class="hamburger-icon">
  319. <span></span>
  320. <span></span>
  321. <span></span>
  322. </div>
  323. </button>
  324. </div>
  325. </div>
  326. <div class="hero-content">
  327. <h1 class="hero-title">巴利书库</h1>
  328. <p class="hero-subtitle">探索wikipali,开启智慧之门</p>
  329. <div class="search-box">
  330. <div class="input-group">
  331. <input type="text" class="form-control form-control-lg" placeholder="搜索图书、作者或主题...">
  332. <button class="btn btn-primary btn-lg" type="button">
  333. <i class="ti ti-search"></i>
  334. </button>
  335. </div>
  336. </div>
  337. </div>
  338. </section>
  339. <div class="page-wrapper">
  340. @yield('content')
  341. </div>
  342. </div>
  343. <!-- Tabler JS and Bootstrap -->
  344. <script src="https://cdn.jsdelivr.net/npm/@tabler/core@1.0.0-beta21/dist/js/tabler.min.js"></script>
  345. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
  346. <script>
  347. // Hamburger Menu Toggle
  348. const hamburgerBtn = document.getElementById('hamburgerBtn');
  349. const mobileMenu = document.getElementById('mobileMenu');
  350. const mobileOverlay = document.getElementById('mobileOverlay');
  351. function toggleMenu() {
  352. mobileMenu.classList.toggle('active');
  353. mobileOverlay.classList.toggle('active');
  354. hamburgerBtn.classList.toggle('active');
  355. }
  356. hamburgerBtn.addEventListener('click', toggleMenu);
  357. mobileOverlay.addEventListener('click', toggleMenu);
  358. // Close menu when clicking on a link
  359. document.querySelectorAll('.mobile-nav-item a').forEach(link => {
  360. link.addEventListener('click', () => {
  361. toggleMenu();
  362. });
  363. });
  364. </script>
  365. @stack('scripts')
  366. </body>
  367. </html>