diff options
author | Doge <[email protected]> | 2021-05-07 14:32:34 +0800 |
---|---|---|
committer | Doge <[email protected]> | 2021-05-07 14:32:34 +0800 |
commit | 99ca844e3e89e53e44e350001cb20cd91da95bbe (patch) | |
tree | c1bb3ff6c266383bff42f6ab920891e5639e4bd9 /layout | |
parent | a0e8729df4a987d2f1b84ccfdd0c15f203621f1f (diff) | |
download | chromate-99ca844e3e89e53e44e350001cb20cd91da95bbe.tar.gz chromate-99ca844e3e89e53e44e350001cb20cd91da95bbe.tar.bz2 chromate-99ca844e3e89e53e44e350001cb20cd91da95bbe.zip |
Add footer and page navigator support
Diffstat (limited to 'layout')
-rw-r--r-- | layout/_partial/footer.ejs | 9 | ||||
-rw-r--r-- | layout/_partial/header.ejs | 3 | ||||
-rw-r--r-- | layout/index.ejs | 27 |
3 files changed, 38 insertions, 1 deletions
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 |