refactor(static): 首页内联样式解耦至 css/index.css
- 新增页面级样式文件 css/index.css(与 view.css/aibox.css 惯例一致) - index.html 移除内联 <style> 块与头像内联样式,改为外链 - 头像圆角 100px 优化为 border-radius: 50%
This commit is contained in:
1 parent
1a5e9f7064
commit
de0e4168b2
2 files changed
+40
-29
No files matched your search
@@ -0,0 +1,38 @@
|
||||
/* index.css — 社区首页专属样式(通用主题见 theme.css) */
|
||||
|
||||
body {
|
||||
align-items: normal;
|
||||
}
|
||||
|
||||
/* ===== 头部 ===== */
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.right-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.right-group > img,
|
||||
.right-group > b,
|
||||
.right-group > button {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#avatar {
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/* ===== 网站简介 ===== */
|
||||
.site-intro {
|
||||
max-width: 640px;
|
||||
margin: 0 auto;
|
||||
font-size: 0.95rem;
|
||||
line-height: 1.9;
|
||||
color: var(--fg-secondary);
|
||||
}
|
||||
@@ -4,41 +4,14 @@
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="css/theme.css">
|
||||
<style>
|
||||
body {
|
||||
align-items: normal;
|
||||
}
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
.right-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.right-group > img,
|
||||
.right-group > b,
|
||||
.right-group > button {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.site-intro {
|
||||
max-width: 640px;
|
||||
margin: 0 auto;
|
||||
font-size: 0.95rem;
|
||||
line-height: 1.9;
|
||||
color: var(--fg-secondary);
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="css/index.css">
|
||||
<title>DNFS 欢迎来到树状笔记</title>
|
||||
</head>
|
||||
<body>
|
||||
<header class="header">
|
||||
<h1 onclick="window.location.href='index.html'">DNFS 树状笔记</h1>
|
||||
<div class="right-group">
|
||||
<img src="favicon.ico" alt="头像加载失败" id="avatar" width="70px" height="70px" style="border-radius: 100px;">
|
||||
<img src="favicon.ico" alt="头像加载失败" id="avatar" width="70px" height="70px">
|
||||
<b id="name">DNFS</b>
|
||||
<button id="enterBtn" onclick="window.location.href='dnfs.html'" style="display:none">进入笔记</button>
|
||||
<button id="logoutBtn" style="display:none">退出</button>
|
||||
|
||||
Reference in new issue
Block a user