From 99ca844e3e89e53e44e350001cb20cd91da95bbe Mon Sep 17 00:00:00 2001
From: Doge <guiqiqi187@gmail.com>
Date: Fri, 7 May 2021 14:32:34 +0800
Subject: Add footer and page navigator support

---
 layout/_partial/footer.ejs |  9 +++++++++
 layout/_partial/header.ejs |  3 +++
 layout/index.ejs           | 27 ++++++++++++++++++++++++++-
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/layout/_partial/footer.ejs b/layout/_partial/footer.ejs
index e69de29..e9b8c64 100644
--- a/layout/_partial/footer.ejs
+++ b/layout/_partial/footer.ejs
@@ -0,0 +1,9 @@
+<footer class="footer">
+    <div class="footer-copyright">
+        Copyright © <%= date(Date.now(), 'YYYY') %> <a href="<%= url_for('/') %>"><%= config.title %></a>
+    </div>
+    <div class="footer-power">
+        <p>Powered by <a href="https://hexo.io" target="_blank">Hexo</a> | Theme - <a href="https://github.com/guiqiqi/Chromate"
+                target="_blank">Chromate</a></p>
+    </div>
+</footer>
\ No newline at end of file
diff --git a/layout/_partial/header.ejs b/layout/_partial/header.ejs
index e96f62b..1ef4ef8 100644
--- a/layout/_partial/header.ejs
+++ b/layout/_partial/header.ejs
@@ -2,6 +2,9 @@
     <div class="header-title">
         <%= config.title %>
     </div>
+    <div class="header-desc">
+        <%= config.description %> 
+    </div>
     <nav class="header-navbar">
         <ul class="header-menu">
             <% for (let index in theme.navbar) { %>
diff --git a/layout/index.ejs b/layout/index.ejs
index 1857e73..ae1db98 100644
--- a/layout/index.ejs
+++ b/layout/index.ejs
@@ -44,7 +44,32 @@
                     </div>
                 <% } %>
             </div>
-            
         </article>
     <% }) %>
+
+    <!-- Page navigation -->
+    <% if (page.prev || page.next) { %>
+        <div class="nav">
+            <% if (page.prev) { %>
+                <div class="nav-prev">
+                    <a href="<%- url_for(page.prev_link) %>" class="nav-link">
+                        <span class="nav-label">
+                            Prev
+                            <i class="fa fa-chevron-left"></i>
+                        </span>
+                    </a>
+                </div>
+            <% } %>
+            <% if (page.next) { %>
+                <div class="nav-next">  
+                    <a href="<%- url_for(page.next_link) %>" class="nav-link">
+                        <span class="nav-label">
+                            Next
+                            <i class="fa fa-chevron-right"></i>
+                        </span>
+                    </a>
+                </div>
+            <% } %>
+        </div>
+    <% } %>
 </section>
\ No newline at end of file
-- 
cgit v1.2.3