Bläddra i källkod

更新了一些页面代码

unknown-o 4 år sedan
förälder
incheckning
be1d6685b4
4 ändrade filer med 6 tillägg och 13 borttagningar
  1. 0 3
      includes/footer.php
  2. 2 2
      index.php
  3. 3 3
      pages/404.php
  4. 1 5
      pages/card.php

+ 0 - 3
includes/footer.php

@@ -21,7 +21,6 @@
         var userAgentInfo = navigator.userAgent;
         var mobileAgents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
         var mobile_flag = false;
-        //根据userAgent判断是否是手机
         for (var v = 0; v < mobileAgents.length; v++) {
             if (userAgentInfo.indexOf(mobileAgents[v]) > 0) {
                 mobile_flag = true;
@@ -30,7 +29,6 @@
         }
         var screen_width = window.screen.width;
         var screen_height = window.screen.height;
-        //根据屏幕分辨率判断是否是手机
         if (screen_width < 500 && screen_height < 800) {
             mobile_flag = true;
         }
@@ -56,5 +54,4 @@
             });
         });
     });
-    //document.getElementById('').className += " mdui-list-item-active"
 </script>

+ 2 - 2
index.php

@@ -42,8 +42,8 @@ switch ($pageName) {
         listActive('about');
         break;
     case "card":
-        hideSomethings();
         include('./pages/card.php');
+        hideSomethings();
         break;
     case "admin":
         if ($_COOKIE['loveway_token'] == md5($ADMIN_USER . $ADMIN_PASS . 'KAGAMINE WORLD!' . date('Y-m-d', time()))) {
@@ -53,8 +53,8 @@ switch ($pageName) {
         }
         break;
     default:
+        $templateMode=false;
         include('./pages/404.php');
-        hideSomethings();
 
 }
 echo titleChange();

+ 3 - 3
pages/404.php

@@ -1,8 +1,5 @@
 <?php
 header('HTTP/1.1 404 Not Found');
-if ($templateMode) {
-    include('./includes/header.php');
-}
 ?>
 <!DOCTYPE html>
 <html lang="zh-CN">
@@ -13,6 +10,9 @@ if ($templateMode) {
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="theme-color" content="#3f51b5">
     <meta name="mdui-main-color" content="#3f51b5">
+    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/mdui.min.css" />
+    <script src="https://static.llilii.cn/libs/jquery/3.5.1/jquery.min.js"></script>
+    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/mdui.min.js"></script>
     <Title>页面走丢啦 - <?php echo getInfo('title') ?></Title>
     <style>
         .mdui-background-404 {

+ 1 - 5
pages/card.php

@@ -1,8 +1,4 @@
-<?php
-if ($templateMode) {
-    include('./includes/header.php');
-}
-?>
+
     <script>
         function RandomNumBoth(Min, Max) {
             var Range = Max - Min;