move article tag for 404 to separate partial
authorDan Allen <dan@opendevise.com>
Wed, 9 Dec 2020 00:00:37 +0000 (17:00 -0700)
committerDan Allen <dan@opendevise.com>
Wed, 9 Dec 2020 00:00:37 +0000 (17:00 -0700)
src/partials/article-404.hbs [new file with mode: 0644]
src/partials/article.hbs
src/partials/main.hbs

diff --git a/src/partials/article-404.hbs b/src/partials/article-404.hbs
new file mode 100644 (file)
index 0000000..9dde5f4
--- /dev/null
@@ -0,0 +1,10 @@
+<article class="doc">
+<h1 class="page">{{{or page.title 'Page Not Found'}}}</h1>
+<div class="paragraph">
+<p>The page you&#8217;re looking for does not exist. It may have been moved.</p>
+</div>
+<div class="paragraph">
+<p>If you arrived on this page by clicking on a link, please notify the owner of the site that the link is broken.
+If you typed the URL of this page manually, please double check that you entered the address correctly.</p>
+</div>
+</article>
index 55167ca..81dac29 100644 (file)
@@ -1,18 +1,7 @@
 <article class="doc">
-{{#if (eq page.layout '404')}}
-<h1 class="page">{{{or page.title 'Page Not Found'}}}</h1>
-<div class="paragraph">
-<p>The page you&#8217;re looking for does not exist. It may have been moved.</p>
-</div>
-<div class="paragraph">
-<p>If you arrived on this page by clicking on a link, please notify the owner of the site that the link is broken.
-If you typed the URL of this page manually, please double check that you entered the address correctly.</p>
-</div>
-{{else}}
 {{#with page.title}}
 <h1 class="page">{{{this}}}</h1>
 {{/with}}
 {{{page.contents}}}
-{{/if}}
 {{> pagination}}
 </article>
index 04752de..f29cfc3 100644 (file)
@@ -1,7 +1,11 @@
 <main class="article">
 {{> toolbar}}
   <div class="content">
+{{#if (eq page.layout '404')}}
+{{> article-404}}
+{{else}}
 {{> article}}
 {{> toc}}
+{{/if}}
   </div>
 </main>