Skip to content

Commit 5d2ff59

Browse files
update styles
1 parent dcaf967 commit 5d2ff59

5 files changed

Lines changed: 61 additions & 24 deletions

File tree

assets/css/styles.css

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/* body {
2-
margin: 0;
3-
padding: 0;
4-
overflow: auto;
5-
} */
6-
/* 动态背景 */
71
@keyframes pearl-shimmer {
82
0% {
93
background-position: 0% 50%;
@@ -38,7 +32,6 @@ html {
3832
}
3933

4034
.welcome-page {
41-
position: relative;
4235
width: 100%;
4336
height: 100vh;
4437
color: #391d45;
@@ -49,10 +42,6 @@ html {
4942
padding-top: 30%;
5043
}
5144

52-
.title {
53-
font-size: 48px;
54-
}
55-
5645
.quote {
5746
font-size: 8vw;
5847
position: absolute;
@@ -78,6 +67,35 @@ html {
7867
background-color: #f2e3f6;
7968
}
8069

70+
#quotepad {
71+
min-height: 100vh;
72+
width: 50vw;
73+
border-radius: 5vh;
74+
display: flex;
75+
justify-content: center;
76+
align-items: center;
77+
flex-direction: column;
78+
padding: 10vh;
79+
margin: 20vh auto;
80+
background-color: rgba(247, 244, 251, 0.9);
81+
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
82+
}
83+
84+
#footer {
85+
height: 20vh;
86+
width: 100vw;
87+
background-color: #c4c4c4bd;
88+
display: flex;
89+
flex-direction: column;
90+
align-items: center;
91+
padding: auto;
92+
}
93+
94+
h2 {
95+
color: #8a297f;
96+
font-size: 4vh;
97+
}
98+
8199
.quotes-content {
82100
flex-grow: 1;
83101
display: flex;
@@ -100,6 +118,7 @@ html {
100118
#quote-list {
101119
list-style: none;
102120
padding: 0;
121+
font-size: 3vh;
103122
}
104123

105124
#back-to-top {
@@ -136,6 +155,12 @@ html {
136155
bottom: 20px;
137156
}
138157

158+
.ma-shan-zheng-regular {
159+
font-family: "Ma Shan Zheng", cursive;
160+
font-weight: 400;
161+
font-style: normal;
162+
}
163+
139164
#navbar {
140165
position: fixed;
141166
top: 0;
@@ -144,23 +169,26 @@ html {
144169
height: 12.5vh;
145170
opacity: 0;
146171
pointer-events: none;
147-
transition: opacity 0.5s;
148-
background-color: #d6d6d695;
172+
transition: opacity 0.8s, background-color 0.4s;
173+
background-color: rgba(225, 225, 225, 0.2);
149174
display: flex;
150175
align-items: center;
151176
padding: 0 20px;
152177
box-sizing: border-box;
153178
z-index: 1;
154179
border-bottom-right-radius: 10px;
155180
border-bottom-left-radius: 10px;
156-
/* filter: blur(5px); */
181+
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
157182
backdrop-filter: blur(5px);
158183
}
159184

160185
#navbar.show {
161186
opacity: 1;
162187
pointer-events: auto;
163-
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
188+
}
189+
190+
#navbar:hover {
191+
background-color: rgba(255, 255, 255, 0.8);
164192
}
165193

166194
.logo {
@@ -174,10 +202,8 @@ html {
174202
transition: background-color 0.3s;
175203
}
176204

177-
/* Dropdown styles */
178205
.dropdown {
179206
margin-left: auto;
180-
/* 推向右端 */
181207
}
182208

183209
.dropdown-btn {

assets/html/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ <h2>关于田语</h2>
108108
<p>《田语》者,今世思想家、教育家田氏之门人,录其言行而辑成之语录也。辑于二〇二三年,具体日期未详。以语录体为主,集中显现田氏及其学派之教育主张、伦理思想、道德观念、生活态度等。然《田语》之编著,曾遭严酷压制,故编撰转入地下。《田语》不独为田氏之象征,亦乃一班级、一时代之象征,实为田学之瑰宝焉。</p>
109109
</div>
110110
<div class="timer" id="timer"></div>
111-
联系我c09264@outlook.com
111+
联系我: c09264@outlook.com
112112
</div>
113113
<script type="text/javascript" src="../js/about.js"></script>
114114
</body>

assets/js/about.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ function updateTimer() {
66
const hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
77
const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
88
const seconds = Math.floor((diff % (1000 * 60)) / 1000);
9-
document.getElementById('timer').innerHTML = `网站运行 ${days}${hours} 小时 ${minutes}${seconds} 秒`;
9+
document.getElementById('timer').innerHTML = `网站已运行 ${days}${hours} 小时 ${minutes}${seconds} 秒`;
1010
}
1111
setInterval(updateTimer, 1000);

assets/js/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fetch("assets/quotes.txt")
5151
console.error('There was a problem with the fetch operation:', error);
5252
});
5353

54-
// 定时切换田语(每隔3秒)
54+
5555
setInterval(showRandomQuote, 4000);
5656

5757

index.html

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
<meta http-equiv="Content-Language" content="zh-CN">
1313
<link rel="icon" href="./assets/images/favicon.svg" type="image/svg+xml">
1414
<link rel="stylesheet" type="text/css" href="./assets/css/styles.css">
15+
<link rel="preconnect" href="https://fonts.googleapis.com">
16+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
17+
<link href="https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&display=swap" rel="stylesheet">
1518
</head>
1619

1720
<body>
@@ -26,12 +29,20 @@
2629
</div>
2730
</div>
2831
<div class="welcome-page">
29-
<p class="quote" id="quote">田语</p>
32+
<p class="quote ma-shan-zheng-regular" id="quote">田语</p>
3033
</div>
31-
<div class="quotes">
34+
<div id="quotepad">
3235
<h2>所有田语</h2>
33-
<ul id="quote-list">
34-
</ul>
36+
<ol id="quote-list">
37+
</ol>
38+
</div>
39+
<div id="footer">
40+
<p>
41+
powered by <a href="https://github.com/Developer09264">c09264</a>
42+
</p>
43+
<p>
44+
contact me: c09264@outlook.com
45+
</p>
3546
</div>
3647
<button id="back-to-top"></button>
3748
<script src="./assets/js/script.js"></script>

0 commit comments

Comments
 (0)