-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsomelink.html
More file actions
375 lines (338 loc) · 9.11 KB
/
somelink.html
File metadata and controls
375 lines (338 loc) · 9.11 KB
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>一些链接 - yangyang3917的网页</title>
<!--引入外部css-->
<link rel="stylesheet" href="css/background.css">
<link rel="stylesheet" href="css/notifications.css">
<link rel="stylesheet" href="css/jianbianwenben.css">
<style>
/* ===== 全局样式 ===== */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary-color: #4361ee;
--secondary-color: #3a0ca3;
--accent-color: #4cc9f0;
--text-color: #2b2d42;
--card-bg: #ffffff;
--border-radius: 12px;
--box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
--transition: all 0.3s ease;
}
body {
color: var(--text-color);
line-height: 1.6;
padding-bottom: 60px;
}
.container {
width: 100%;
max-width: 1400px;
margin: 0 auto;
padding: 20px;
}
.search-container {
display: flex;
gap: 10px;
margin-top: 15px;
width: 100%;
}
.search-container input {
flex: 1;
padding: 12px 20px;
border-radius: 50px;
border: none;
font-size: 1rem;
box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}
.search-container button {
background-color: var(--accent-color);
color: white;
border: none;
padding: 12px 25px;
border-radius: 50px;
cursor: pointer;
font-weight: 6000;
transition: var(--transition);
font-size: 20px;
}
.search-container button:hover {
background-color: #3db7da;
transform: translateY(-2px);
}
/* ===== 网格容器样式 ===== */
.grid-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
margin-top: 20px;
}
/* ===== 卡片样式 ===== */
.card {
background-color: var(--card-bg);
border-radius: var(--border-radius);
box-shadow: var(--box-shadow);
overflow: hidden;
transition: var(--transition);
display: flex;
flex-direction: column;
height: 100%;
}
.card:hover {
transform: translateY(-10px);
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}
.card-top {
padding: 20px 20px 10px;
position: relative;
}
.card-noborder {
padding: 0px 0px 0px;
position: relative;
}
.card-icon {
position: absolute;
top: 5px;
left: 20px;
width: 70px;
height: 70px;
border-radius: 60%;/*修改过,原来值:50%*/
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
border: 3px solid white;
background-image: var(--card-icon); /* 使用CSS变量指定具体图片 */
background-size: 100%; /* 控制图标大小 */
background-position: center; /* 居中图标 */
background-repeat: no-repeat; /* 防止平铺 */
}
.card-body {
padding: 50px 20px 20px;
flex-grow: 1;
cursor: pointer;
}
.card-title {
font-size: 1.4rem;
margin-bottom: 12px;
color: var(--text-color);
font-weight: 600;
}
.card-description {
color: #666;
font-size: 0.95rem;
line-height: 1.7;
}
.card-footer {
padding: 0 20px 20px;
}
.card-btn {
display: block;
width: 100%;
padding: 12px 20px;
background-color: var(--primary-color);
color: white;
border: none;
border-radius: 8px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: var(--transition);
text-align: center;
text-decoration: none;
}
.card-btn:hover {
background-color: var(--secondary-color);
}
/* ===== 详情页面样式 ===== */
.detail-container {
background-color: white;
border-radius: var(--border-radius);
box-shadow: var(--box-shadow);
padding: 40px;
margin-top: 30px;
display: none;
}
.detail-header {
display: flex;
align-items: center;
margin-bottom: 30px;
}
.detail-icon {
width: 100px;
height: 100px;
border-radius: 50%;
margin-right: 20px;
background-size: cover;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
font-size: 2.5rem;
color: white;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.detail-title {
font-size: 2.5rem;
color: #000000;
font-weight: 700;
}
.detail-content {
line-height: 1.8;
}
.detail-content p {
margin-bottom: 25px;
font-size: 1.1rem;
}
.back-btn {
display: inline-block;
padding: 12px 30px;
background-color: var(--accent-color);
color: white;
border: none;
border-radius: 8px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: var(--transition);
text-decoration: none;
margin-top: 20px;
}
.back-btn:hover {
background-color: #3db7da;
transform: translateY(-2px);
}
.detail-buttons {
display: flex;
gap: 15px;
margin-top: 20px;
}
.detail-buttons .back-btn {
flex: 1;
text-align: center;
}
/* ===== 响应式布局 ===== */
@media (max-width: 768px) {
.header-content {
flex-direction: column;
text-align: center;
gap: 20px;
}
.logo {
justify-content: center;
}
.card {
max-width: 100%;
}
.detail-header {
flex-direction: column;
text-align: center;
}
.detail-icon {
margin-right: 0;
margin-bottom: 20px;
}
}
/* ===== 动画效果 ===== */
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.card {
animation: fadeIn 0.5s ease-out;
}
</style>
</head>
<body>
<!-- 头部导航 -->
<p>
<span onclick="notification_ClickTitle()" class="jianbianwenben" style="--color-start: #6200ff; --color-end: #0099ff; --font-size: 45px; --font-weight: bold;">欢迎来到yangyang3917的网页</span>
</p>
<span style="color: #ff0000;font-size: 30px">当前位置:一些链接(<a href="somelink.html">somelink.html</a>)</span>
<a href="somelink_old.html" style="color: #0404A3;font-size: 25px">旧版(点击跳转)</a>
<br>
<p style="color:#FFCC01;font-size:15px">
提示:点击卡片可以查看详细介绍
</p>
<div class="container">
<div class="search-container">
<input type="text" id="searchInput" placeholder="搜索网站名称或关键词...">
<button id="searchButton">搜索</button>
</div>
</div>
<!-- 主内容区域 -->
<main class="container">
<!-- 网站卡片区域 -->
<div id="websitesContainer" class="grid-container"></div>
<!-- 网站详情页面 -->
<div id="detailContainer" class="detail-container">
<div class="detail-header">
<div class="detail-icon" id="detailIcon"></div>
<h2 class="detail-title" id="detailTitle"></h2>
</div>
<div class="detail-content" id="detailContent">
<!-- 详情内容将通过JavaScript填充 -->
</div>
<div class="detail-buttons">
<button id="backButton" class="back-btn">返回上一页</button>
<a id="visitButton" href="#" target="_blank" class="back-btn">访问网站</a>
</div>
</div>
</main>
<p><a href="https://github.com/yangyang3917/yangyang3917.github.io" target="_blank" style="color: #ffff01;font-size:25px">查看源码(点击打开)</a></p>
<p><a href="index.html" style="color: #8400ff;font-size:25px" >返回上一页(点击)</a></p>
<p style="color: #ffffff; font-size: 15px;">powered by <a href="https://docs.github.com/pages" target="_blank"">GitHub Pages</a></p>
<!--通知系统-->
<script type="module">
import NotificationManager from './js/notificationManager.js';
window.notification_ClickTitle = () => {
NotificationManager.getInstance().add(
'info',
'提醒',
'你闲的没事点标题干啥……',
{ // 自定义参数
enterDuration: 300, // 进入动画时间
exitDuration: 300, // 退出动画时间
displayDuration: 2000 // 显示时间
}
);
};
// 页面加载完成后立即触发
// window.addEventListener('DOMContentLoaded', () => {
// NotificationManager.getInstance().add(
// 'success',
// '喜报',
// '本界面已重新布局,新的布局更加美观,也更加实用',
// {
// enterDuration: 300,
// exitDuration: 500,
// displayDuration: 5000
// }
// );
// });
window.notification_ClickSmallText = () => {
NotificationManager.getInstance().add(
'info',
'小字:',
'你居然发现我了:)',
{ // 自定义参数
enterDuration: 300, // 进入动画时间
exitDuration: 300, // 退出动画时间
displayDuration: 3000 // 显示时间
}
);
}
</script>
<!-- 引用外部 JS数据-->
<script src="js/somelink-data.js"></script>
<!-- 外部JavaScript -->
<script src="js/somelink-card.js"></script>
<!-- 引用外部 JS(defer 保证 DOM 加载后执行) -->
<script src="js/background.js" defer></script>
</body>
</html>