Pārlūkot izejas kodu

添加灯箱和缩略图

wqg 3 nedēļas atpakaļ
vecāks
revīzija
583f0366b8
2 mainītis faili ar 15 papildinājumiem un 2 dzēšanām
  1. 13 0
      usr/themes/default/header.php
  2. 2 2
      var/Utils/HyperDown.php

+ 13 - 0
usr/themes/default/header.php

@@ -32,6 +32,19 @@
     })();
     </script>
 
+    <!-- fancybox -->
+    <script src="https://cdn.wqg.life/common/fancybox/fancybox.umd.js"></script>
+    <link rel="stylesheet" href="https://cdn.wqg.life/common/fancybox/fancybox.css" />
+    
+    <!-- simple-lightbox -->
+    <!-- <script src="https://cdn.wqg.life/common/simple-lightbox/simple-lightbox.js"></script> -->
+    <!-- <link rel="stylesheet" href="https://cdn.wqg.life/common/simple-lightbox/simple-lightbox.css" /> -->
+    
+    <!-- 自定义js -->
+    <script src="https://cdn.wqg.life/common/typecho.js"></script>
+    <!-- 自定义css -->
+    <link rel="stylesheet" href="https://cdn.wqg.life/common/typecho.css" />
+
 </head>
 <body>
 

+ 2 - 2
var/Utils/HyperDown.php

@@ -493,7 +493,7 @@ class HyperDown
                 $title = empty($title) ? $escaped : " title=\"{$title}\"";
 
                 return $this->makeHolder(
-                    "<img src=\"{$url}\" alt=\"{$title}\" title=\"{$title}\">"
+                    "<img src=\"{$url}!ys\" alt=\"{$title}\" title=\"{$title}\">"
                 );
             },
             $text
@@ -505,7 +505,7 @@ class HyperDown
                 $escaped = htmlspecialchars($this->escapeBracket($matches[1]));
 
                 $result = isset($this->_definitions[$matches[2]]) ?
-                    "<img src=\"{$this->_definitions[$matches[2]]}\" alt=\"{$escaped}\" title=\"{$escaped}\">"
+                    "<img src=\"{$this->_definitions[$matches[2]]}!ys\" alt=\"{$escaped}\" title=\"{$escaped}\">"
                     : $escaped;
 
                 return $this->makeHolder($result);