Started worrying about templates

I am trying to match what Jeff did in his https://github.com/zeebo/gostbook
example.
This commit is contained in:
sm
2013-02-20 21:11:44 -08:00
parent 562b0311c1
commit f9d2d247bc
14 changed files with 9805 additions and 2 deletions
+21
View File
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ template "title" . }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="/s/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="/s/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
<style>
.pw {
padding-top: 100px;
}
</style>
</head>
<body>
<section id="content">
{{ template "content" . }}
</section>
<script src="/s/jquery-latest.js"></script>
<script src="/s/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>
+17
View File
@@ -0,0 +1,17 @@
{{ define "title" }}Welcome{{ end }}
{{ define "content" }}
<div class="container pw">
<div class="row-fluid">
<form class="form-inline offset4 span3">
<div class="input-prepend input-append span2">
<span class="add-on">
<i class="icon-lock"></i>
</span>
<input type="password" class="" placeholder="password">
<button class="btn" type="button">Sign in</button>
</div>
</form>
</div>
</div>
{{ end }}