-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Tags页面和categories页面; 可手动开关暗黑模式; 页脚功能和备案显示
- Loading branch information
Showing
24 changed files
with
616 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,21 @@ | ||
<div class="post-preview"> | ||
<a href="<%- config.root %><%- item.path %>"> | ||
<h2 class="post-title"> | ||
<%- item.title || theme.default_post_title || "Untitled" %> | ||
</h2> | ||
<div class="post-title"> | ||
<!-- <%- item.title || theme.default_post_title || "Untitled" %> --> | ||
<% | ||
var title = item.title || theme.default_post_title || "Untitled"; | ||
var mainTitle = title.split(" | ")[0]; | ||
var subTitle = title.split(" | ")[1]; | ||
%> | ||
<div class="post-maintitle"> | ||
<%- mainTitle %> | ||
</div> | ||
<div class="post-subtitle"> | ||
<!-- <%- item.excerpt %> --> | ||
<%- subTitle %> | ||
</div> | ||
</div> | ||
|
||
<%- item.excerpt %> | ||
</a> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<% if (theme.footer && theme.footer.enable) { %> | ||
<% if (theme.footer.content) { %> | ||
<div class="content"> | ||
<%- theme.footer.content %> | ||
</div> | ||
<% } %> | ||
<% if (theme.footer.beian) { %> | ||
<div class="beian"> | ||
<a href="http://www.beian.miit.gov.cn" target="_blank"><%- theme.footer.beian %></a> | ||
</div> | ||
<% } %> | ||
<% } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<a class="go-top"> | ||
<i class="fa fa-arrow-up"></i> | ||
</a> | ||
|
||
<script type="text/javascript"> | ||
if ($(window).scrollTop() <= 100) { | ||
$(".go-top").hide(); | ||
} | ||
$(function () { | ||
$(window).scroll(function () { | ||
if ($(window).scrollTop() > 100) { | ||
$(".go-top").fadeIn(500); | ||
} else { | ||
$(".go-top").fadeOut(500); | ||
} | ||
}); | ||
$(".go-top").click(function () { | ||
$('body,html').animate({scrollTop: 0}, 500); | ||
return false; | ||
}); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ | |
<!-- Title --> | ||
<% | ||
var title = []; | ||
if (page.current > 1) title.push(__('page', page.current)); | ||
<!-- if (page.current > 1) title.push(__('page', page.current)); --> | ||
if (page.title) title.push(page.title); | ||
if (page.category) title.push(page.category); | ||
if (page.tag) title.push(page.tag); | ||
|
@@ -34,24 +34,40 @@ | |
%> | ||
<title><%= title.join(' | ') %></title> | ||
|
||
<!-- Top Menu --> | ||
<div class="top_menu"> | ||
<% if (theme.menu && theme.menu.length){ %> | ||
<% Object.keys(theme.menu).forEach(key => { %> | ||
<a href="<%=theme.menu[key]%>"><%=key%></a> | ||
<% }); %> | ||
<% } %> | ||
</div> | ||
<!-- favicon --> | ||
<%if (theme.favicon){ %> | ||
<link rel="shortcut icon" href="<%= theme.favicon %>"> | ||
<% } else { %> | ||
<link rel="shortcut icon" href="<%= url_for('/img/favicon.png') %>"> | ||
<% } %> | ||
|
||
<!-- Bootstrap Core CSS --> | ||
<link href="//cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"> | ||
|
||
<!-- Valine --> | ||
<script src='//unpkg.com/valine/dist/Valine.min.js'></script> | ||
|
||
<link rel="stylesheet" href="/css/darkmode.css"> | ||
|
||
<!-- Custom CSS --> | ||
<%- css('css/style.css') %> | ||
|
||
<!-- Top Menu --> | ||
<div class="top_menu"> | ||
<% if (theme.menu) { %> | ||
<% Object.keys(theme.menu).forEach(key => { %> | ||
<a href="<%=theme.menu[key]%>"><%=key%></a> | ||
<% }); %> | ||
<% } %> | ||
<a class="darkmode-toggle" href="#" data-toggle="darkmode"> | ||
<i class="fa fa-moon-o"></i> | ||
<i class="fa fa-sun-o" style="display: none;"></i> | ||
</a> | ||
</div> | ||
|
||
<!-- Darkmode --> | ||
<script src='/js/darkmode.js'></script> | ||
|
||
<!-- Custom Fonts --> | ||
<link href="//cdn.jsdelivr.net/npm/[email protected]/css/font-awesome.min.css" rel="stylesheet" type="text/css"> | ||
<link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'> | ||
|
@@ -75,4 +91,6 @@ | |
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> | ||
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> | ||
<![endif]--> | ||
|
||
|
||
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<section class="article-container"> | ||
<!-- Back Home --> | ||
<%- partial('_partial/backhome') %> | ||
|
||
<!-- Page Header --> | ||
<header class="intro-header"> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> | ||
<div class="post-heading"> | ||
<h1> | ||
<%- item.title %> | ||
</h1> | ||
<hr> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</header> | ||
|
||
<!-- Post Content --> | ||
<article> | ||
<div class="container"> | ||
<div class="row"> | ||
<!-- Post Main Content --> | ||
<div class="post-content col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> | ||
<%- list_categories(site.categories, {orderby:'count'}) %> | ||
</div> | ||
|
||
<!-- Comments --> | ||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> | ||
<%- partial("_partial/comment.ejs") %> | ||
</div> | ||
</div> | ||
</div> | ||
</article> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<section class="article-container"> | ||
<!-- Back Home --> | ||
<%- partial('_partial/backhome') %> | ||
|
||
<!-- Page Header --> | ||
<header class="intro-header"> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> | ||
<div class="post-heading"> | ||
<h1> | ||
<%- item.title %> | ||
</h1> | ||
<hr> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</header> | ||
|
||
<!-- Post Content --> | ||
<article> | ||
<div class="container"> | ||
<div class="row"> | ||
<!-- Post Main Content --> | ||
<div class="post-content col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> | ||
<!-- <%- list_tags(site.tags, {orderby:1}) %> --> | ||
<%- tagcloud({orderby: 'count', order: 1, min_font: 0.8, max_font: 2, unit: 'em', amount: 40, show_count: true, class: 'tagcloud'}) %> | ||
</div> | ||
|
||
<!-- Comments --> | ||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> | ||
<%- partial("_partial/comment.ejs") %> | ||
</div> | ||
</div> | ||
</div> | ||
</article> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<script type="text/javascript"> | ||
console.log("© zchen9 🙋 2015-" + new Date().getFullYear()); | ||
console.log("© Timlzh 🙋 2022-" + new Date().getFullYear()); | ||
console.log("Welcome to my blog: https://timlzh.com"); | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
<%- partial('_partial/article-full', {item: page}) %> | ||
<% if (page.type === 'tags') { %> | ||
<%- partial('_partial/page-tags', {item: page}) %> | ||
<% } else if (page.type === 'categories') { %> | ||
<%- partial('_partial/page-categories', {item: page}) %> | ||
<% } else { %> | ||
<%- partial('_partial/article-full', {item: page}) %> | ||
<% } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!-- Main Content --> | ||
<section class="intro"> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> | ||
<% page.posts.each(function(item){ %> | ||
<%- partial('_partial/article-index', {item: item}) %> | ||
<% }); %> | ||
</div> | ||
</div> | ||
<!-- Pagination --> | ||
<%- partial('_partial/pagination') %> | ||
<!-- Search --> | ||
<%- partial('_partial/search') %> | ||
</div> | ||
</section> |
Oops, something went wrong.