-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
92 lines (69 loc) · 2.55 KB
/
index.html
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
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/svg+xml" href="./asset/img/logo.svg" />
<title><%- config.title %></title>
<link rel="stylesheet" href="./src/style.css" />
</head>
<body class="user-select-none">
<header>
<h1 class="glass-plate"> <img src="./asset/img/logo.svg" class="inline-icon" alt="logo" /> <%- config.title %> </h1>
<% if(config.nav) { // 导航 %>
<nav class="glass-plate">
<% for(const nav of config.nav) { %>
<a href="<%- nav.url %>" class="link"><%- nav.name %></a>
<% } %>
</nav>
<% } %>
<% if(config.search) { // 搜索 %>
<form id="search" class="glass-plate" action="<%= config.search.action %>" method="get">
<input type="text" name="<%= config.search.query %>" placeholder="<%= config.search.placeholder %>"/>
</form>
<% } %>
<% // 公告或副标题 %>
<% config.notices.forEach(({content}) => {%>
<%- content %>
<% }) %>
</header>
<main class="glass-plate center-container">
<% config.groups.forEach(({name, sites}) => { // 分组 %>
<h2 class="group-title"> <%- name %> </h2>
<div class="site-list">
<% sites.forEach(({name, url, description}) => { // 网站 %>
<% const cardType = description ? 'large' : 'small' %>
<a href="<%= url %>" class="no-style site-card-<%= cardType %>-a">
<% if(cardType=='large') {%>
<div class="site-card-large">
<h3><span class="link"><%- name %></span></h3>
<p><%- description %> </p>
</div>
<% } %>
<% if(cardType=='small') {%>
<div class="site-card-small center-container">
<h3><span class="link"><%- name %></span></h3>
</div>
<% } %>
</a>
<% }) %>
</div>
<% }) %>
</main>
<footer>
<% config.footers.forEach(({content}) => {%>
<div class="glass-plate center-container">
<%- content %>
</div>
<% }) %>
</footer>
<% if(config.particles.enabled){ // 粒子系统 %>
<div id="particle-container">
<% for(i=0;i<30;i++) { %>
<div class="particle"></div>
<% } %>
</div>
<link href="././src/particle.scss" rel="stylesheet" />
<% } %>
</body>
</html>