From 0706e75dd621f4e67108d2ca887be2d0a97c67fe Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Tue, 8 Dec 2020 17:00:37 -0700 Subject: [PATCH] move article tag for 404 to separate partial --- src/partials/article-404.hbs | 10 ++++++++++ src/partials/article.hbs | 11 ----------- src/partials/main.hbs | 4 ++++ 3 files changed, 14 insertions(+), 11 deletions(-) create mode 100644 src/partials/article-404.hbs diff --git a/src/partials/article-404.hbs b/src/partials/article-404.hbs new file mode 100644 index 0000000..9dde5f4 --- /dev/null +++ b/src/partials/article-404.hbs @@ -0,0 +1,10 @@ +
+

{{{or page.title 'Page Not Found'}}}

+
+

The page you’re looking for does not exist. It may have been moved.

+
+
+

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.

+
+
diff --git a/src/partials/article.hbs b/src/partials/article.hbs index 55167ca..81dac29 100644 --- a/src/partials/article.hbs +++ b/src/partials/article.hbs @@ -1,18 +1,7 @@
-{{#if (eq page.layout '404')}} -

{{{or page.title 'Page Not Found'}}}

-
-

The page you’re looking for does not exist. It may have been moved.

-
-
-

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.

-
-{{else}} {{#with page.title}}

{{{this}}}

{{/with}} {{{page.contents}}} -{{/if}} {{> pagination}}
diff --git a/src/partials/main.hbs b/src/partials/main.hbs index 04752de..f29cfc3 100644 --- a/src/partials/main.hbs +++ b/src/partials/main.hbs @@ -1,7 +1,11 @@
{{> toolbar}}
+{{#if (eq page.layout '404')}} +{{> article-404}} +{{else}} {{> article}} {{> toc}} +{{/if}}
-- 2.11.0