Browse Source

修复在伪静态为关闭时card显示异常的问题

吴先森 4 years ago
parent
commit
57240e952c
2 changed files with 19 additions and 3 deletions
  1. 1 1
      index.php
  2. 18 2
      pages/card.php

+ 1 - 1
index.php

@@ -21,6 +21,7 @@ if ($REWRITE) {
 }
 if (empty($QueryArr)) {
     $QueryArr = $_GET;
+    $cardID = $QueryArr['id'];
 }
 $templateMode = empty($QueryArr['_pjax']);
 $siteTitle = getInfo('title');
@@ -43,7 +44,6 @@ switch ($pageName) {
         break;
     case "card":
         include('./pages/card.php');
-        hideSomethings();
         break;
     case "admin":
         if ($_COOKIE['loveway_token'] == md5($ADMIN_USER . $ADMIN_PASS . 'KAGAMINE WORLD!' . date('Y-m-d', time()))) {

+ 18 - 2
pages/card.php

@@ -1,3 +1,9 @@
+<?php
+if ($templateMode) {
+    include('./includes/header.php');
+}
+?>
+<br /><br />
 <script>
     function RandomNumBoth(Min, Max) {
         var Range = Max - Min;
@@ -23,8 +29,6 @@
         xhr.open('get', 'https://static.llilii.cn/json/img_list.json');
         xhr.send(null);
     }
-
-    document.getElementById('pjax-container').style = 'max-width: 400px;';
 </script>
 
 <?php
@@ -52,6 +56,18 @@ try {
                 ?>
                     <div class="mdui-divider"></div>
                 <?php } ?>
+                <div class="mdui-card-menu">
+                    <a target="_blank" style="color:#4F4F4F" href="
+                    <?php
+                    if ($REWRITE) {
+                        echo "/";
+                    } else {
+                        echo '/';
+                    }
+                    ?>" class="mdui-btn mdui-btn-icon mdui-float-right">
+                        <i class="mdui-icon material-icons">arrow_back</i>
+                    </a>
+                </div>
             </div>
             <div class="mdui-card-primary">
                 <div class="mdui-card-primary-title">To <?php echo $row['to_who']; ?></div>