码农笔录博客源码
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

88 rindas
3.8 KiB

pirms 6 gadiem
{{template "header"}}
pirms 6 gadiem
<title>首页 - 个人随笔</title>
<link type="text/css" rel="styleSheet" href="/static/css/index.css"/>
pirms 6 gadiem
</head>
<body>
<div class="root-container">
pirms 6 gadiem
{{template "nav" .}}
<div class="home-container">
<div class="home-hearder">
<div style="flex: 1">
pirms 6 gadiem
<span>
<select class="form-control input-lg" style="width: 150px;display: inline-block;height: 32px">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</span>
pirms 6 gadiem
<div class="btn-group" role="group" style="display: inline-block;margin-top: -3px">
<button type="button" class="btn btn-default btn-xl">最新</button>
<button type="button" class="btn btn-default btn-xl">最热</button>
</div>
</div>
pirms 6 gadiem
<button type="button" onclick="window.open('/blog/new')" class="btn btn-danger" style="border-radius: 12px">
写文章
</button>
</div>
<div>
<div class="home-content" style="min-height: 40px;line-height: 40px;color: #888">
<div class="home-content-title cursor" style="font-size: 14px">
文章标题
</div>
<div style="display: inline-block;width: 260px">
<div class="home-content-desc">
<span style="width: 60px;font-size: 14px">类型</span>
<span style="width: 60px"> 用户</span>
<span style="width: 60px;font-size: 14px">浏览量</span>
<span style="flex: 1;font-size: 14px">日期</span>
</div>
</div>
</div>
<hr style="height:1px;border:none;border-top:1px solid lightgray;"/>
</div>
pirms 6 gadiem
{{range .Page.List}}
<div>
<div class="home-content">
<div class="home-content-title cursor">
pirms 6 gadiem
<a href="/blog/{{.Id}}" target="_blank">{{.Title}}</a>
</div>
<div style="display: inline-block;width: 260px">
<div class="home-content-desc">
<span style="width: 60px;font-size: 14px">{{.CateName}}</span>
<span style="width: 60px" class="cursor">{{.UserName}}</span>
pirms 6 gadiem
<span style="width: 60px;font-size: 14px">{{.Browses}}</span>
<span style="flex: 1;font-size: 14px">{{.Ctime.Format "2006-01-02"}}</span>
</div>
</div>
</div>
<hr style="height:1px;border:none;border-top:1px solid #EEE;"/>
</div>
pirms 6 gadiem
{{end}}
pirms 6 gadiem
pirms 6 gadiem
<div style="text-align: center">
<nav>
<div class="pagination pagination-lg">
<ul>
pirms 6 gadiem
{{if .Page.FirstPage}}
{{else}}
pirms 6 gadiem
<li class="prev">
pirms 6 gadiem
<a href="/blogs?num={{ .Page.PageNo | NAdd -1}}&flag={{.Flag}}&cat={{.Cat}}">&laquo;</a>
pirms 6 gadiem
</li>
pirms 6 gadiem
{{end}}
<li class="active"><a href="javascript:void(0)">{{.Page.PageNo}}</a></li>
{{if .Page.LastPage}}
{{else}}
pirms 6 gadiem
<li class="next">
pirms 6 gadiem
<a href="/blogs?num={{ .Page.PageNo | NAdd +1}}&flag={{.Flag}}&cat={{.Cat}}">&raquo;</a>
pirms 6 gadiem
</li>
pirms 6 gadiem
{{end}}
pirms 6 gadiem
</ul>
</div>
</nav>
pirms 6 gadiem
</div>
pirms 6 gadiem
</div>
</div>
pirms 6 gadiem
</body>
pirms 6 gadiem
</html>