功能代码
粘贴C:\Users\tellw\hexo\themes\landscape\layout\_partial\post\nav.ejs的修改后的内容
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| <% if (page.prev || page.next){ %> <nav id="article-nav"> <% if (page.prev){ %> <a href="<%- url_for(page.prev.path) %>" id="article-nav-newer" class="article-nav-link-wrap"> <strong class="article-nav-caption"><%= __('上一篇') %></strong> <div class="article-nav-title"> <% if (page.prev.title){ %> <%= page.prev.title %> <% } else { %> (no title) <% } %> </div> </a> <% } %> <% if (page.next){ %> <a href="<%- url_for(page.next.path) %>" id="article-nav-older" class="article-nav-link-wrap"> <strong class="article-nav-caption"><%= __('下一篇') %></strong> <div class="article-nav-title"><%= page.next.title %></div> </a> <% } %> </nav> <% } %>
|
到C:\Users\tellw\hexo\themes\polk\layout\post.ejs适当位置
样式
提取C:\Users\tellw\hexo\themes\landscape\source\css\_partial\article.styl跟上一篇下一篇标签相关的样式
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| #article-nav clearfix() position: relative @media mq-normal margin: block-margin 0 &:before absolute-center(8px) content: "" border-radius: 50% background: color-border box-shadow: 0 1px 2px #fff
.article-nav-link-wrap text-decoration: none text-shadow: 0 1px #fff color: color-grey box-sizing: border-box margin-top: block-margin text-align: center display: block &:hover color: color-default @media mq-normal width: 50% margin-top: 0
#article-nav-newer @media mq-normal float: left text-align: right padding-right: 20px
#article-nav-older @media mq-normal float: right text-align: left padding-left: 20px
.article-nav-caption text-transform: uppercase letter-spacing: 2px color: color-border line-height: 1em font-weight: bold #article-nav-newer & margin-right: -2px
.article-nav-title font-size: 0.85em line-height: line-height margin-top: 0.5em
|
到新建的C:\Users\tellw\hexo\themes\polk\source\css\_partial\article.styl文件,并在themes/polk/source/css/style.styl添加@import "_partial/article";
修改于2023.1.25/13.34,修改于2023.1.25/13.34