Add Tsu theme

This commit is contained in:
2021-06-05 03:45:20 -05:00
parent 065820fe2c
commit 3cd8cdbd9c
47 changed files with 1324 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
<div class="copyright">
<div class="text">Powered By
<a href="https://hexo.io/">Hexo</a> | Theme <a href="https://github.com/zjx137/hexo-theme-Tsu">Tsu</a> &copy 2019
</div>
</div>

View File

@@ -0,0 +1,21 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<%
var title = page.title;
if (is_archive()){
title = 'Archives';
if (is_month()){
title += ': ' + page.year + '/' + page.month;
} else if (is_year()){
title += ': ' + page.year;
}
} else if (is_category()){
title = 'Category: ' + page.category;
} else if (is_tag()){
title = 'Tag: ' + page.tag;
}
%>
<title><% if (title){ %><%= title %> | <% } %><%= config.title %></title>
<%- css('styles/main') %>

View File

@@ -0,0 +1,16 @@
<header>
<div class="main">
<div class="title">
<a href="#" class="logo"><%= config.title %></a>
</div>
<div class="site-nav">
<ul id="menu" class="menu">
<% for (name in theme.menu) { %>
<li class="menu-item text-underline">
<a href="<%- url_for(theme.menu[name]) %>"><%- __('Menu.' + name) %></a>
</li>
<% } %>
</ul>
</div>
</div>
</header>

View File

@@ -0,0 +1,36 @@
<!-- MathJax配置可通过单美元符号书写行内公式等 -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
"HTML-CSS": {
preferredFont: "TeX",
availableFonts: ["STIX","TeX"],
linebreaks: { automatic:true },
EqnChunk: (MathJax.Hub.Browser.isMobile ? 10 : 50)
},
tex2jax: {
inlineMath: [ ["$", "$"], ["\\(","\\)"] ],
processEscapes: true,
ignoreClass: "tex2jax_ignore|dno",
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
},
TeX: {
equationNumbers: { autoNumber: "AMS" },
noUndefined: { attributes: { mathcolor: "red", mathbackground: "#FFEEEE", mathsize: "90%" } },
Macros: { href: "{}" }
},
messageStyle: "none"
});
</script>
<!-- 给MathJax元素添加has-jax class -->
<script type="text/x-mathjax-config">
MathJax.Hub.Queue(function() {
var all = MathJax.Hub.getAllJax(), i;
for(i=0; i < all.length; i += 1) {
all[i].SourceElement().parentNode.className += ' has-jax';
}
});
</script>
<!-- 通过连接CDN加载MathJax的js代码 -->
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML">
</script>

View File

@@ -0,0 +1,46 @@
<% if (page.total>1){ %>
<nav class="page-nav">
<% if(page.prev){ %>
<a class="prev" href="<%- url_for(page.prev_link) %>">
<i class="iconfont icon-left"></i>
<span class="prev-text"><%- __('Paginator.Prev') %></span>
</a>
<% } %>
<% if(page.next){ %>
<a class="next" href="<%- url_for(page.next_link) %>">
<span class="next-text"><%- __('Paginator.Next') %></span>
<i class="iconfont icon-right"></i>
</a>
<% } %>
</nav>
<% } %>
<% if (!is_home()) { %>
<nav class="post-nav">
<% if(page.tags){ %>
<div class="page-tags">
<% page.tags.forEach(function(tag){ %>
<a href="<%- url_for(tag.path) %>"><%= tag.name%></a>
<% }) %>
</div>
<% } %>
</nav>
<% } %>
<% if (is_post()){ %>
<nav class="paginator clearfix">
<%if(page.prev){%>
<a class="prev" href="<%- url_for(page.prev.path) %>">
<i class="iconfont icon-left"></i>
<span class="prev-text"><%= page.prev.title %></span>
</a>
<% } %>
<%if(page.next){%>
<a class="next" href="<%- url_for(page.next.path) %>">
<span class="prev-text"><%= page.next.title %></span>
<i class="iconfont icon-right"></i>
</a>
<% } %>
</nav>
<%}%>

View File

@@ -0,0 +1,21 @@
<div class="posts-wrapper">
<% page.posts.each(function(post){ %>
<article class="post article-entry">
<div class="post-title">
<a class="post-title-link text-underline" href="<%- url_for(post.path) %>"><%= post.title %></a>
</div>
<p class="sub"><%- date(post.date, "MMM DD YYYY") %></p>
<div class="post-content">
<% if (post.excerpt){ %>
<%- post.excerpt %>
<p class="article-more-link">
<a href="<%- url_for(post.path) %>">阅读全文</a>
</p>
<% } else { %>
<%- post.content %>
<% } %>
</div>
</article>
<% }) %>
</div>
<%- partial('_partials/side-bar') %>

View File

@@ -0,0 +1,18 @@
<div class="side-bar">
<div class="avator" id="avator">
<div class="title">
<a href="#" class="text-underline">About Me</a>
</div>
<img src="<%= theme.avator %>" class="ava-img">
<h3 class="author"><%= config.author %></h3>
<div class="icon-list">
<a href="<%= theme.weibo %>"><i class="iconfont icon-weibo icon-item"></i></a>
<a href="<%= theme.email %>"><i class="iconfont icon-email icon-item"></i></a>
<a href="<%= theme.github %>"><i class="iconfont icon-github icon-item"></i></a>
<a href="<%= theme.linkedin %>"><i class="iconfont icon-linkedin icon-item"></i></a>
</div>
<%- partial('_partials/tags') %>
</div>
</div>

View File

@@ -0,0 +1,4 @@
<div class="tags">
<h3 class="tags-title">Tags</h3>
<%- list_tags({show_count: true, amount: 10, orderby: 'count'}) %>
</div>

View File

@@ -0,0 +1,10 @@
<% if(is_post()){%>
<div class="_toc">
<strong class="toc-title">
Contents
</strong>
<div class="toc-content">
<%- toc(page.content, {list_number: false}) %>
</div>
</div>
<%}%>