Browse Source

_tipitaka.css => tipitaka.css

visuddhinanda 4 days ago
parent
commit
98238bafb8

+ 63 - 31
api-v13/resources/css/components/_card-book.css

@@ -1,6 +1,6 @@
 /* resources/css/components/_card-book.css
 /* resources/css/components/_card-book.css
    书籍封面组件(.book-cover)+ 纵向书籍卡片(.card-book)。
    书籍封面组件(.book-cover)+ 纵向书籍卡片(.card-book)。
-   .book-cover 从 _anthology.css 提取,供 anthology / tipitaka 共用。
+   .book-cover 从 anthology.css 提取,供 anthology / tipitaka 共用。
 */
 */
 
 
 /* ══════════════════════════════════════════
 /* ══════════════════════════════════════════
@@ -17,24 +17,43 @@
 }
 }
 
 
 /* 尺寸 */
 /* 尺寸 */
-.book-cover--sm { width: 34px;  min-width: 34px;  height: 46px; }
-.book-cover--md { width: 130px; min-width: 130px; height: 180px; }
-.book-cover--lg { width: 155px; min-width: 155px; height: 215px; border-radius: 3px 9px 9px 3px; }
+.book-cover--sm {
+    width: 34px;
+    min-width: 34px;
+    height: 46px;
+}
+.book-cover--md {
+    width: 130px;
+    min-width: 130px;
+    height: 180px;
+}
+.book-cover--lg {
+    width: 155px;
+    min-width: 155px;
+    height: 215px;
+    border-radius: 3px 9px 9px 3px;
+}
 
 
 /* 3D 书脊 */
 /* 3D 书脊 */
 .book-cover--3d {
 .book-cover--3d {
     box-shadow:
     box-shadow:
-        -4px 0 0 rgba(0,0,0,.3),
-        -6px 4px 14px rgba(0,0,0,.4),
-        4px 4px 18px rgba(0,0,0,.3);
+        -4px 0 0 rgba(0, 0, 0, 0.3),
+        -6px 4px 14px rgba(0, 0, 0, 0.4),
+        4px 4px 18px rgba(0, 0, 0, 0.3);
 }
 }
 
 
 .book-cover--3d::before {
 .book-cover--3d::before {
     content: '';
     content: '';
     position: absolute;
     position: absolute;
-    left: 0; top: 0; bottom: 0;
+    left: 0;
+    top: 0;
+    bottom: 0;
     width: 13px;
     width: 13px;
-    background: linear-gradient(to right, rgba(0,0,0,.4), rgba(0,0,0,.1));
+    background: linear-gradient(
+        to right,
+        rgba(0, 0, 0, 0.4),
+        rgba(0, 0, 0, 0.1)
+    );
     border-radius: 3px 0 0 3px;
     border-radius: 3px 0 0 3px;
     z-index: 2;
     z-index: 2;
 }
 }
@@ -45,8 +64,11 @@
     position: absolute;
     position: absolute;
     inset: 0;
     inset: 0;
     background: repeating-linear-gradient(
     background: repeating-linear-gradient(
-        45deg, transparent, transparent 8px,
-        rgba(255,255,255,.015) 8px, rgba(255,255,255,.015) 9px
+        45deg,
+        transparent,
+        transparent 8px,
+        rgba(255, 255, 255, 0.015) 8px,
+        rgba(255, 255, 255, 0.015) 9px
     );
     );
     z-index: 1;
     z-index: 1;
 }
 }
@@ -65,7 +87,7 @@
     position: relative;
     position: relative;
     z-index: 3;
     z-index: 3;
     text-align: center;
     text-align: center;
-    padding: 0 .5rem;
+    padding: 0 0.5rem;
 }
 }
 
 
 .book-cover__title {
 .book-cover__title {
@@ -74,13 +96,13 @@
     font-weight: 600;
     font-weight: 600;
     color: #fff;
     color: #fff;
     line-height: 1.6;
     line-height: 1.6;
-    letter-spacing: .12em;
+    letter-spacing: 0.12em;
     word-break: break-all;
     word-break: break-all;
 }
 }
 
 
 .book-cover--sm .book-cover__title {
 .book-cover--sm .book-cover__title {
-    font-size: .6rem;
-    letter-spacing: .04em;
+    font-size: 0.6rem;
+    letter-spacing: 0.04em;
     line-height: 1.3;
     line-height: 1.3;
 }
 }
 
 
@@ -88,13 +110,13 @@
     width: 28px;
     width: 28px;
     height: 1px;
     height: 1px;
     background: var(--wp-brand);
     background: var(--wp-brand);
-    margin: .5rem auto;
+    margin: 0.5rem auto;
 }
 }
 
 
 .book-cover__subtitle {
 .book-cover__subtitle {
-    font-size: .65rem;
-    color: rgba(255,255,255,.45);
-    letter-spacing: .04em;
+    font-size: 0.65rem;
+    color: rgba(255, 255, 255, 0.45);
+    letter-spacing: 0.04em;
 }
 }
 
 
 /* ══════════════════════════════════════════
 /* ══════════════════════════════════════════
@@ -103,12 +125,14 @@
    ══════════════════════════════════════════ */
    ══════════════════════════════════════════ */
 
 
 .card-book {
 .card-book {
-    transition: transform 0.2s, box-shadow 0.2s;
+    transition:
+        transform 0.2s,
+        box-shadow 0.2s;
 }
 }
 
 
 .card-book:hover {
 .card-book:hover {
     transform: translateY(-2px);
     transform: translateY(-2px);
-    box-shadow: 0 8px 24px rgba(0,0,0,.1);
+    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
 }
 }
 
 
 .card-book__link {
 .card-book__link {
@@ -131,16 +155,20 @@
 }
 }
 
 
 @media (max-width: 768px) {
 @media (max-width: 768px) {
-    .card-book .book-cover--md { height: 150px; }
+    .card-book .book-cover--md {
+        height: 150px;
+    }
 }
 }
 
 
-.card-book__info { padding: .75rem 0 0; }
+.card-book__info {
+    padding: 0.75rem 0 0;
+}
 
 
 .card-book__title {
 .card-book__title {
     font-size: 0.9375rem;
     font-size: 0.9375rem;
     font-weight: 600;
     font-weight: 600;
     color: var(--tblr-body-color);
     color: var(--tblr-body-color);
-    margin-bottom: .25rem;
+    margin-bottom: 0.25rem;
     line-height: 1.4;
     line-height: 1.4;
     display: -webkit-box;
     display: -webkit-box;
     -webkit-line-clamp: 2;
     -webkit-line-clamp: 2;
@@ -148,13 +176,15 @@
     overflow: hidden;
     overflow: hidden;
 }
 }
 
 
-.card-book:hover .card-book__title { color: var(--tblr-primary); }
+.card-book:hover .card-book__title {
+    color: var(--tblr-primary);
+}
 
 
 .card-book__author,
 .card-book__author,
 .card-book__publisher {
 .card-book__publisher {
-    font-size: .8125rem;
+    font-size: 0.8125rem;
     color: var(--tblr-secondary);
     color: var(--tblr-secondary);
-    margin-bottom: .25rem;
+    margin-bottom: 0.25rem;
 }
 }
 
 
 .card-book__publisher-link {
 .card-book__publisher-link {
@@ -162,13 +192,15 @@
     text-decoration: none;
     text-decoration: none;
 }
 }
 
 
-.card-book__publisher-link:hover { text-decoration: underline; }
+.card-book__publisher-link:hover {
+    text-decoration: underline;
+}
 
 
 .card-book__badges {
 .card-book__badges {
     display: flex;
     display: flex;
     flex-wrap: wrap;
     flex-wrap: wrap;
     gap: 4px;
     gap: 4px;
-    margin-top: .375rem;
+    margin-top: 0.375rem;
 }
 }
 
 
 .card-book__badge {
 .card-book__badge {
@@ -177,7 +209,7 @@
     background: var(--tblr-bg-surface-secondary);
     background: var(--tblr-bg-surface-secondary);
     border: 1px solid var(--tblr-border-color);
     border: 1px solid var(--tblr-border-color);
     border-radius: 20px;
     border-radius: 20px;
-    font-size: .6875rem;
+    font-size: 0.6875rem;
     color: var(--tblr-secondary);
     color: var(--tblr-secondary);
 }
 }
 
 
@@ -194,6 +226,6 @@
 @media (max-width: 575px) {
 @media (max-width: 575px) {
     .book-grid {
     .book-grid {
         grid-template-columns: repeat(2, 1fr);
         grid-template-columns: repeat(2, 1fr);
-        gap: .875rem;
+        gap: 0.875rem;
     }
     }
 }
 }

+ 0 - 0
api-v13/resources/css/modules/_tipitaka.css → api-v13/resources/css/modules/tipitaka.css


+ 4 - 4
api-v13/resources/views/components/ui/book-grid.blade.php

@@ -1,19 +1,19 @@
 {{-- resources/views/components/ui/book-grid.blade.php
 {{-- resources/views/components/ui/book-grid.blade.php
      书籍网格组件。替代原 components/book-list.blade.php。
      书籍网格组件。替代原 components/book-list.blade.php。
-     去除内联 <style> 和 CDN 引入,样式由 modules/_tipitaka.css 提供。
+     去除内联 <style> 和 CDN 引入,样式由 modules/tipitaka.css 提供。
      Props:
      Props:
        $books      — 书籍数组
        $books      — 书籍数组
        $emptyText  — 空状态文字(默认"暂无图书")
        $emptyText  — 空状态文字(默认"暂无图书")
 --}}
 --}}
 @props([
 @props([
-    'books'     => [],
-    'emptyText' => '暂无图书',
+'books' => [],
+'emptyText' => '暂无图书',
 ])
 ])
 
 
 @if(!empty($books) && count($books) > 0)
 @if(!empty($books) && count($books) > 0)
 <div class="book-grid">
 <div class="book-grid">
     @foreach($books as $book)
     @foreach($books as $book)
-        <x-ui.card-book :book="$book" />
+    <x-ui.card-book :book="$book" />
     @endforeach
     @endforeach
 </div>
 </div>
 @else
 @else

+ 1 - 1
api-v13/resources/views/library/tipitaka/category.blade.php

@@ -7,7 +7,7 @@
 @section('title', $currentCategory['name'] . ' · 巴利书库')
 @section('title', $currentCategory['name'] . ' · 巴利书库')
 
 
 @push('styles')
 @push('styles')
-@vite('resources/css/modules/_tipitaka.css')
+@vite('resources/css/modules/tipitaka.css')
 @endpush
 @endpush
 
 
 @section('breadcrumb')
 @section('breadcrumb')

+ 1 - 1
api-v13/resources/views/library/tipitaka/show.blade.php

@@ -4,7 +4,7 @@
 @section('title', $book['title'] . ' · 巴利书库')
 @section('title', $book['title'] . ' · 巴利书库')
 
 
 @push('styles')
 @push('styles')
-@vite('resources/css/modules/_tipitaka.css')
+@vite('resources/css/modules/tipitaka.css')
 @endpush
 @endpush
 
 
 @section('breadcrumb')
 @section('breadcrumb')