模板还不行,需要改变。
This commit is contained in:
@@ -1,54 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ .Title}}</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<style type="text/css">
|
||||
body{
|
||||
background: #f8f8f8;
|
||||
}
|
||||
.layui-main {
|
||||
width: 1140px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.container {
|
||||
width: 1170px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.header .layui-nav {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
padding: 0;
|
||||
background: none;
|
||||
}
|
||||
.post-list {
|
||||
width: 75%;
|
||||
float: left;
|
||||
display: block;
|
||||
}
|
||||
.list-card {
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
padding: 20px 20px 10px 20px;
|
||||
position: relative;
|
||||
border-radius: 10px;
|
||||
margin-bottom: 10px;
|
||||
height: 200px;
|
||||
}
|
||||
.sidebar {
|
||||
float: left;
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.header {}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
{{ template "header" . }}
|
||||
<!-- templates/about.html -->
|
||||
{{ define "content" }}
|
||||
<div class="container">
|
||||
|
||||
<div class="post-list">
|
||||
@@ -144,6 +95,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
{{ end }}
|
||||
|
||||
<!--继承基础模板内容-->
|
||||
{{ template "base.html" . }}
|
||||
Reference in New Issue
Block a user