Skip to content

Commit

Permalink
Merge pull request #23 from EvanNotFound/dev
Browse files Browse the repository at this point in the history
v0.4.2
  • Loading branch information
EvanNotFound authored Dec 18, 2022
2 parents 83a996c + a68b188 commit 3919fa8
Show file tree
Hide file tree
Showing 9 changed files with 155 additions and 126 deletions.
20 changes: 14 additions & 6 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ style:
# Article image align position
article_img_align: center # value: left | center

# Left side width
# Right side width
right_side_width: 210px #sidebar width, for toc

# Content area max width
Expand Down Expand Up @@ -75,17 +75,25 @@ social_contact: # social contact icons in the first screen, you can add more by
# ---------------------------------------------------------------------------------------
# Navigation menu
# ---------------------------------------------------------------------------------------
menu: #you can customize, i18n files are in the theme's languages folder
Home: /
Archives: /archives
# Status: https://status.evanluo.top/
menu: #you can customize, i18n files are in the theme's languages folder. fa-regular recommended
Home:
path: /
icon: fa-regular fa-house # can be empty
Archives:
path: /archives
icon: fa-regular fa-archive # can be empty
# Status:
# path: https://status.evanluo.top/
# icon: fa-regular fa-chart-bar
# About:
# icon: fa-regular fa-user
# submenus:
# Me: /about
# Github: https://github.com/EvanNotFound/hexo-theme-redefine
# Blog: https://www.evanluo.top
# Friends: /friends
# Links:
# icon: fa-regular fa-link
# submenus:
# Link1: /link1
# Link2: /link2
Expand Down Expand Up @@ -248,4 +256,4 @@ footer:
# ---------------------------------------------------------------------------------------
# Redefine Theme version (Please don't modify)
# ---------------------------------------------------------------------------------------
version: 0.4.1
version: 0.4.2
8 changes: 4 additions & 4 deletions layout/_partial/article-meta-info.ejs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div class="article-meta-info">
<span class="article-date article-meta-item">
<i class="fa-regular fa-pen-line"></i>&nbsp;
<i class="fa-regular fa-pen-fancy"></i>&nbsp;
<span class="pc"><%= date(articleObject.date, is_post() ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD') %></span>
<span class="mobile"><%= date(articleObject.date, is_post() ? 'YYYY-MM-DD HH:mm' : 'YYYY-MM-DD') %></span>
</span>
<% if (articleObject.categories.length) { %>
<span class="article-categories article-meta-item">
<i class="fa-regular fa-folder-open"></i>&nbsp;
<i class="fa-regular fa-folders"></i>&nbsp;
<ul>
<% articleObject.categories.forEach((category, i) => { %>
<li>
Expand Down Expand Up @@ -41,12 +41,12 @@
%>
<% if(is_post() && theme.hasOwnProperty('post') && theme.post.word_count.enable && theme.post.word_count.wordcount && temp_wordcount_count){ %>
<span class="article-wordcount article-meta-item">
<i class="fa-solid fa-file-word"></i>&nbsp;<span><%= temp_wordcount_count %> <%- __('wordcount') %></span>
<i class="fa-regular fa-file-word"></i>&nbsp;<span><%= temp_wordcount_count %> <%- __('wordcount') %></span>
</span>
<% } %>
<% if(is_post() && theme.hasOwnProperty('post') && theme.post.word_count.enable && theme.post.word_count.min2read && temp_min2read_count){ %>
<span class="article-min2read article-meta-item">
<i class="fa-solid fa-clock"></i>&nbsp;<span><%= temp_min2read_count %> <%- __('min2read') %></span>
<i class="fa-regular fa-clock"></i>&nbsp;<span><%= temp_min2read_count %> <%- __('min2read') %></span>
</span>
<% } %>
<% if (is_post() && theme.website_count.busuanzi_count.enable && theme.website_count.busuanzi_count.page_pv) { %>
Expand Down
29 changes: 22 additions & 7 deletions layout/_partial/comment/waline.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,29 @@
) { %>
<div id="waline"></div>
<link rel="stylesheet" href="//evan.beee.top/css/waline.css"/>
<script <%= theme.pjax.enable === true ? 'data-pjax' : '' %>
src="//evan.beee.top/js/waline.js"></script>
<script <%= theme.pjax.enable === true ? 'data-pjax' : '' %>>
Waline.init({
el: '#waline',
serverURL: '<%= theme.comment.waline.serverUrl %>',
lang: '<%= theme.comment.waline.lang %>',
dark: '<%= theme.comment.waline.dark %>',
requiredMeta: ['nick','mail'], // cannot customize by theme config, change it yourself
});
function loadWaline() {
Waline.init({
el: '#waline',
serverURL: '<%= theme.comment.waline.serverUrl %>',
lang: '<%= theme.comment.waline.lang %>',
dark: '<%= theme.comment.waline.dark %>',
requiredMeta: ['nick','mail'], // cannot customize by theme config, change it yourself
});
}
if ('<%= theme.pjax.enable %>') {
const loadWalineTimeout = setTimeout(() => {
loadWaline();
clearTimeout(loadWalineTimeout);
}, 1000);
} else {
window.addEventListener('DOMContentLoaded', loadWaline);
}
</script>
<% } %>
5 changes: 1 addition & 4 deletions layout/_partial/footer.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,5 @@
<div class="customize-info info-item"><%- theme.footer.customize %></div>
<% } %>

</div>
<link rel="stylesheet" href="//evan.beee.top/css/waline.css"/>
<script src="//evan.beee.top/js/waline.js"></script>

</div>
</footer>
2 changes: 1 addition & 1 deletion layout/_partial/friends-link.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1><%- __('links') %> <a href="/friends/zh-hans" style="display: none;border-bottom: none;"></a></h1>
<h1><%- __('links') %></h1>
<div class="friends-link-container">
<ul class="friends-link-list">
<% for (const f of theme.links) { %>
Expand Down
23 changes: 17 additions & 6 deletions layout/_partial/header.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@
<% for (let i in theme.menu) { %>
<li class="menu-item">
<!-- Menu -->
<a class="<% if (theme.menu[i].submenus) { %>has-dropdown" <% } else {%><%- isInHomePaging(page.path, theme.menu[i]) ? 'active' : is_current(theme.menu[i]) ? 'active' : '' %>" <% } %>
href="<% if (theme.menu[i].submenus) { %>javascript:void(0);"<% } else {%><%- url_for(theme.menu[i]) %>" <% } %>>
<a class="<% if (theme.menu[i].submenus) { %>has-dropdown" <% } else {%><%- isInHomePaging(page.path, theme.menu[i].path) ? 'active' : is_current(theme.menu[i].path) ? 'active' : '' %>" <% } %>
href="<% if (theme.menu[i].submenus) { %>javascript:void(0);"<% } else {%><%- url_for(theme.menu[i].path) %>" <% } %>>
<% if (theme.menu[i].submenus) { %>
<% if (theme.menu[i].icon) { %>
<i class="<%- theme.menu[i].icon %>"></i>
<% } %>
<%= __(i.toLowerCase()).toUpperCase() %>&nbsp;<i class="fa-solid fa-chevron-down"></i>
<% } else {%>
<% } else {%>
<% if (theme.menu[i].icon) { %>
<i class="<%- theme.menu[i].icon %>"></i>
<% } %>
<%= __(i.toLowerCase()).toUpperCase() %>
<% } %>
</a>
Expand Down Expand Up @@ -64,15 +70,20 @@
<ul class="drawer-menu-list">
<% for (let i in theme.menu) { %>
<li class="drawer-menu-item flex-center">
<a class="<% if (theme.menu[i].submenus) { %>has-dropdown" <% } else {%><%- isInHomePaging(page.path, theme.menu[i]) ? 'active' : is_current(theme.menu[i]) ? 'active' : '' %>" <% } %>
href="<% if (theme.menu[i].submenus) { %>javascript:void(0);"<% } else {%><%- url_for(theme.menu[i]) %>" <% } %>>
<a class="<% if (theme.menu[i].submenus) { %>has-dropdown" <% } else {%><%- isInHomePaging(page.path, theme.menu[i].path) ? 'active' : is_current(theme.menu[i].path) ? 'active' : '' %>" <% } %>
href="<% if (theme.menu[i].submenus) { %>javascript:void(0);"<% } else {%><%- url_for(theme.menu[i].path) %>" <% } %>>
<% if (theme.menu[i].submenus) { %>
<% if (theme.menu[i].icon) { %>
<i class="<%- theme.menu[i].icon %>"></i>
<% } %>
<%= __(i.toLowerCase()).toUpperCase() %>&nbsp;<i class="fa-solid fa-chevron-down"></i>
<% } else {%>
<% if (theme.menu[i].icon) { %>
<i class="<%- theme.menu[i].icon %>"></i>
<% } %>
<%= __(i.toLowerCase()).toUpperCase() %>
<% } %>
</a>
</li>
<!-- Submenu -->
<% if (theme.menu[i].submenus) { %>
Expand Down
6 changes: 2 additions & 4 deletions layout/_partial/page-template.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
<div class="page-template-container">
<%
const isLoadFriendsLink = (
theme.menu.hasOwnProperty('Links')
&& theme.menu.Links
&& theme.links
&& (page.type === 'links' || page.type === 'link' || page.title === 'links' || page.title === 'link')
theme.links
&& (page.type === 'links' || page.type === 'link' || page.title === 'links' || page.title === 'link' || page.title === '友情链接' || page.title === '友情鏈接' || page.title === 'friends' || page.title === 'friend')
);
%>
<% if (isLoadFriendsLink) { %>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-theme-redefine",
"version": "0.4.1",
"version": "0.4.2",
"private": false,
"description": "\"Redefine\" hexo theme is a simple & fast & pure theme, but with no compromise.",
"scripts": {
Expand Down
Loading

0 comments on commit 3919fa8

Please sign in to comment.