整理了css文件,去除了无用部分和重复部分
This commit is contained in:
1 parent
82bdc57713
commit
01153d96a8
2 files changed
+69
-90
No files matched your search
+62
-86
@@ -4,9 +4,9 @@
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
/* 导航栏以及body样式 */
|
||||
|
||||
body {
|
||||
font-family: 'CustomFont',Arial, sans-serif;
|
||||
font-family: 'CustomFont', Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
@@ -20,7 +20,7 @@ header {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
z-index: 1000; /* 确保导航栏在最上层 */
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
header nav ul {
|
||||
@@ -40,17 +40,25 @@ header nav ul li a {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
header nav ul li.logo {
|
||||
margin-right: auto; /* 将图标推到左边 */
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
header nav ul li.logo img {
|
||||
height: 40px; /* 根据需要调整图标的高度 */
|
||||
}
|
||||
main {
|
||||
padding: 80px 20px 20px; /* 调整padding以确保内容不被固定导航栏遮挡 */
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.post-header {
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
align-items: center;
|
||||
margin-bottom: 10px; /* 控制标题和内容之间的距离 */
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 80px 20px 20px;
|
||||
}
|
||||
|
||||
form {
|
||||
max-width: 400px;
|
||||
@@ -88,8 +96,13 @@ button.sign {
|
||||
button.sign:hover {
|
||||
background-color: #555;
|
||||
}
|
||||
|
||||
#content-list {
|
||||
margin-top: 20px;
|
||||
margin-top: 20px;
|
||||
margin-left: 270px;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
width: calc(100% - 270px);
|
||||
}
|
||||
|
||||
.content-item {
|
||||
@@ -97,21 +110,44 @@ button.sign:hover {
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
background-color: #f9f9f9;
|
||||
display: flex;
|
||||
flex-direction: column; /* 确保内容按列排列 */
|
||||
}
|
||||
|
||||
.content-item strong {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
font-weight: bold;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.content-item p {
|
||||
margin: 0;
|
||||
flex-grow: 1;
|
||||
white-space: pre-wrap; /* 保留换行和空白 */
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.content-item small {
|
||||
margin-left: 10px;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.delete-form {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.delete-button {
|
||||
background-color: #e74c3c;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
padding: 5px 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.delete-button:hover {
|
||||
background-color: #c0392b;
|
||||
}
|
||||
|
||||
/* Footer 样式 */
|
||||
.footer-container {
|
||||
background-color: #333;
|
||||
color: white;
|
||||
@@ -134,9 +170,8 @@ button.sign:hover {
|
||||
.footer-item a:hover {
|
||||
color: #ddd;
|
||||
}
|
||||
/* Dashboard 样式 */
|
||||
|
||||
.dashboard {
|
||||
|
||||
max-width: 150%;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
@@ -149,10 +184,12 @@ button.sign:hover {
|
||||
text-align: left;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
#content{
|
||||
|
||||
#content {
|
||||
height: auto;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.form-box {
|
||||
width: 600px;
|
||||
background-color: white;
|
||||
@@ -187,51 +224,6 @@ button.sign:hover {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 用户界面样式 */
|
||||
/* user.html */
|
||||
/* 内容列表样式 */
|
||||
#content-list {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.content-item {
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
background-color: #f9f9f9;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.content-item p {
|
||||
margin: 0;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.content-item small {
|
||||
margin-left: 10px;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.delete-form {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.delete-button {
|
||||
background-color: #e74c3c;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
padding: 5px 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.delete-button:hover {
|
||||
background-color: #c0392b;
|
||||
}
|
||||
|
||||
/* 用户界面样式 */
|
||||
.user-profile {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
@@ -257,14 +249,6 @@ button.sign:hover {
|
||||
.user-posts {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.user-posts .content-item {
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
background-color: #f9f9f9;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.logout-button {
|
||||
display: block;
|
||||
@@ -282,11 +266,11 @@ button.sign:hover {
|
||||
background-color: #555;
|
||||
}
|
||||
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
}
|
||||
.container h1{
|
||||
|
||||
.container h1 {
|
||||
margin-top: 50px;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
@@ -301,22 +285,16 @@ button.sign:hover {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
#content-list {
|
||||
margin-left: 270px; /* 确保内容不会被侧边栏覆盖 */
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
width: calc(100% - 270px);
|
||||
}
|
||||
.sidebar ul li a{
|
||||
.sidebar ul li a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.sidebar ul li {
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
margin-bottom: 10px; /* 增加底部间距 */
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* 视频播放器样式 */
|
||||
video {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
@@ -345,9 +323,7 @@ video {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
|
||||
/* 图片轮播样式 */
|
||||
.picturecontainer{
|
||||
.picturecontainer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
@@ -356,13 +332,13 @@ video {
|
||||
text-align: center;
|
||||
width: 30%;
|
||||
max-width: 400px;
|
||||
margin-left: 150px; /* 新添加的间距 */
|
||||
/* background-color: #ddd; */
|
||||
|
||||
margin-left: 150px;
|
||||
}
|
||||
.text-content p{
|
||||
|
||||
.text-content p {
|
||||
font-size: xx-large;
|
||||
}
|
||||
|
||||
.carousel {
|
||||
position: relative;
|
||||
width: 80%;
|
||||
|
||||
@@ -52,12 +52,15 @@
|
||||
</div>
|
||||
<h1 style="text-align: center;"><u><i>blog</i></u></h1>
|
||||
{% for post in posts %}
|
||||
<div class="content-item">
|
||||
<strong>{{ post.username }} </strong>
|
||||
<p>{{ post.content }}</p>
|
||||
<div class="content-item">
|
||||
<div class="post-header">
|
||||
<strong>{{ post.username }}</strong>
|
||||
<small>Posted on: {{ post.created_at }}</small>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<p>{{ post.content }}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in new issue
Block a user