about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2017-07-05 22:41:24 +0200
committerAlan Pearce2017-07-05 22:41:24 +0200
commit3d70c97f2b6dc79244f067ca95535ac8c4f0f63b (patch)
tree9b6e8508398534a1a4c99c80a78b1c49ae7e449c
parentcff6bcc31d59ce9957567cc05c1ed7e364fb40ca (diff)
downloadhomestead-3d70c97f2b6dc79244f067ca95535ac8c4f0f63b.tar.lz
homestead-3d70c97f2b6dc79244f067ca95535ac8c4f0f63b.tar.zst
homestead-3d70c97f2b6dc79244f067ca95535ac8c4f0f63b.zip
Add site description
-rw-r--r--config/default.toml1
-rw-r--r--src/responders.js1
-rw-r--r--src/templates/layout.html1
-rw-r--r--test/snapshots/app.test.js.md12
-rw-r--r--test/snapshots/app.test.js.snapbin1880 -> 1936 bytes
5 files changed, 15 insertions, 0 deletions
diff --git a/config/default.toml b/config/default.toml
index d2efd7a..b52674c 100644
--- a/config/default.toml
+++ b/config/default.toml
@@ -2,6 +2,7 @@
 port = 3000
 
 [site]
+description = "Nobody in particular"
 
 [[site.nav]]
 text = "Home"
diff --git a/src/responders.js b/src/responders.js
index eeec42a..19f8489 100644
--- a/src/responders.js
+++ b/src/responders.js
@@ -66,6 +66,7 @@ function layout(config, pageTitle, pageElement) {
   return hyperfast(templates.layout, {
     title: title(config.author.name, pageTitle),
     ".h-card .p-name": config.author.name,
+    ".h-card .p-note": config.site.description,
     ".h-card .u-photo": {
       alt: config.author.name,
       src: config.author.photo
diff --git a/src/templates/layout.html b/src/templates/layout.html
index 6035209..284e939 100644
--- a/src/templates/layout.html
+++ b/src/templates/layout.html
@@ -11,6 +11,7 @@
         <img class="u-photo" alt="" src="" />
         <h1 class="p-name">hello world</h1>
       </a>
+      <p class="p-note">site description</p>
       <nav>
         <ul>
           <li><a href="/">test link</a></li>
diff --git a/test/snapshots/app.test.js.md b/test/snapshots/app.test.js.md
index 599fe22..306f2ce 100644
--- a/test/snapshots/app.test.js.md
+++ b/test/snapshots/app.test.js.md
@@ -15,6 +15,9 @@ Generated by [AVA](https://ava.li).
             name: [
               'John Doe',
             ],
+            note: [
+              'Nobody in particular',
+            ],
             photo: [
               '/static/johndoe.jpg',
             ],
@@ -97,6 +100,9 @@ Generated by [AVA](https://ava.li).
             name: [
               'John Doe',
             ],
+            note: [
+              'Nobody in particular',
+            ],
             photo: [
               '/static/johndoe.jpg',
             ],
@@ -169,6 +175,9 @@ Generated by [AVA](https://ava.li).
             name: [
               'John Doe',
             ],
+            note: [
+              'Nobody in particular',
+            ],
             photo: [
               '/static/johndoe.jpg',
             ],
@@ -251,6 +260,9 @@ Generated by [AVA](https://ava.li).
             name: [
               'John Doe',
             ],
+            note: [
+              'Nobody in particular',
+            ],
             photo: [
               '/static/johndoe.jpg',
             ],
diff --git a/test/snapshots/app.test.js.snap b/test/snapshots/app.test.js.snap
index dd02042..df5f772 100644
--- a/test/snapshots/app.test.js.snap
+++ b/test/snapshots/app.test.js.snap
Binary files differ