forked from dingzd1995/typecho-theme-waxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
page_ friends_mini.php
102 lines (92 loc) · 2.8 KB
/
page_ friends_mini.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 友情链接(32x32小图,转换带图片链接的无序列表)
*
* @package custom
*/
?>
<?php
function getFriendsHtml($content) {
$options = Typecho_Widget::widget('Widget_Options');
if ($options->shortcode) {
$content = do_shortcode($content);
}
$pattern = '/\<img.*?src\=\"(.*?)\".*?alt\=\"(.*?)\".*?title\=\"(.*?)\"[^>]*>/i';
$replacement = '<img src="$1" alt="$2" title="$3"><span>$3<span>';
if ($options->picHtmlPrint&&$options->JQlazyload) {
$replacement = '<img class="lazyload" src="'.$options->JQlazyload_gif.'" data-original="$1" alt="$2" title="$3"><span>$3<span>';
}
$content = preg_replace($pattern, $replacement, $content);
return $content;
}
?>
<?php $this->need('header.php'); ?>
<style type="text/css">
.post-head {
border-bottom: 1px solid #ebebeb;
}
.post-head h2{
margin: 0 0 5px 0;
font-size: 1.6em;
text-align: left;
}
.post-content ul {
list-style: none;
margin: 0 auto;
padding: 0;
text-align: center;
}
.post-content ul li{
transition: all .2s ease 0s;
display: inline-block;
text-align: center;
border-radius: 10px;
border: 1px solid #DEDEDC;
margin: 10px;
}
.post-content ul li img{
margin: 3px 5px;
width: 32px;
height: 32px;
/*border-radius: 90px;*/
/*transition: all .5s;*/
}
.post-content ul li span{
color: #AAA;
font-size: 12px;
margin: 10px;
}
.post-content ul li:hover{
box-shadow: rgba(0,0,0,.2) 0 1px 3px,rgba(157,182,200,.1) 0 1px 20px;
}
.post-content ul li:hover img{
/*transform: rotate(360deg);*/
}
.post-content ul li a{
}
.post-content ul li a:hover{
text-decoration: none;
}
</style>
<section class="content-wrap">
<div class="container">
<div class="row">
<main class="col-md-8 main-content">
<article id="<?php $this->cid() ?>" class="post">
<header class="post-head">
<h2>友情链接</h2>
<div style="text-align: left;color: #BDBDBD;">有朋自远方来,不亦乐乎?</div>
</header>
<section class="post-content">
<?php echo getFriendsHtml($this->content);?>
</section>
</article>
<div class="about-author clearfix">
<?php $this->need('comments.php'); ?>
</div>
</main>
<?php $this->need('sidebar.php'); ?>
</div class="row">
</div class="container">
</section>
<?php $this->need('footer.php'); ?>