Mistivia vor 1 Monat
Ursprung
Commit
0a6ed62a31
5 geänderte Dateien mit 32 neuen und 7 gelöschten Zeilen
  1. 1 1
      .gitignore
  2. 1 1
      data/build-card-info.py
  3. 29 4
      src/components/LeftPanel.svelte
  4. 1 1
      src/control/search.js
  5. 0 0
      src/data/cardDb.js

+ 1 - 1
.gitignore

@@ -24,4 +24,4 @@ dist-ssr
 *.sw?
 
 data/cards.json
-
+deploy.sh

+ 1 - 1
data/build-card-info.py

@@ -16,7 +16,7 @@ def convert(card):
         if namek in card and len(card[namek]) > 0:
             newCard['names'].append(card[namek])
     newCard['isExtra'] = False
-    for t in ['超量', '接', '同调', '融合']:
+    for t in ['超量', '接', '同调', '融合']:
         if t in card['text']['types']:
             newCard['isExtra'] = True
     newCard['cid'] = card['cid']

+ 29 - 4
src/components/LeftPanel.svelte

@@ -19,6 +19,12 @@
         </div>
         <div class="card-description">
             <pre class="card-desc-text">{$leftPanelCardDesc}</pre>
+            <div style="height:3em;line-height:1.0;overflow:hidden;">
+                <div style="break-inside:avoid;"><p style="text-align:center;"><small>
+                    <a class="link" href="https://github.com/mistivia/ygo-deck-builder">GitHub</a>
+                    <br>关注 <a class="link" href="https://mistivia.com">Mistivia</a> 谢谢喵~
+                </small></p></div>
+            </div>
         </div>
     </div>
 </div>
@@ -27,7 +33,7 @@
 
 .left-panel {
     width: 25%;
-    padding: 20px;
+    padding: 2vh 20px;
     background-color: #f5f5f5;
 }
 
@@ -40,16 +46,35 @@
 }
 
 .card-description {
-    line-height: 1.6;
+    line-height: 1.4;
     font-size: 14px;
-    height: 55vh;
+    height: 50vh;
 }
 
 .card-desc-text {
-      height: 45vh; 
+      height: calc(50vh - 3em); 
       white-space: pre-wrap;
       word-wrap: break-word;
       overflow: auto;
 }
 
+a.link {
+    color: #000000; /* 文本颜色设置为黑色 */
+    text-decoration: underline; /* 添加下划线 */
+    cursor: pointer; /* 鼠标悬停时显示手形指针 */
+}
+
+a.link:visited {
+    color: #000000; /* 已访问链接颜色保持黑色 */
+}
+
+a.link:hover {
+    color: #000000; /* 悬停时颜色不变 */
+    text-decoration: underline; /* 悬停时保持下划线 */
+}
+
+a.link:active {
+    color: #000000; /* 点击时颜色不变 */
+}
+
 </style>

+ 1 - 1
src/control/search.js

@@ -58,7 +58,7 @@ function onPrevPage() {
 }
 
 function onNextPage() {
-    if (curPage < Math.floor(resultCards.length / 10) - 1) {
+    if (curPage < Math.floor((resultCards.length - 1) / 10)) {
         curPage += 1;
         showCards();
     }

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
src/data/cardDb.js


Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.