summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/index.html2
-rw-r--r--templates/layouts/default.html3
-rw-r--r--templates/layouts/header.html5
-rw-r--r--templates/post.html5
-rw-r--r--templates/posts.html7
5 files changed, 16 insertions, 6 deletions
diff --git a/templates/index.html b/templates/index.html
index ee1a64c..8f07cc0 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -28,7 +28,7 @@
</li>
</ul>
- <h2>Books</h2>
+ <h2>books</h2>
<ul>
<li><a href=https://www.oreilly.com/library/view/designing-data-intensive-applications/9781491903063 />Designing
Data Intensive Applications</a></li>
diff --git a/templates/layouts/default.html b/templates/layouts/default.html
index cfb0c17..5c8bf64 100644
--- a/templates/layouts/default.html
+++ b/templates/layouts/default.html
@@ -12,12 +12,13 @@
<style>
@font-face {
font-family: 'Mono';
- src: url('./static/V1-ServerMono-Regular.woff2') format('woff2');
+ src: url('/static/V1-ServerMono-Regular.woff2') format('woff2');
font-weight: normal;
font-style: normal;
}
body {
+ max-width: 70ch;
font-family: "Mono";
}
diff --git a/templates/layouts/header.html b/templates/layouts/header.html
index be02def..f1d2d18 100644
--- a/templates/layouts/header.html
+++ b/templates/layouts/header.html
@@ -1,8 +1,7 @@
-<!-- templates/header.html -->
<h1>a73x</h1>
<nav>
<ul>
- <li><a href="/">Home</a></li>
- <li><a href="/posts">Posts</a></li>
+ <li><a href="/">home</a></li>
+ <li><a href="/posts.html">posts</a></li>
</ul>
</nav>
diff --git a/templates/post.html b/templates/post.html
new file mode 100644
index 0000000..69c17e2
--- /dev/null
+++ b/templates/post.html
@@ -0,0 +1,5 @@
+{{template "base" .}}
+{{define "content"}}
+{{ . }}
+{{end}}
+
diff --git a/templates/posts.html b/templates/posts.html
index 75d3801..c68fb73 100644
--- a/templates/posts.html
+++ b/templates/posts.html
@@ -1,4 +1,9 @@
{{template "base" .}}
{{define "content"}}
-<h1>Posts</h1>
+<h1>posts</h1>
+<ul>
+ {{range .Posts}}
+ <li><a href="{{.Path}}">{{.Title}}</a></li>
+{{end}}
+</ul>
{{end}}