Browse Source

部署修改

layui
mail_yanpeng@163.com 6 years ago
parent
commit
9dd559a575
  1. 4
      controllers/BlogController.go
  2. 4
      static/css/blog.css
  3. 1
      static/css/common.css
  4. 6
      views/blog.html

4
controllers/BlogController.go

@ -177,8 +177,8 @@ func (this *BlogController) BlogsPage() {
if num <= 0 { if num <= 0 {
num = 1 num = 1
} }
if size < 5 { if size < 15 {
size = 5 size = 15
} }
if cat <= 0 { if cat <= 0 {
cat = -1 cat = -1

4
static/css/blog.css

@ -15,12 +15,12 @@
position: fixed; position: fixed;
top: 60px; top: 60px;
left: 20px; left: 20px;
width: 260px; width: 300px;
height: 100%; height: 100%;
background-color: #f9f9f9; background-color: #f9f9f9;
} }
.comms-root{ .comms-root{
margin: 50px 10% 0 300px; margin: 50px 10% 0 350px;
} }
.comms-root a{ .comms-root a{

1
static/css/common.css

@ -1,4 +1,5 @@
body { body {
font-size: 14px !important;
background: #f5f7f9; background: #f5f7f9;
} }

6
views/blog.html

@ -14,7 +14,7 @@
</div> </div>
<hr style="height:1px;border:none;border-top:1px solid #EEE;margin: 6px;"/> <hr style="height:1px;border:none;border-top:1px solid #EEE;margin: 6px;"/>
<div style="display: flex;height: 30px;line-height: 30px;"> <div style="display: flex;height: 30px;line-height: 30px;">
<div style="display: inline-block;width: 100px"> <div style="display: inline-block;width: 120px">
<span>文章: </span> <span>文章: </span>
<span>{{.Blog.User.BlogCount}}</span> <span>{{.Blog.User.BlogCount}}</span>
</div> </div>
@ -24,7 +24,7 @@
</div> </div>
</div> </div>
<div style="display: flex;height: 30px;line-height: 30px;"> <div style="display: flex;height: 30px;line-height: 30px;">
<div style="display: inline-block;width: 100px"> <div style="display: inline-block;width: 120px">
<span>评论: </span> <span>评论: </span>
<span>{{.Blog.User.BlogComment}}</span> <span>{{.Blog.User.BlogComment}}</span>
</div> </div>
@ -38,7 +38,7 @@
{{range .Top}} {{range .Top}}
<div> <div>
<a href="/blog/{{.Id}}"><p <a href="/blog/{{.Id}}"><p
style="max-width:245px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{.Title}}</p> style="max-width:290px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{.Title}}</p>
</a> </a>
</div> </div>
{{end}} {{end}}

Loading…
Cancel
Save