This repository has been archived by the owner on Aug 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpage-link.php
76 lines (59 loc) · 3.28 KB
/
page-link.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php
/**
* 友情链接
*
* @package custom
*/
$this->need('header.php');
?>
<!-- 链接格式
// 友情链接:
<ul id="flinks">
<li>一元-ONESRC</li>
<li>https://www.onesrc.cn/</li>
<li>https://cdn.onesrc.cn/uploads/images/favicon.png</li>
<li>onesrc.cn</li>
<li>Baidu</li>
<li>https://www.baidu.com/</li>
<li>https://www.baidu.com/favicon.ico</li>
<li>baidu.com</li>
</ul>
// 其他内容
-->
<div class="post-container">
<div class="post-detail gt-bg-theme-color-second">
<article class="gt-post-content">
<h2 class="post-title"><?php $this->title(); ?></h2>
<div class="post-info">
<time class="post-time gt-c-content-color-first">
发布于 · <?php $this->date(); ?> ·
</time>
<?php _e('# '); ?>
<?php $this->category(' # ', true, 'none'); ?>
<?php if (count($this->tags) > 0): ?>
<?php _e('# '); ?>
<?php $this->tags(' # ', true, 'none'); ?>
<?php endif; ?>
</div>
<div class="post-content">
<?php parseContent($this); ?>
</div>
</article>
</div>
<div class="post-detail pl" id="plsx">
<?php $this->need('comments.php'); ?>
</div>
</div>
<style type="text/javascript">
.friend-box img { width:70px; height:70px; border-radius:50%!important; float:left; margin:0 15px 0 0!important; } .jz a { pointer-events:none; }
</style>
<script type="text/javascript">
(function(){let a=document.getElementById("flinks");if(a){let ns=a.querySelectorAll("li");let nsl=ns.length;let str='';let bgid=0;const bgs=["bg-white","bg-grey","bg-deepgrey","bg-blue","bg-purple","bg-green","bg-yellow","bg-red","bg-orange"];for(let i=0;i<=nsl-4;i+=4){bgid=Math.floor(Math.random()*9);str+=(`<div class="friend-box"><div class="jz"><img src="${ns[i+2].innerText}"></div><div class="flink-info"><a class="gt-c-content-color-first"href="${ns[i+1].innerText}"target="_blank">${ns[i].innerText}</a><br><div class="flink-info-desc gt-c-content-color-first">${ns[i+3].innerText}</div></div></div>`);}
str+='</div></div>';let n1=document.createElement("div");n1.innerHTML=str;a.parentNode.insertBefore(n1,a);a.style="display: none;";}else{console.log('No such id "flinksH"');}}())
</script>
<script type="text/javascript">
(function(){let a=document.getElementById("flinks1");if(a){let ns=a.querySelectorAll("li");let nsl=ns.length;let str='';let bgid=0;const bgs=["bg-white","bg-grey","bg-deepgrey","bg-blue","bg-purple","bg-green","bg-yellow","bg-red","bg-orange"];for(let i=0;i<=nsl-4;i+=4){bgid=Math.floor(Math.random()*9);str+=(`<div class="friend-box"><div class="jz"><img src="${ns[i+2].innerText}"></div><div class="flink-info"><a class="gt-c-content-color-first"href="${ns[i+1].innerText}"target="_blank">${ns[i].innerText}</a><br><div class="flink-info-desc gt-c-content-color-first">${ns[i+3].innerText}</div></div></div>`);}
str+='</div></div>';let n1=document.createElement("div");n1.innerHTML=str;a.parentNode.insertBefore(n1,a);a.style="display: none;";}else{console.log('No such id "flinksH"');}}())
</script>
<?php $this->need('footer.php'); ?>