Browse Source

delete baisuTwo

pull/85/head
xiaoz 3 years ago
parent
commit
fe5bd06502
  1. 32
      templates/baisuTwo/README.md
  2. 1065
      templates/baisuTwo/css/style.css
  3. 1
      templates/baisuTwo/images/icon/baidu.svg
  4. 1
      templates/baisuTwo/images/icon/bilibili.svg
  5. 1
      templates/baisuTwo/images/icon/bing.svg
  6. 1
      templates/baisuTwo/images/icon/google.svg
  7. BIN
      templates/baisuTwo/images/icon/toutiao.ico
  8. 22
      templates/baisuTwo/images/icon/weibo.svg
  9. BIN
      templates/baisuTwo/images/icon/zhihu.png
  10. BIN
      templates/baisuTwo/images/logo.png
  11. 10
      templates/baisuTwo/images/logo.svg
  12. BIN
      templates/baisuTwo/images/search-bj.jpg
  13. BIN
      templates/baisuTwo/images/touxiang.png
  14. 484
      templates/baisuTwo/index.php
  15. 13
      templates/baisuTwo/info.json
  16. 323
      templates/baisuTwo/js/admin.js
  17. 7
      templates/baisuTwo/js/clipboard.min.js
  18. 264
      templates/baisuTwo/js/common.js
  19. 1
      templates/baisuTwo/js/holmes.js
  20. 2
      templates/baisuTwo/js/jquery-3.5.1.min.js
  21. 4554
      templates/baisuTwo/js/lunar.js

32
templates/baisuTwo/README.md

@ -1,32 +0,0 @@ @@ -1,32 +0,0 @@
# OneNav主题
onenav导航的主题
![输入图片说明](https://images.gitee.com/uploads/images/2022/0226/233837_3fa5c693_1718725.png "屏幕截图.png")
![输入图片说明](https://images.gitee.com/uploads/images/2022/0226/233859_ed83bce1_1718725.png "屏幕截图.png")
## 天气插件
天气插件采用的是【和风天气】的标准版天气插件,可无限制免费试用,需要先注册和风天气账号,
[和风天气账号注册](https://id.qweather.com/#/register);
[和风天气创建插件页面](https://widget.qweather.com/create-standard)
插件 选择【横版】、【款:240px】、【高:180px】;否则会出现样式偏移的问题。其他条件任选。
生成代码后 除第一行`<div id="he-plugin-standard"></div>`外,其他代码复制到主题文件夹下`index.php`底部对应位置即可。
## 一键添加
![输入图片说明](https://images.gitee.com/uploads/images/2021/0410/112213_3a134ad6_1718725.gif "a.gif")
在浏览器标签栏添加新标签
标签名称栏随意填写
标签地址栏,填写一下地址代码
```
javascript: var url = location.href;
var title = document.title;
void(open('http://www.你的域名.com/index.php?c=admin&page=add_quick_tpl&url=' + encodeURIComponent(url) + '&title=' + encodeURIComponent(title), "_blank", "toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, left=200,top=200,width=400, height=460"));
```
注意域名要替换成你的域名,然后保存即可。
## 相关链接
* [OneNav官网](https://nav.rss.ink/)
* [onenav作者](https://www.xiaoz.me/)

1065
templates/baisuTwo/css/style.css

File diff suppressed because it is too large Load Diff

1
templates/baisuTwo/images/icon/baidu.svg

@ -1 +0,0 @@ @@ -1 +0,0 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1622362571350" class="icon" viewBox="0 0 1097 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18345" xmlns:xlink="http://www.w3.org/1999/xlink" width="214.2578125" height="200"><defs><style type="text/css"></style></defs><path d="M501.248 385.024c60.928-1.243429 118.418286 35.84 152.137143 90.770286 50.249143 83.163429 116.297143 127.707429 140.141714 150.235428 29.769143 28.16 155.867429 95.085714 128.512 241.590857-27.136 144.457143-163.986286 150.893714-163.986286 150.893715s-64.073143 6.802286-174.299428-19.748572a402.285714 402.285714 0 0 0-82.505143-9.216 401.481143 401.481143 0 0 0-82.505143 9.216c-110.372571 26.550857-174.299429 19.748571-174.299428 19.748572s-136.777143-6.436571-163.986286-150.893715C52.955429 721.115429 179.2 654.189714 208.969143 626.029714c23.844571-22.528 89.965714-67.072 140.141714-150.235428 33.718857-54.857143 91.209143-92.013714 152.137143-90.770286z m-36.278857 169.325714H393.508571v110.738286H332.8c-76.946286 0-128.877714 56.32-128.877714 128 0 78.043429 48.786286 132.827429 133.558857 132.827429h127.561143v-371.565715zM753.371429 662.820571h-69.485715l0.146286 193.828572h-71.606857c-13.165714 0-23.259429-7.241143-23.259429-32.548572V662.966857h-69.193143v183.515429c0 47.250286 27.062857 79.433143 86.674286 79.433143H753.371429V662.820571z m-391.533715 71.314286l31.744 0.073143v122.587429h-59.392c-36.205714 0-59.245714-28.818286-59.245714-61.220572 0-32.256 21.723429-61.44 57.417143-61.44z m-231.204571-486.4c71.899429-6.509714 115.565714 67.584 122.368 132.608 7.753143 73.508571-18.358857 149.942857-93.476572 160.329143C72.411429 552.740571 19.675429 477.842286 19.163429 401.846857 18.724571 321.828571 61.44 253.952 130.56 247.734857z m741.376 0c69.046857 6.217143 111.835429 74.166857 111.323428 154.112-0.438857 75.995429-53.174857 150.893714-140.214857 138.825143-75.117714-10.313143-101.229714-86.820571-93.476571-160.329143 6.802286-65.024 50.468571-139.117714 122.368-132.608zM349.330286 1.243429c71.241143-3.730286 116.297143 62.244571 118.272 144.676571 1.682286 74.752-24.649143 150.893714-98.889143 157.988571-82.505143 7.826286-139.190857-62.683429-136.338286-151.04C234.861714 68.169143 285.988571 4.681143 349.330286 1.243429z m303.835428 0c63.268571 3.437714 114.468571 66.925714 116.955429 151.625142 2.852571 88.356571-53.906286 158.866286-136.411429 150.966858-74.166857-7.021714-100.644571-83.163429-98.816-157.988572C536.795429 63.561143 582.070857-2.413714 653.165714 1.316571z" fill="#2932E1" p-id="18346"></path></svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

1
templates/baisuTwo/images/icon/bilibili.svg

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 8.1 KiB

1
templates/baisuTwo/images/icon/bing.svg

@ -1 +0,0 @@ @@ -1 +0,0 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1622362667410" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="19825" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M340.5824 70.109867L102.536533 0.682667v851.217066L340.650667 643.345067V70.109867zM102.536533 851.7632l238.045867 171.6224 580.881067-340.923733V411.784533L102.536533 851.831467z" fill="#409EFF" p-id="19826"></path><path d="M409.463467 255.3856l113.732266 238.933333 138.8544 56.866134 259.413334-139.400534-506.0608-156.330666z" fill="#409EFF" p-id="19827"></path></svg>

Before

Width:  |  Height:  |  Size: 750 B

1
templates/baisuTwo/images/icon/google.svg

@ -1 +0,0 @@ @@ -1 +0,0 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1622362580710" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="19195" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M213.1976 515.482c0-33.485 5.632-65.588 15.616-95.693L53.4536 287.155A511.053 511.053 0 0 0 0.0016 515.482c0 82.048 19.2 159.436 53.35 228.147L228.6606 610.765c-10.24-30.72-15.437-62.9-15.463-95.283" fill="#FBBC05" p-id="19196"></path><path d="M521.2426 210.944a303.36 303.36 0 0 1 191.872 67.891l151.629-149.913C772.3536 49.306 653.9006 0.077 521.2436 0.077c-205.978 0-383.028 116.659-467.79 287.078L228.9416 419.79c40.397-121.498 155.597-208.87 292.352-208.87" fill="#EA4335" p-id="19197"></path><path d="M523.4706 813.235c-137.473 0-253.236-86.81-293.889-207.565L53.3256 737.51c85.172 169.37 263.092 285.261 470.144 285.261 127.719 0 249.677-44.39 341.248-127.641L697.3706 768.46c-47.18 29.108-106.65 44.8-173.952 44.8" fill="#34A853" p-id="19198"></path><path d="M1023.4376 510.618c0-30.26-4.787-62.874-11.904-93.133H523.4186v197.888h280.935c-14.004 67.481-52.224 119.347-106.957 153.088L864.7176 895.13c96.18-87.373 158.72-217.55 158.72-384.512" fill="#4285F4" p-id="19199"></path></svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
templates/baisuTwo/images/icon/toutiao.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

22
templates/baisuTwo/images/icon/weibo.svg

@ -1,22 +0,0 @@ @@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 200 200" style="enable-background:new 0 0 200 200;" xml:space="preserve">
<style type="text/css">
.st0{fill:#F9101B;}
.st1{fill:#030405;}
.st2{fill:#FD9F19;}
</style>
<path class="st0" d="M149,95.3c0,0,20.3-48.4-47.5-24.3c2.1-25.4-8.9-40.8-42-22.1c0,0-107.5,72.9-29.1,119.5
c0,0,98.6,40.7,143.4-34.9C182.7,106.3,156.4,94.9,149,95.3z M85.3,168.4c-32.6,3.7-61.1-10.8-63.6-32.4
c-2.5-21.7,21.9-42.3,54.6-46c32.6-3.8,61.1,10.8,63.6,32.4C142.4,144,118,164.6,85.3,168.4z"/>
<path class="st1" d="M72,105.8c16-1.5,30,8.3,31.2,21.8c1.2,13.5-10.8,25.6-26.8,27c-16,1.5-30-8.3-31.2-21.8
C44,119.3,56,107.2,72,105.8L72,105.8z M65.2,128c-4.9,0-9,3.8-9,8.4c0,4.6,4,8.4,9,8.4c5,0,9-3.8,9-8.4
C74.2,131.7,70.2,128,65.2,128z M80.7,122.6c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4l0,0c2.2,0,4-1.8,4-4
C84.7,124.4,82.9,122.6,80.7,122.6z"/>
<path class="st2" d="M168,83.5c-2,0-3.7-1.6-3.7-3.7c0-0.3,0-0.6,0.1-0.8c2.3-10.2,1.4-17.5-2.8-21.6c-6.9-6.7-20.8-3.5-20.9-3.5
c-2,0.5-4-0.7-4.4-2.7c-0.5-2,0.7-4,2.7-4.4c0.7-0.2,18-4.3,27.8,5.3c6.1,6,7.7,15.6,4.8,28.5C171.2,82.3,169.7,83.5,168,83.5z"/>
<path class="st2" d="M191.9,93.5c-2.7,0-4.9-2.2-4.9-4.9c0-0.3,0-0.5,0.1-0.8c4.1-24.9,0.8-42.4-9.9-52
c-16.5-14.7-46.1-6.3-46.4-6.3c-2.6,0.8-5.3-0.7-6.1-3.3c-0.7-2.6,0.8-5.3,3.4-6.1c1.4-0.4,34.9-10,55.6,8.3
c13.4,11.9,17.9,32.4,13.1,60.9C196.4,91.8,194.3,93.5,191.9,93.5L191.9,93.5z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

BIN
templates/baisuTwo/images/icon/zhihu.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

BIN
templates/baisuTwo/images/logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

10
templates/baisuTwo/images/logo.svg

@ -1,10 +0,0 @@ @@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="1479px" height="329px" viewBox="0 0 1479 329" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="logo" transform="translate(75.000000, 40.000000)" fill-rule="nonzero">
<path d="M18.3736583,173.333056 C5.72231659,153.412382 0,134.369253 0,111.492539 C0,49.9169098 49.0248199,0 109.5,0 C169.97518,0 219,49.9169098 219,111.492539 C219,134.369253 213.277683,153.412382 200.626342,173.333056 C175.2,215.552238 125.925,249 109.5,249 C93.075,249 43.8,215.552238 18.3736583,173.333056 Z" id="body" fill="#4991F2"></path>
<path d="M122.40506,54.9725023 L122.55088,54.9725023 L122.40506,54.9725023 Z M122.40506,45 L121.675961,45 C119.488663,45.2933089 117.301364,46.31989 115.259886,48.6663611 L114.822426,49.2529789 L58.9734077,123.460128 C56.6402895,126.686526 56.3486497,130.352887 58.2443083,134.019248 C59.994147,137.245646 63.3480045,139.445463 67.1393216,139.445463 L95.8658402,139.592117 L86.679187,193.267644 C85.9500876,197.813932 88.4290257,202.36022 92.6578026,204.266728 C93.9701816,204.853346 95.2825606,205 96.7407595,205 C99.6571573,205 102.281915,203.533456 104.323394,200.893676 L160.026592,120.380385 C162.359711,117.153987 162.65135,113.487626 160.755692,109.821265 C158.860033,106.154904 155.943635,104.39505 151.860678,104.39505 L123.13416,104.39505 L132.174993,57.3189734 C132.320813,56.5857012 132.466633,55.7057745 132.466633,54.9725023 C132.466633,49.5462878 127.946216,45 122.84252,45 L122.40506,45 Z" id="flash" fill="#FFFFFF"></path>
</g>
<path d="M406.244,124.416 L406.244,164.016 L458.372,164.016 L458.372,173.232 L406.244,173.232 L406.244,216 L395.588,216 L395.588,115.2 L464.708,115.2 L464.708,124.416 L406.244,124.416 Z M553.204,189.072 L497.044,189.072 L484.948,216 L473.86,216 L519.94,115.2 L530.452,115.2 L576.532,216 L565.3,216 L553.204,189.072 Z M549.316,180.432 L525.124,126.288 L500.932,180.432 L549.316,180.432 Z M607.5,213.264 C600.635966,210.863988 595.332019,207.69602 591.588,203.76 L595.764,195.552 C599.412018,199.200018 604.25997,202.151989 610.308,204.408 C616.35603,206.664011 622.595968,207.792 629.028,207.792 C638.052045,207.792 644.819977,206.136017 649.332,202.824 C653.844023,199.511983 656.1,195.216026 656.1,189.936 C656.1,185.90398 654.876012,182.688012 652.428,180.288 C649.979988,177.887988 646.980018,176.040006 643.428,174.744 C639.875982,173.447994 634.932032,172.032008 628.596,170.496 C621.011962,168.57599 614.964023,166.728009 610.452,164.952 C605.939977,163.175991 602.076016,160.464018 598.86,156.816 C595.643984,153.167982 594.036,148.224031 594.036,141.984 C594.036,136.895975 595.379987,132.264021 598.068,128.088 C600.756013,123.911979 604.883972,120.576012 610.452,118.08 C616.020028,115.583988 622.931959,114.336 631.188,114.336 C636.948029,114.336 642.587972,115.127992 648.108,116.712 C653.628028,118.296008 658.40398,120.479986 662.436,123.264 L658.836,131.76 C654.611979,128.975986 650.100024,126.888007 645.3,125.496 C640.499976,124.103993 635.796023,123.408 631.188,123.408 C622.355956,123.408 615.708022,125.111983 611.244,128.52 C606.779978,131.928017 604.548,136.319973 604.548,141.696 C604.548,145.72802 605.771988,148.967988 608.22,151.416 C610.668012,153.864012 613.739982,155.735994 617.436,157.032 C621.132018,158.328006 626.099969,159.743992 632.34,161.28 C639.732037,163.104009 645.707977,164.903991 650.268,166.68 C654.828023,168.456009 658.691984,171.143982 661.86,174.744 C665.028016,178.344018 666.612,183.215969 666.612,189.36 C666.612,194.448025 665.244014,199.079979 662.508,203.256 C659.771986,207.432021 655.572028,210.743988 649.908,213.192 C644.243972,215.640012 637.284041,216.864 629.028,216.864 C621.539963,216.864 614.364034,215.664012 607.5,213.264 Z M715.94,124.416 L680.516,124.416 L680.516,115.2 L762.02,115.2 L762.02,124.416 L726.596,124.416 L726.596,216 L715.94,216 L715.94,124.416 Z M845.188,189.072 L789.028,189.072 L776.932,216 L765.844,216 L811.924,115.2 L822.436,115.2 L868.516,216 L857.284,216 L845.188,189.072 Z M841.3,180.432 L817.108,126.288 L792.916,180.432 L841.3,180.432 Z M893.22,115.2 L934.26,115.2 C944.916053,115.2 954.323959,117.335979 962.484,121.608 C970.644041,125.880021 976.979977,131.831962 981.492,139.464 C986.004023,147.096038 988.26,155.807951 988.26,165.6 C988.26,175.392049 986.004023,184.103962 981.492,191.736 C976.979977,199.368038 970.644041,205.319979 962.484,209.592 C954.323959,213.864021 944.916053,216 934.26,216 L893.22,216 L893.22,115.2 Z M933.684,206.784 C942.516044,206.784 950.243967,205.032018 956.868,201.528 C963.492033,198.023982 968.627982,193.176031 972.276,186.984 C975.924018,180.791969 977.748,173.66404 977.748,165.6 C977.748,157.53596 975.924018,150.408031 972.276,144.216 C968.627982,138.023969 963.492033,133.176018 956.868,129.672 C950.243967,126.167982 942.516044,124.416 933.684,124.416 L903.876,124.416 L903.876,206.784 L933.684,206.784 Z M1124.852,115.2 L1124.852,216 L1114.628,216 L1114.628,135.36 L1075.028,203.184 L1069.988,203.184 L1030.388,135.792 L1030.388,216 L1020.164,216 L1020.164,115.2 L1028.948,115.2 L1072.724,189.936 L1116.068,115.2 L1124.852,115.2 Z M1165.684,115.2 L1176.34,115.2 L1176.34,216 L1165.684,216 L1165.684,115.2 Z M1301.412,115.2 L1301.412,216 L1292.628,216 L1227.828,134.208 L1227.828,216 L1217.172,216 L1217.172,115.2 L1225.956,115.2 L1290.9,196.992 L1290.9,115.2 L1301.412,115.2 Z" fill="#333333"></path>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.4 KiB

BIN
templates/baisuTwo/images/search-bj.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

BIN
templates/baisuTwo/images/touxiang.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

484
templates/baisuTwo/index.php

@ -1,484 +0,0 @@ @@ -1,484 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta http-equiv="Cache-Control" content="no-transform">
<meta name="applicable-device" content="pc,mobile">
<meta name="MobileOptimized" content="width">
<meta name="HandheldFriendly" content="true">
<meta name="author" content="BaiSu" />
<title><?php echo $site['title']; ?> - <?php echo $site['subtitle']; ?></title>
<meta name="keywords" content="<?php echo $site['keywords']; ?>" />
<meta name="description" content="<?php echo $site['description']; ?>" />
<link rel="stylesheet" type="text/css" href="templates/<?php echo $template; ?>/css/style.css" />
<link rel="stylesheet" href="static/font-awesome/4.7.0/css/font-awesome.css">
<link rel="stylesheet" type="text/css" href="static/layui/css/layui.css" />
<?php echo $site['custom_header']; ?>
<style>
<?php if( $theme_config->link_description == "hide" ) { ?>
/*链接描述是否显示*/
.site-main .site-list .list .desc {
/*none:不显示,block:显示*/
display: none;
}
<?php } ?>
</style>
</head>
<body>
<!--手机顶部 S-->
<!--手机顶部 S-->
<div class="m-header">
<div class="logo">
<a href="/"><img src="<?php echo $site['logo']; ?>" /></a>
</div>
<div class="navbar">
<i class="iconfont icon-caidan"></i>
</div>
<div class="m-navlist-w">
<div class="m-navlist">
<?php
foreach ($categorys as $category) {
$font_icon = empty($category['font_icon']) ? '' : "<i class='{$category['font_icon']}'></i> ";
?>
<a href="#category-<?php echo $category['id']; ?>" class="list catlist">
<?php echo $font_icon; ?>
<?php echo htmlspecialchars_decode($category['name']); ?>
</a>
<?php } ?>
</div>
</div>
</div>
<!--手机顶部 E-->
<!--手机顶部 E-->
<!--左侧分类栏 S-->
<div class="index-nav">
<div class="logo">
<a href="/"><img src="<?php echo $site['logo']; ?>" /></a>
</div>
<div class="type-list">
<?php
foreach ($category_parent as $category) {
$font_icon = empty($category['font_icon']) ? '' : "<i class='{$category['font_icon']}'></i> ";
?>
<div class="list">
<a class="catlist" style="overflow:hidden;white-space: nowrap;text-overflow: ellipsis;-o-text-overflow:ellipsis;" href="#category-<?php echo $category['id']; ?>">
<?php echo $font_icon; ?>
<?php echo htmlspecialchars_decode($category['name']); ?>
</a>
<span class="editFid" data-fid = "<?php echo $category['id']; ?>"><i class="iconfont icon-bianji"></i></span>
</div>
<!-- 遍历二级分类-->
<?php foreach (get_category_sub($category['id']) AS $category_sub){
?>
<div class="list" style="padding-left:1em;">
<a class="catlist" style="font-size:12px;font-weight: normal;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;-o-text-overflow:ellipsis;" href="#category-<?php echo $category_sub['id']; ?>">
<i class="<?php echo $category_sub['font_icon']; ?>"></i>
<?php echo htmlspecialchars_decode($category_sub['name']); ?>
</a>
<span class="editFid" data-fid = "<?php echo $category_sub['id']; ?>"><i class="iconfont icon-bianji"></i></span>
</div>
<?php } ?>
<!-- 遍历二级分类END-->
<?php } ?>
<div class="list add" id="addCat">
<a>
<i class="iconfont icon-tianjia"></i>添加分类</a>
</div>
</div>
<div class="user-info">
<div class="pic">
<a href="/">
<img src="templates/<?php echo $template; ?>/images/touxiang.png" /></a>
</div>
<div class="text">
<?php
if( is_login() ) {
?>
<a href="/index.php?c=admin" target="_blank">
<p class="t1">
<?php echo $site['title']; ?>
</p>
<p class="t2">管理后台</p>
</a>
<?php }else{ ?>
<a href="/index.php?c=login" target="_blank">
<p class="t1">尚未登录</p>
<p class="t2">请先登录账户!</p>
</a>
<?php } ?>
</div>
</div>
</div>
<!--左侧分类栏 E-->
<!--中间主体 S-->
<div class="index-main">
<!--搜索 S-->
<div class="search-main-w">
<div class="search-main">
<div class="search-input">
<input type="text" class="kw" name="search" id="search" value="" class="kw" placeholder="回车键百度搜索" autocomplete="off" />
<button class="search-bendi"><i class="iconfont icon-sousuo"></i></button>
</div>
<div class="search-btnlist">
<button class="search-btn" data-url="https://www.baidu.com/s?ie=UTF-8&wd=">
<img src="templates/<?php echo $template; ?>/images/icon/baidu.svg" />
百度搜索</button>
<button class="search-change"><i class="iconfont icon-xiangxia"></i></button>
<div class="search-lists hide">
<div class="list" data-url="https://www.baidu.com/s?ie=UTF-8&wd=">
<img src="templates/<?php echo $template; ?>/images/icon/baidu.svg" />百度搜索
</div>
<div class="list" data-url="https://www.google.com/search?q=">
<img src="templates/<?php echo $template; ?>/images/icon/google.svg" />谷歌搜索
</div>
<div class="list" data-url="https://cn.bing.com/search?q=">
<img src="templates/<?php echo $template; ?>/images/icon/bing.svg" />必应搜索
</div>
<div class="list" data-url="https://www.zhihu.com/search?type=content&q=">
<img src="templates/<?php echo $template; ?>/images/icon/zhihu.png" />知乎搜索
</div>
<div class="list" data-url="https://search.bilibili.com/all?keyword=">
<img src="templates/<?php echo $template; ?>/images/icon/bilibili.svg" />Bilibili搜索
</div>
<div class="list" data-url="https://s.weibo.com/weibo?q=">
<img src="templates/<?php echo $template; ?>/images/icon/weibo.svg" />微博搜索
</div>
<div class="list" data-url="https://so.toutiao.com/search?dvpf=pc&source=input&keyword=">
<img src="templates/<?php echo $template; ?>/images/icon/toutiao.ico" />头条搜索
</div>
<!--此处添加搜索引擎 S-->
<!--<div class="list" data-url="搜索链接">
<img src="搜索引擎图标路径" />搜索引擎名称
</div>-->
<!--此处添加搜索引擎 E-->
<div class="list kongs"></div>
</div>
</div>
</div>
<div class="date-main">
<time class="times" id="nowTime">00:00:00</time>
<span class="dates" id="nowYmd">2022年02月28日</span>
<div class="list">
<span class="lunars" id="nowLunar">壬寅年正月廿八 </span>
<span class="weeks" id="nowWeek">星期一</span>
</div>
</div>
<div class="weather-main" id="he-plugin-standard"></div>
</div>
<div class="search">
<div class="list">
<input type="text" name="search" id="search" value="" class="kw" placeholder="输入关键词进行搜索,回车键百度搜索" autocomplete="off" />
<button><i class="iconfont icon-sousuo"></i></button>
</div>
</div>
<!--搜索 E-->
<div class="site-main">
<!-- 遍历分类目录 -->
<?php foreach ( $categorys as $category ) {
$fid = $category['id'];
$links = get_links($fid);
$font_icon = empty($category['font_icon']) ? '' : "<i class='{$category['font_icon']}'></i> ";
//如果分类是私有的
if( $category['property'] == 1 ) {
$property = '<span><i class="one iconfont icon-suo"></i></span>';
}
else {
$property = '';
}
?>
<div class="site-name" id="category-<?php echo $category['id']; ?>">
<?php echo $font_icon; ?>
<?php echo htmlspecialchars_decode($category['name']); ?>
<?php echo $property; ?>
</div>
<div class="site-list">
<!-- 遍历链接 -->
<?php
foreach ($links as $link) {
//默认描述
$link['description'] = empty($link['description']) ? '作者很懒,没有填写描述。' : $link['description'];
?>
<div class="list urllist" id="id_<?php echo $link['id']; ?>" data-id="<?php echo $link['id']; ?>" data-url="<?php echo $link['url']; ?>">
<a href="/index.php?c=click&id=<?php echo $link['id']; ?>" target="_blank">
<p class="name">
<img src="https://favicon.rss.ink/v1/<?php echo base64($link['url']); ?>">
<?php echo $link['title']; ?>
</p>
<p class="desc">
<?php echo $link['description']; ?>
</p>
</a>
<?php if($link['property'] == 1 ) { ?>
<span><i class="one iconfont icon-suo"></i></span>
<?php } ?>
</div>
<?php } ?>
<div class="list kongs"></div>
<div class="list kongs"></div>
<div class="list kongs"></div>
<div class="list kongs"></div>
</div>
<!-- 遍历链接END -->
<?php } ?>
</div>
</div>
<!--中间主体 E-->
<!--底部版权 S-->
<footer>
<?php if( empty( $site['custom_footer']) ){ ?>
© 2022 BaiSu,Powered by
<a target="_blank" href="https://github.com/helloxz/onenav" title="简约导航/书签管理器" rel="nofollow">OneNav</a>
<br> The theme author is
<a href="https://gitee.com/baisucode/onenav" target="_blank">BaiSu</a>
<?php }else{
echo $site['custom_footer'];
} ?>
</footer>
<!--底部版权 E-->
<!--返回顶部 S-->
<div class="tool-list">
<?php
if( is_login() ) {
?>
<div class="addsite list" id="addsite">
<i class="iconfont icon-tianjia"></i>
</div>
<?php }else{ ?>
<a href="/index.php?c=login" class="addsite list">
<i class="iconfont icon-zhanghao"></i>
</a>
<?php } ?>
<div class="scroll_top list">
<i class="iconfont icon-top"></i>
</div>
</div>
<!--返回顶部 E-->
<!--添加链接 S-->
<div class="addsite-main" id="addsiteBox">
<div class="title">
添加链接
</div>
<form class="layui-form list-w">
<div class="list">
<span class="icon"><i class="iconfont icon-charulianjie"></i></span>
<input type="text" class="text" name="url" id="url" required lay-verify="required|url" placeholder="请输入完整的网址链接" autocomplete="off">
</div>
<div class="list">
<span class="icon"><i class="iconfont icon-charulianjie"></i></span>
<input type="text" class="text" name="url_standby" id="url_standby" placeholder="请输入备用链接,如果没有,请留空" autocomplete="off">
</div>
<div class="list">
<span class="icon"><i class="iconfont icon-bianji"></i></span>
<input type="text" class="text" name="title" id="title" required lay-verify="required" placeholder="请输入标题" autocomplete="off">
</div>
<div class="list type">
<input type="hidden" name="fid" id="fid" value="" required lay-verify="required" />
<?php foreach ($categorys as $category) {
?>
<span class="fid" data-fid="<?php echo $category['id'] ?>"><?php echo htmlspecialchars_decode($category['name']); ?></span>
<?php } ?>
<span class="kongs"></span>
<span class="kongs"></span>
<span class="kongs"></span>
</div>
<div class="list list-2">
<div class="li">
<span>权重:</span>
<input type="text" class="num" name="weight" min="0" max="999" value="0" required lay-verify="required|number" autocomplete="off">
</div>
<div class="li">
私有:
<input type="checkbox" lay-skin="switch" lay-text="是|否" name="property" value="1">
</div>
</div>
<div class="list">
<textarea name="description" id="description" placeholder="请输入站点描述(选填)"></textarea>
</div>
<div class="list">
<button lay-submit lay-filter="add_link">添加</button>
</div>
</form>
</div>
<!--添加链接 E-->
<!--修改链接 S-->
<div class="addsite-main" id="editsiteBox">
<div class="title">
修改链接
</div>
<form class="layui-form list-w" lay-filter="editsite">
<input type="hidden" name="id" id="id" value="" required lay-verify="required" />
<div class="list">
<span class="icon"><i class="iconfont icon-charulianjie"></i></span>
<input type="text" class="text" name="url" id="url" required lay-verify="required|url" placeholder="请输入完整的网址链接" autocomplete="off">
</div>
<div class="list">
<span class="icon"><i class="iconfont icon-charulianjie"></i></span>
<input type="text" class="text" name="url_standby" id="url_standby" placeholder="请输入备用链接,如果没有,请留空" autocomplete="off">
</div>
<div class="list">
<span class="icon"><i class="iconfont icon-bianji"></i></span>
<input type="text" class="text" name="title" id="title" required lay-verify="required" placeholder="请输入标题" autocomplete="off">
</div>
<div class="list type">
<input type="hidden" name="fid" id="fid" value="" required lay-verify="required" />
<?php foreach ($categorys as $category) {
?>
<span class="fid editfid-<?php echo $category['id'] ?>" data-fid="<?php echo $category['id'] ?>"><?php echo htmlspecialchars_decode($category['name']); ?></span>
<?php } ?>
<span class="kongs"></span>
<span class="kongs"></span>
<span class="kongs"></span>
</div>
<div class="list list-2">
<div class="li">
<span>权重:</span>
<input type="text" class="num" name="weight" min="0" max="999" value="0" required lay-verify="required|number" autocomplete="off">
</div>
<div class="li">
私有:
<input type="checkbox" lay-skin="switch" lay-text="是|否" name="property" value="1">
</div>
</div>
<div class="list">
<textarea name="description" id="description" placeholder="请输入站点描述(选填)"></textarea>
</div>
<div class="list">
<button lay-submit lay-filter="edit_link">修改</button>
</div>
</form>
</div>
<!--修改链接 E-->
<!--添加分类 S-->
<div class="addsite-main" id="addFidBox">
<div class="title">
添加分类
</div>
<form class="layui-form list-w" lay-filter="editsite">
<div class="list">
<span class="icon"><i class="iconfont icon-bianji"></i></span>
<input type="text" class="text" name="name" id="name" required lay-verify="required" placeholder="请输入分类名称" autocomplete="off">
</div>
<div class="list">
<span class="icon"><i class="iconfont icon-shezhi1"></i></span>
<input type="text" class="text" name="font_icon" id="font_icon" required lay-verify="required" placeholder="请输入或选择分类图标" autocomplete="off">
</div>
<div class="list list-2">
<div class="li">
<span>权重:</span>
<input type="text" class="num" name="weight" min="0" max="999" value="0" required lay-verify="required|number" autocomplete="off">
</div>
<div class="li">
私有:
<input type="checkbox" lay-skin="switch" lay-text="是|否" name="property" value="1">
</div>
</div>
<div class="list">
<textarea name="description" id="description" placeholder="请输入分类描述(选填)"></textarea>
</div>
<div class="list">
<button lay-submit lay-filter="add_fid">添加</button>
</div>
</form>
</div>
<!--添加分类 E-->
<!--修改分类 S-->
<div class="addsite-main" id="editFidBox">
<div class="title">
修改分类
</div>
<form class="layui-form list-w" lay-filter="editfid">
<input type="hidden" name="id" id="id" value="" required lay-verify="required" />
<div class="list">
<span class="icon"><i class="iconfont icon-bianji"></i></span>
<input type="text" class="text" name="name" id="name" required lay-verify="required" placeholder="请输入分类名称" autocomplete="off">
</div>
<div class="list">
<span class="icon"><i class="iconfont icon-shezhi1"></i></span>
<input type="text" class="text" name="font_icon" id="font_icon" required lay-verify="required" placeholder="请输入或选择分类图标" autocomplete="off">
</div>
<div class="list list-2">
<div class="li">
<span>权重:</span>
<input type="text" class="num" name="weight" min="0" max="999" value="0" required lay-verify="required|number" autocomplete="off">
</div>
<div class="li">
私有:
<input type="checkbox" lay-skin="switch" lay-text="是|否" name="property" value="1">
</div>
<div class="li" style = "display:none;">
<span>fid:</span>
<input type="text" class="num" name="fid" min="0" max="999" required lay-verify="required|number" autocomplete="off">
</div>
</div>
<div class="list">
<textarea name="description" id="description" placeholder="请输入分类描述(选填)"></textarea>
</div>
<div class="list">
<button lay-submit lay-filter="edit_fid">修改</button>
</div>
</form>
</div>
<!--修改分类 E-->
<!--iconfont-->
<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_3000268_oov6h4vru0h.css" />
<script src="//at.alicdn.com/t/font_3000268_oov6h4vru0h.js" type="text/javascript" charset="utf-8"></script>
<!--JS-->
<script src="templates/<?php echo $template; ?>/js/jquery-3.5.1.min.js" type="text/javascript" charset="utf-8"></script>
<script src="static/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="templates/<?php echo $template; ?>/js/clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="templates/<?php echo $template; ?>/js/holmes.js" type="text/javascript" charset="utf-8"></script>
<script src="templates/<?php echo $template; ?>/js/lunar.js" type="text/javascript" charset="utf-8"></script>
<script src="templates/<?php echo $template; ?>/js/common.js" type="text/javascript" charset="utf-8"></script>
<?php
if( is_login() ) {
?>
<script src="templates/<?php echo $template; ?>/js/admin.js" type="text/javascript" charset="utf-8"></script>
<?php } ?>
<!--天气代码替换处 S-->
<script type="text/javascript">
WIDGET = {
"CONFIG": {
"layout": "1",
"width": "240",
"height": "180",
"background": "1",
"dataColor": "FFFFFF",
"borderRadius": "6",
"modules": "10",
"key": "7423b182d5cb48239f19df9e25cdf320"
}
}
</script>
<script src="https://widget.qweather.net/standard/static/js/he-standard-common.js?v=2.0"></script>
<!--天气代码替换处 E-->
</body>
</html>

13
templates/baisuTwo/info.json

@ -1,13 +0,0 @@ @@ -1,13 +0,0 @@
{
"name":"百素主题2",
"description":"适用于OneNav的百素主题2",
"homepage":"https://gitee.com/baisucode/baisu-two",
"version":"1.0.2",
"update":"2022/04/29",
"author":"baisu",
"help_url":"https://dwz.ovh/gnae4",
"screenshot":"https://img.rss.ink/imgs/2022/03/cba9f1946776a8f0.png",
"config": {
"link_description":"hide"
}
}

323
templates/baisuTwo/js/admin.js

@ -1,323 +0,0 @@ @@ -1,323 +0,0 @@
layui.use(['dropdown', 'layer', 'form'], function() {
var dropdown = layui.dropdown,
layer = layui.layer,
form = layui.form,
$ = layui.jquery;
//右键菜单
dropdown.render({
elem: '.urllist',
trigger: 'contextmenu' //右键事件
,
data: [{
title: '访问',
templet: '<i class="iconfont icon-charulianjie"></i> {{d.title}}',
id: 1
}, {
title: '复制',
templet: '<div class="copybtn"><i class="iconfont icon-fuzhi"></i> {{d.title}}</div>',
id: 2
}, {
title: '编辑',
templet: '<i class="iconfont icon-bianji"></i> {{d.title}}',
id: 3
}, {
title: '删除',
templet: '<i class="iconfont icon-shanchu"></i> {{d.title}}',
id: 4
}],
click: function(data, othis) {
var elem = $(this.elem),
listId = elem.data('id');
listUrl = elem.data('url');
switch(data.id) {
case 1:
window.open('index.php?c=click&id=' + listId, '_blank');
break;
case 2:
copyUrl(listUrl);
console.log('复制' + listId);
break;
case 3:
layer.open({
type: 1,
title: false,
closeBtn: 0,
shadeClose: true,
skin: 'addsiteBox',
content: $('#editsiteBox')
});
console.log('编辑' + listId);
get_a_link(listId);
break;
case 4:
layer.confirm('一定要删除吗?', {
btn: ['删除', '取消'] //按钮
}, function() {
deleteUrl(listId)
}, function() {
layer.msg('取消删除!', {
time: 600,
});
});
console.log('删除' + listId);
break;
}
}
});
//添加链接弹窗
$('#addsite').click(function() {
layer.open({
type: 1,
title: false,
closeBtn: 0,
shadeClose: true,
skin: 'addsiteBox',
content: $('#addsiteBox')
});
});
$('.addsite-main .list.type span.fid').click(function() {
var fid = $(this).data('fid');
$('#addsiteBox input#fid').val(fid);
$('#editsiteBox input#fid').val(fid);
$(this).addClass("hover").siblings().removeClass('hover');
});
//监听提交-添加链接
form.on('submit(add_link)', function(data) {
// layer.msg(JSON.stringify(data.field));
var datas = JSON.stringify(data.field);
addUrl(data.field);
return false;
});
//监听提交-修改链接
form.on('submit(edit_link)', function(data) {
console.log(data.field)
editUrl(data.field)
return false;
});
//监听提交-添加分类
form.on('submit(add_fid)', function(data) {
console.log(data.field);
addFID(data.field)
return false;
});
//监听提交-修改分类
form.on('submit(edit_fid)', function(data) {
console.log(data.field);
editFID(data.field)
return false;
});
//识别链接信息
$("input#title").focus(function() {
var titleval = $("input#title").val();
var urlval = $("input#url").val();
if(urlval !== "" && titleval == "") {
layer.msg('链接信息识别中', {
icon: 16,
});
getUrlinfo(urlval)
}
});
//添加分类弹窗
$('#addCat').click(function() {
layer.open({
type: 1,
title: false,
closeBtn: 0,
shadeClose: true,
skin: 'addsiteBox',
content: $('#addFidBox')
});
});
// 修改分类弹窗
$('span.editFid').click(function() {
layer.open({
type: 1,
title: false,
closeBtn: 0,
shadeClose: true,
skin: 'addsiteBox',
content: $('#editFidBox')
});
var fid = $(this).data('fid');
get_a_category(fid)
console.log('编辑' + fid);
});
//查询单个链接信息
function get_a_link(id) {
$.get("index.php?c=api&method=get_a_link", {
id: id
}, function(data, status) {
// console.log(data);
if(data.code == 0) {
console.log(data);
if(data.data.property == 0) {
var property = false
} else {
var property = true
};
$('.addsite-main .list.type span.editfid-' + data.data.fid).addClass("hover").siblings().removeClass('hover');
form.val('editsite', {
"id": data.data.id,
"url": data.data.url,
"url_standby": data.data.url_standby,
"title": data.data.title,
"description": data.data.description,
"fid": data.data.fid,
"weight": data.data.weight,
"property": property,
});
} else {
//获取信息失败
layer.msg('获取信息失败,请重试!', {
icon: 5,
});
}
});
};
//查询单个分类信息
function get_a_category(id) {
$.post("/index.php?c=api&method=get_a_category", {
id: id
}, function(data, status) {
console.log(data);
if(data.code == 0) {
console.log(data);
if(data.data.property == 0) {
var property = false
} else {
var property = true
};
form.val('editfid', {
"id": data.data.id,
"name": data.data.name,
"font_icon": data.data.font_icon,
"description": data.data.description,
"weight": data.data.weight,
"property": property,
"fid":parseInt(data.data.fid)
});
} else {
//获取信息失败
layer.msg('获取信息失败,请重试!', {
icon: 5,
});
}
});
};
});
//修改链接
function editUrl(data) {
$.post("/index.php?c=api&method=edit_link", {
fid: data.fid,
id: data.id,
url: data.url,
url_standby: data.url_standby,
title: data.title,
weight: data.weight,
property: data.property,
description: data.description,
}, function(data, status) {
console.log(data)
console.log(status)
if(data.code == 0) {
layer.msg('修改成功!', {
icon: 6,
time: 600,
end: function() {
window.location.reload();
return false;
}
});
} else {
//修改失败
layer.msg('修改失败,请重试!', {
icon: 5,
});
}
});
};
//添加分类
function addFID(data) {
$.post("/index.php?c=api&method=add_category", {
name: data.name,
font_icon: data.font_icon,
weight: data.weight,
property: data.property,
description: data.description,
}, function(data, status) {
console.log(data)
console.log(status)
if(data.code == 0) {
layer.msg('添加成功!', {
icon: 6,
time: 600,
end: function() {
window.location.reload();
return false;
}
});
} else {
//修改失败
layer.msg('添加失败,请重试!', {
icon: 5,
});
}
});
}
//修改分类
function editFID(data) {
$.post("/index.php?c=api&method=edit_category", {
id: data.id,
name: data.name,
font_icon: data.font_icon,
weight: data.weight,
fid:data.fid,
property: data.property,
description: data.description,
}, function(data, status) {
console.log(data)
console.log(status)
if(data.code == 0) {
layer.msg('添加成功!', {
icon: 6,
time: 600,
end: function() {
// window.location.reload();
return false;
}
});
} else {
//修改失败
layer.msg('添加失败,请重试!', {
icon: 5,
});
}
});
}
//
// fid: data.fid,
// id: data.id,
// url: data.url,
// title: data.title,
// weight: data.weight,
// property: data.property,
// description: data.description,

7
templates/baisuTwo/js/clipboard.min.js vendored

File diff suppressed because one or more lines are too long

264
templates/baisuTwo/js/common.js

@ -1,264 +0,0 @@ @@ -1,264 +0,0 @@
var bodyH = $('.index-main').height();
var winH = $(window).height() - 100;
if(bodyH > winH) {
$('footer').addClass('show');
};
//删除链接
function deleteUrl(id) {
$.post("index.php?c=api&method=del_link", {
id: id
}, function(data, status) {
//如果删除成功,则移除元素
console.log(data)
if(data.code == 0) {
layer.msg('删除成功!', {
icon: 6,
time: 600,
});
$("#id_" + id).remove();
} else {
//删除失败
layer.msg('删除失败,请重试!', {
icon: 5,
});
}
});
};
//复制链接
function copyUrl(url) {
var clipboard = new ClipboardJS('.copybtn', {
text: function() {
return url;
}
});
clipboard.on('success', function(e) {
layer.msg('复制成功!', {
icon: 6,
time: 600,
});
e.clearSelection();
});
clipboard.on('error', function(e) {
layer.msg('复制失败!', {
icon: 5,
time: 600,
});
console.error('Action:', e.action);
console.error('Trigger:', e.trigger);
});
};
//添加链接
function addUrl(data) {
console.log(data.fid)
$.post("index.php?c=api&method=add_link", {
url: data.url,
url_standby: data.url_standby,
title: data.title,
fid: data.fid,
weight: data.weight,
property: data.property,
description: data.description,
}, function(data, status) {
console.log(data)
if(data.code == 0) {
layer.msg('添加成功!', {
icon: 6,
time: 600,
end: function() {
window.location.reload();
return false;
}
});
} else {
//添加失败
layer.msg('添加失败,请重试!', {
icon: 5,
});
}
});
}
//识别链接信息
function getUrlinfo(url) {
console.log(url);
$.post('/index.php?c=api&method=get_link_info', {
url: url
}, function(data, status) {
//如果添加成功
layer.close(layer.index);
if(data.code == 0) {
console.log(data);
if(data.data.title == null) {
layer.msg('标题获取失败,请手动输入!', {
icon: 5,
time: 1000,
});
};
$("input#title").val(data.data.title);
$("textarea#description").val(data.data.description);
} else {
layer.msg(data.err_msg, {
icon: 5,
time: 1000,
});
}
});
}
//搜索引擎切换
function searchChange() {
$(".search-change").click(function() {
$('.search-lists').toggleClass('hide');
console.log('1')
});
$(".search-lists .list").click(function() {
var souurl = $(this).data('url');
var text = $(this).html();
$('.search-btn').html(text);
$('.search-btn').attr('data-url', souurl);
$('.search-lists').addClass('hide');
console.log(souurl);
});
$(".search-btn").click(function() {
var url = $(this).attr('data-url');
var kw = $('#search').val();
if(kw !== "") {
window.open(url + kw);
} else {
layer.msg('未输入搜索框关键词!', {
time: 1000,
});
}
});
}
searchChange();
//回车键、本地搜索
function keyClick() {
$('body').keyup(function(e) {
if(e.keyCode === 13) {
var isFocus = $("#search").is(":focus");
if(true == isFocus) {
console.log(isFocus);
var url = $('.search-btn').attr('data-url');
var kw = $('#search').val();
if(kw !== "") {
window.open(url + kw);
} else {
layer.msg('未输入搜索框关键词!', {
time: 1000,
});
}
}
}
});
$("#search").focus(function(data, status) {
$('.search-lists').addClass('hide');
});
$("#search").blur(function(data, status) {
if($("#search").val() == '') {
$(".site-name").removeClass("hidden");
};
});
var h = holmes({
input: '#search',
find: '.urllist',
placeholder: '<div class="empty">未搜索到匹配结果!</div>',
mark: false,
hiddenAttr: true,
class: {
visible: 'visible',
hidden: 'hidden'
},
onFound(el) {
$(".site-name").addClass("hidden");
},
onInput(el) {
$(".site-name").addClass("hidden");
},
onVisible(el) {
$(".site-name").removeClass("hidden");
},
onEmpty(el) {
$(".site-name").removeClass("hidden");
},
});
}
keyClick();
//锚点、返回顶部
$("a.catlist").click(function() {
$("html, body").animate({
scrollTop: $($(this).attr("href")).offset().top - 5 + "px"
}, 500);
return false;
});
$('.scroll_top').click(function() {
$('html,body').animate({
scrollTop: '0px'
}, 500);
});
$(window).scroll(function() {
if($(window).scrollTop() >= 100) {
$(".scroll_top").fadeIn(1000);
} else {
$(".scroll_top").stop(true, true).fadeOut(1000);
}
});
//时间
function getNow(Mytime) {
return Mytime < 10 ? '0' + Mytime : Mytime;
}
function CurrentTime() {
var myDate = new Date();
//获取当前小时数(0-23)
var h = myDate.getHours();
//获取当前分钟数(0-59)
var m = myDate.getMinutes();
//获取当前秒数(0-59)
var s = myDate.getSeconds();
var nowTime = getNow(h) + ':' + getNow(m) + ":" + getNow(s);
$('#nowTime').text(nowTime);
setTimeout("CurrentTime()", 1000); //设定定时器,循环运行
}
CurrentTime();
var myDate = new Date();
//获取当前年份
var year = myDate.getFullYear();
//获取当前月份
var month = myDate.getMonth() + 1;
//获取当前日期
var date = myDate.getDate();
var nowDate = year + ' 年 ' + getNow(month) + " 月 " + getNow(date) + " 日";
$('#nowYmd').text(nowDate);
$('.date-main').click(function() {
window.open('https://wannianli.tianqi.com/');
});
//获取农历
var lunarD = Lunar.fromDate(myDate);
console.log(lunarD);
var lunarNowDate = lunarD.getYearInGanZhi() + '年' + lunarD.getMonthInChinese() + "月" + lunarD.getDayInChinese();
$('#nowLunar').text(lunarNowDate);
//获取星期
var nowWeek = lunarD.getWeekInChinese();
$('#nowWeek').text('星期' + nowWeek);
//手机端
$(".navbar").click(function() {
$(".m-navlist-w").slideToggle();
$(this).toggleClass("hover");
});
$(".m-navlist a.list").click(function() {
$(".m-navlist-w").slideUp();
});

1
templates/baisuTwo/js/holmes.js

File diff suppressed because one or more lines are too long

2
templates/baisuTwo/js/jquery-3.5.1.min.js vendored

File diff suppressed because one or more lines are too long

4554
templates/baisuTwo/js/lunar.js

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save