summary refs log tree commit diff stats
path: root/src/templates
diff options
context:
space:
mode:
authorAlan Pearce2017-06-24 12:11:46 +0200
committerAlan Pearce2017-06-24 12:11:46 +0200
commit6b02186505264dc5a05a74bce1f9dcc3f91d08e1 (patch)
tree09201512999c62c2cae19c9a44fe3b055fd664d4 /src/templates
parentf9fd0d795fb7bff10cb759f2300200d50b0fbab3 (diff)
downloadhomestead-6b02186505264dc5a05a74bce1f9dcc3f91d08e1.tar.lz
homestead-6b02186505264dc5a05a74bce1f9dcc3f91d08e1.tar.zst
homestead-6b02186505264dc5a05a74bce1f9dcc3f91d08e1.zip
refactor: Separate templates into layout/body
Diffstat (limited to 'src/templates')
-rw-r--r--src/templates/home.html7
-rw-r--r--src/templates/index.html36
-rw-r--r--src/templates/layout.html13
-rw-r--r--src/templates/post.html11
-rw-r--r--src/templates/taxon.html7
5 files changed, 38 insertions, 36 deletions
diff --git a/src/templates/home.html b/src/templates/home.html
new file mode 100644
index 0000000..dfc4677
--- /dev/null
+++ b/src/templates/home.html
@@ -0,0 +1,7 @@
+<main class="home">
+  <ul class="posts">
+    <li class="post">
+      <a href="/">Test post please ignore</a>
+    </li>
+  </ul>
+</main>
diff --git a/src/templates/index.html b/src/templates/index.html
deleted file mode 100644
index 412b4ec..0000000
--- a/src/templates/index.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!doctype html>
-<html lang="en">
-  <head>
-    <meta charset="utf-8"/>
-    <title></title>
-  </head>
-  <body>
-    <main class="homepage">
-      <h1>hello world</h1>
-
-      <ul class="posts">
-        <li class="post">
-          <a href="/">Test post please ignore</a>
-        </li>
-      </ul>
-    </main>
-    <main class="post">
-      <article>
-        <h1>post title</h1>
-        <main>
-          Fringilla ut morbi tincidunt augue interdum velit euismod!
-          Interdum velit laoreet id donec ultrices tincidunt arcu, non
-          sodales neque sodales ut etiam sit amet nisl purus, in
-          mollis nunc sed. 
-        </main>
-      </article>
-    </main>
-    <main class="taxon">
-      <ul class="posts">
-        <li class="post">
-          <a href="/">Test post please ignore</a>
-        </li>
-      </ul>
-    </main>
-  </body>
-</html>
diff --git a/src/templates/layout.html b/src/templates/layout.html
new file mode 100644
index 0000000..733bbc4
--- /dev/null
+++ b/src/templates/layout.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8"/>
+    <title></title>
+  </head>
+  <body>
+    <header>
+      <h1>hello world</h1>
+    </header>
+    <main></main>
+  </body>
+</html>
diff --git a/src/templates/post.html b/src/templates/post.html
new file mode 100644
index 0000000..b6eba4e
--- /dev/null
+++ b/src/templates/post.html
@@ -0,0 +1,11 @@
+<main class="post">
+  <article>
+    <h1>post title</h1>
+    <main>
+      Fringilla ut morbi tincidunt augue interdum velit euismod!
+      Interdum velit laoreet id donec ultrices tincidunt arcu, non
+      sodales neque sodales ut etiam sit amet nisl purus, in
+      mollis nunc sed.
+    </main>
+  </article>
+</main>
diff --git a/src/templates/taxon.html b/src/templates/taxon.html
new file mode 100644
index 0000000..44e1bdc
--- /dev/null
+++ b/src/templates/taxon.html
@@ -0,0 +1,7 @@
+<main class="taxon">
+  <ul class="posts">
+    <li class="post">
+      <a href="/">Test post please ignore</a>
+    </li>
+  </ul>
+</main>