分享本站友链页源代码

应博友 Inuyasha 的请求,现分享本站友链页源代码如下。

特性

自适应浅色主题和深色主题,自适应内容区宽度,自适应电脑、平板、手机。

效果展示

iMaeGoo's Blog 
签名: 虹墨空间站
友链 A 
友链 C
签名: 只是一个示例

用法

如果是在 Hexo 中使用,请将代码放到

1
2
3
{% raw %}
......
{% endraw %}

代码块中。

特别声明

以下友链页样式代码都是我原创设计开发的,采用 MIT 协议开源,不适用于本站全局声明的 CC BY 4.0 协议,喜欢的朋友可以直接复制,无需署名。

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
<style type="text/css">
.friends {
display: flex;
align-items: stretch;
justify-content: space-between;
flex-wrap: wrap;
margin: -6px;
}
.friends .friend {
margin: 6px;
min-width: 240px;
flex: 1;
display: flex;
align-items: center;
justify-content: center;
border-radius: 10px;
border: 1px solid rgba(200, 200, 200, 0.2);
background-color: rgba(200, 200, 200, 0.1);
position: relative;
}
.friends .friend.friend-empty {
border: none;
background: none;
}
.friends .friend .friend-avatar {
flex-shrink: 0;
margin: 8px;
width: 60px;
height: 60px;
line-height: 60px;
border-radius: 30px;
background-color: rgba(200, 200, 200, 0.2);
background-size: cover;
background-position: center;
font-size: 24px;
text-align: center;
}
.friends .friend .friend-detail {
flex: 1;
width: 0;
display: flex;
flex-direction: column;
margin: 8px 8px 8px 0;
}
.friends .friend .friend-pop {
position: absolute;
width: 100%;
left: 0;
bottom: 0;
}
.friends .friend .friend-pop div {
position: absolute;
width: 100%;
top: 8px;
left: 0;
padding: 8px;
color: rgba(255, 255, 255, 0.9);
border-radius: 10px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
background-color: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
z-index: 10;
user-select: none;
pointer-events: none;
transition: opacity 0.5s;
opacity: 0;
}
.friends .friend:hover .friend-pop div {
opacity: 1;
}
</style>

<div class="friends">
<div class="friend">
<div class="friend-avatar" style="background-image: url('https://www.imaegoo.com/images/avatar.jpg')"></div>
<div class="friend-detail">
<div>iMaeGoo's Blog&nbsp;<a class="has-text-grey" target="_blank" href="https://www.imaegoo.com/atom.xml"><i class="fas fa-rss" title="支持 RSS"></i></a></div>
<div><a target="_blank" href="https://www.imaegoo.com">www.imaegoo.com</a></div>
</div>
<div class="friend-pop"><div>签名: 虹墨空间站</div></div>
</div>
<div class="friend">
<div class="friend-avatar"></div>
<div class="friend-detail">
<div>友链 A&nbsp;<a class="has-text-grey" target="_blank" href="https://example.com/feed/"><i class="fas fa-rss" title="支持 RSS"></i></a></div>
<div><a target="_blank" href="https://example.com">example.com</a></div>
</div>
</div>
<div class="friend">
<div class="friend-avatar" style="background-image: url('https://picsum.photos/200')"></div>
<div class="friend-detail">
<div>友链 C</div>
<div><a target="_blank" href="https://example.com">example.com</a></div>
</div>
<div class="friend-pop"><div>签名: 只是一个示例</div></div>
</div>
<div class="friend friend-empty"></div>
<div class="friend friend-empty"></div>
<div class="friend friend-empty"></div>
</div>
作者

iMaeGoo

发布于

2023-10-21

更新于

2023-10-22

许可协议

CC BY 4.0

评论