Skip to content

Commit

Permalink
released
Browse files Browse the repository at this point in the history
  • Loading branch information
ruibaby committed Aug 19, 2018
1 parent ff091de commit a312316
Show file tree
Hide file tree
Showing 49 changed files with 1,627 additions and 1,656 deletions.
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,29 @@
# 开发中
<h1><a href="#" target="_blank">NexT-Halo</a></h1>

> 一款Halo的主题,来自Hexo排名第一的主题。
## 说明

该主题的原作者为[iissnan](https://github.com/iissnan),非常感谢做出这么优秀的主题。

原主题地址:[https://github.com/iissnan/hexo-theme-next](https://github.com/iissnan/hexo-theme-next)

## 预览截图

![](screenshots/index.png)

![](screenshots/option.png)

## 预览地址

[IIssNan's Notes](https://notes.iissnan.com/)

## 注意

- 该主题能渲染`首页(/)``文章页(/archives/${postUrl})``标签页(/tags)``分类目录(/categories)``归档(/archives)``自定义页面(/p/${postUrl})`
- 上传完成之后需要保存一次主题设置,方可使用。

## 使用方法

克隆或者[下载](https://github.com/ruibaby/next-halo/releases),将文件夹名改为`next`,压缩为zip压缩包之后在后台的主题设置直接上传即可使用。

22 changes: 21 additions & 1 deletion index.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,27 @@
</#list>
</#if>
</section>
<#include "layout/_partials/pagination.ftl">
<#if posts.totalPages gt 1>
<nav class="pagination">
<#if posts.hasPrevious()>
<#if posts.number == 1>
<a class="extend prev" rel="prev" href="/">
<i class="fa fa-angle-left" aria-label="Previous page"></i>
</a>
<#else>
<a class="extend prev" rel="prev" href="/page/${posts.number}">
<i class="fa fa-angle-left" aria-label="Previous page"></i>
</a>
</#if>
</#if>
<span class="page-number current">${posts.number+1}</span>
<#if posts.hasNext()>
<a class="extend next" rel="next" href="/page/${posts.number+2}/">
<i class="fa fa-angle-right" aria-label="Next page"></i>
</a>
</#if>
</nav>
</#if>
</@main>

<@sidebar>
Expand Down
23 changes: 3 additions & 20 deletions layout/_layout.ftl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<#include "../../../common/macro/common_macro.ftl">
<#macro html title,keywords,desc,ogtype,url>
<!DOCTYPE html>

Expand All @@ -7,7 +8,6 @@
<#include "_partials/head.ftl">
<@head title,keywords,desc,ogtype,url></@head>
<title>${title}</title>
<#include "_third-party/analytics/index.ftl">
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">
Expand All @@ -27,7 +27,6 @@
<div id="content" class="content">
<#nested />
</div>
<#include "_third-party/duoshuo-hot-articles.ftl">
<#if useComment>
<#include "_partials/comments.ftl">
</#if>
Expand All @@ -45,48 +44,32 @@
<footer id="footer" class="footer">
<div class="footer-inner">
<#include "_partials/footer.ftl">
<#include "_third-party/analytics/analytics-with-widget.ftl">
<@statistics></@statistics>
<#nested />
</div>
</footer>
</#macro>

<#macro button>
<#if options.next_style_sidebar_b2t?default('false')=='false'>
<div class="back-to-top">
<div class="back-to-top" style="width: initial">
<i class="fa fa-arrow-up"></i>
<#if options.next_style_sidebar_scrollpercent?default('false')=='true'>
<span id="scrollpercent"><span>0</span>%</span>
</#if>
</div>
</#if>

<#--{% if theme.needmoreshare2.enable and theme.needmoreshare2.float.enable %}-->
<#--<div id="needsharebutton-float">-->
<#--<span class="btn">-->
<#--<i class="fa fa-share-alt" aria-hidden="true"></i>-->
<#--</span>-->
<#--</div>-->
<#--{% endif %}-->

</div>

<#include "_scripts/vendors.ftl">
<#include "_scripts/commons.ftl">

<#include "../layout/_scripts/schemes/${options.next_general_scheme?default('Muse')?lower_case}.ftl">

<#--{% block script_extra %}{% endblock %}-->
<#nested />
<#include "_scripts/boostrap.ftl">

<#include "_third-party/search/index.ftl">
<#include "_third-party/analytics/lean-analytics.ftl">
<#--<#include "_third-party/analytics/firestore.ftl">-->
<#include "_third-party/seo/baidu-push.ftl">
<#--<#include "_third-party/needsharebutton.ftl">-->
<#--<#include "_third-party/rating.ftl">-->
<#--<#include "_third-party/mathjax.ftl">-->
<#include "_third-party/scroll-cookie.ftl">
<#include "_third-party/exturl.ftl">
</body>
Expand Down
54 changes: 51 additions & 3 deletions layout/_macro/post.ftl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<#macro post_template post>
<article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article">
<div class="post-block">
<link itemprop="mainEntityOfPage" href="https://ioliu.cn/2017/git-command-backup/">
<link itemprop="mainEntityOfPage" href="${options.blog_url}/archives/${post.postUrl}">
<span hidden="" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
<meta itemprop="name" content="${user.userDisplayName?if_exists}">
<meta itemprop="description" content="${post.postSummary?if_exists}">
Expand Down Expand Up @@ -43,7 +43,7 @@
<span class="post-meta-item-icon">
<i class="fa fa-comment-o"></i>
</span>
<a href="/archives/${post.postUrl}/#comments" itemprop="discussionUrl">
<a href="/archives/${post.postUrl}#comments" itemprop="discussionUrl">
<span class="valine-comment-count" data-xid="/archives/${post.postUrl}/" itemprop="commentsCount">${post.comments?size}</span>
</a>
<span id="/archives/${post.postUrl}/" class="leancloud_visitors" data-flag-title="${post.postTitle}">
Expand All @@ -52,7 +52,7 @@
<i class="fa fa-eye"></i>
</span>
<span class="post-meta-item-text">阅读次数 </span>
<span class="leancloud-visitors-count">${post.postViews?default(0)}</span>
<span class="leancloud-visitors-count">${post.postViews?default(0)?c}</span>
</span>
</span>
</div>
Expand All @@ -71,8 +71,56 @@
${post.postContent}
</#if>
</div>
<#if options.next_general_wechat_subscriber_enable?? && !is_index??>
<div>
<#include "wechat-subscriber.ftl">
</div>
</#if>
<#if (options.next_other_alipay?? || options.next_other_wechatpay?? || options.next_other_bitcoin??) && !is_index??>
<div>
<#include "reward.ftl">
</div>
</#if>
<#if options.next_other_post_copyright?default('true')=='true' && !is_index??>
<div>
<#include "post-copyright.ftl">
</div>
</#if>
<footer class="post-footer">
<div class="post-tags">
<#if !is_index??>
<#if post.tags?size gt 0>
<#list post.tags as tag>
<a href="/tags/${tag.tagUrl}" rel="tag"># ${tag.tagName}</a>
</#list>
</#if>
</#if>
</div>
<#if (afterPost?? || beforePost??) && !is_index??>
<div class="post-nav">

<div class="post-nav-next post-nav-item">
<#if beforePost??>
<a href="/archives/${beforePost.postUrl}" rel="next" title="${beforePost.postTitle}">
<i class="fa fa-chevron-left"></i> ${beforePost.postTitle}
</a>
</#if>
</div>

<span class="post-nav-divider"></span>

<div class="post-nav-prev post-nav-item">
<#if afterPost??>
<a href="/archives/${afterPost.postUrl}" rel="prev" title="${afterPost.postTitle}">
${afterPost.postTitle} <i class="fa fa-chevron-right"></i>
</a>
</#if>
</div>
</div>
</#if>
<#if is_index??>
<div class="post-eof"></div>
</#if>
</footer>
</div>
</article>
Expand Down
31 changes: 9 additions & 22 deletions layout/_macro/sidebar.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</ul>
</#if>

<section class="site-overview-wrap sidebar-panel sidebar-panel-active">
<section class="site-overview-wrap sidebar-panel <#if !is_post || options.next_style_toc_enable?default('true')=='false'>sidebar-panel-active</#if>">
<div class="site-overview">
<div class="site-author motion-element" itemprop="author" itemscope
itemtype="http://schema.org/Person">
Expand Down Expand Up @@ -226,30 +226,17 @@
</div>
</section>

<#--{% if display_toc and toc(page.content).length > 1 %}-->
<#--<!--noindex&ndash;&gt;-->
<#--<section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">-->
<#--<div class="post-toc">-->

<#--{% if page.toc_number === undefined %}-->
<#--{% set toc = toc(page.content, { "class": "nav", list_number: theme.toc.number }) %}-->
<#--{% else %}-->
<#--{% set toc = toc(page.content, { "class": "nav", list_number: page.toc_number }) %}-->
<#--{% endif %}-->

<#--{% if toc.length <= 1 %}-->
<#--<p class="post-toc-empty">此文章未包含目录</p>-->
<#--{% else %}-->
<#--<div class="post-toc-content">{{ toc }}</div>-->
<#--{% endif %}-->

<#--</div>-->
<#--</section>-->
<#--<!--/noindex&ndash;&gt;-->
<#--{% endif %}-->
<!--noindex-->
<section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
<div class="post-toc">
<div class="post-toc-content"></div>
</div>
</section>
<!--/noindex-->

<#if options.next_style_sidebar_b2t?default('false')=='true'>
<div class="back-to-top">
<div class="back-to-top" style="width: initial">
<i class="fa fa-arrow-up"></i>
<#if options.next_style_sidebar_scrollpercent?default('false')=='true'>
<span id="scrollpercent"><span>0</span>%</span>
Expand Down
9 changes: 4 additions & 5 deletions layout/_partials/footer.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
</div>
</#if>

<#if options.next_general_footer_custom_text??>
<div class="footer-custom">
${options.next_general_footer_custom_text}
</div>
</#if>
<div class="footer-custom">
<@footer_info></@footer_info>
</div>

14 changes: 8 additions & 6 deletions layout/_partials/head.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="{{ theme.android_chrome_color }}">

<#if options.next_general_android_chrome_color??>
<meta name="theme-color" content="${options.next_general_android_chrome_color}">
</#if>

<#if options.next_plugins_pace?default('false')=='true'>
<script src="/next/source/lib/pace/pace.min.js?v=1.0.2"></script>
Expand Down Expand Up @@ -49,18 +50,19 @@

<#switch '${options.next_general_scheme?default("Muse")}'>
<#case 'Muse'>
<link href="/next/source/css/Muse.css?v=5.1.4" rel="stylesheet" type="text/css" />
<link href="/next/source/css/Muse/main.css?v=5.1.4" rel="stylesheet" type="text/css" />
<#break >
<#case 'Mist'>
<link href="/next/source/css/Mist.css?v=5.1.4" rel="stylesheet" type="text/css" />
<link href="/next/source/css/Mist/main.css?v=5.1.4" rel="stylesheet" type="text/css" />
<#break >
<#case 'Pisces'>
<link href="/next/source/css/Pisces.css?v=5.1.4" rel="stylesheet" type="text/css" />
<link href="/next/source/css/Pisces/main.css?v=5.1.4" rel="stylesheet" type="text/css" />
<#break >
<#case 'Gemini'>
<link href="/next/source/css/Gemini.css?v=5.1.4" rel="stylesheet" type="text/css" />
<link href="/next/source/css/Gemini/main.css?v=5.1.4" rel="stylesheet" type="text/css" />
<#break >
</#switch>
<link href="/next/source/css/highlight/${options.next_general_highlight?default('normal')}.css" rel="stylesheet" type="text/css" />

<#if options.next_general_apple_touch_icon?default('/next/source/images/apple-touch-icon-next.png') !=''>
<link rel="apple-touch-icon" sizes="180x180" href="${options.next_general_apple_touch_icon?default('/next/source/images/apple-touch-icon-next.png')}?v=5.1.4">
Expand Down
2 changes: 1 addition & 1 deletion layout/_partials/head/external-fonts.ftl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<link href="//fonts.googleapis.com/css?family=Monda:300,300italic,400,400italic,700,700italic|Roboto Slab:300,300italic,400,400italic,700,700italic|Rosario:300,300italic,400,400italic,700,700italic|PT Mono:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
<link href="//fonts.cat.net/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
13 changes: 13 additions & 0 deletions layout/_scripts/vendors.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,16 @@
<#if options.next_other_canvas_ribbon_enable?default('false')=='true' && options.next_general_scheme?default('Muse')=='Pisces'>
<script id="ribbon" type="text/javascript" size="${options.next_other_canvas_ribbon_size?default('300')}" alpha="${options.next_other_canvas_ribbon_alpha?default('0.6')}" zIndex="${options.next_other_canvas_ribbon_zindex?default('-1')}" src="/next/source/lib/canvas-ribbon/canvas-ribbon.js"></script>
</#if>

<#if is_post?? || is_page??>
<script type="text/javascript" src="/next/source/lib/jquery-toc/jquery.toc.min.js"></script>
<script type="text/javascript" src="/next/source/lib/jquery-toc/toc.min.js"></script>
<script>
$('.post-toc-content').initTOC({
selector: 'h1, h2, h3, h4, h5, h6',
scope: '.post-body',
overwrite: false,
prefix: 'toc'
});
</script>
</#if>
4 changes: 0 additions & 4 deletions layout/_third-party/analytics/analytics-with-widget.ftl

This file was deleted.

11 changes: 0 additions & 11 deletions layout/_third-party/analytics/application-insights.ftl

This file was deleted.

11 changes: 0 additions & 11 deletions layout/_third-party/analytics/baidu-analytics.ftl

This file was deleted.

22 changes: 0 additions & 22 deletions layout/_third-party/analytics/busuanzi-counter.ftl

This file was deleted.

7 changes: 0 additions & 7 deletions layout/_third-party/analytics/cnzz-analytics.ftl

This file was deleted.

Loading

0 comments on commit a312316

Please sign in to comment.