init
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<meta charset="utf-8" >
|
||||
<title><%= siteTitle %></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.5">
|
||||
|
||||
<link rel="shortcut icon" href="<%= themeConfig.domain %>/favicon.ico?v=<%= site.utils.now %>">
|
||||
<link rel="stylesheet" href="<%= themeConfig.domain %>/media/css/highlight/xcode.min.css">
|
||||
<link rel="stylesheet" href="<%= themeConfig.domain %>/media/css/bootstrap/bootstrap-tooltips.css">
|
||||
|
||||
<% if (isHome) { %>
|
||||
<link rel="stylesheet" href="<%= themeConfig.domain %>/media/css/bootstrap/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="<%= themeConfig.domain %>/media/css/bootstrap/bootstrap-theme.min.css">
|
||||
<link rel="stylesheet" href="<%= themeConfig.domain %>/media/css/home.css?v=3">
|
||||
<% } else { %>
|
||||
<link rel="stylesheet" href="<%= themeConfig.domain %>/media/css/post.css?v=3">
|
||||
<% } %>
|
||||
|
||||
<script src="<%= themeConfig.domain %>/media/js/jquery.min.js" type="text/javascript"></script>
|
||||
<link rel="alternate" href="/atom.xml" title="<%= siteTitle %>" type="application/atom+xml">
|
||||
@@ -0,0 +1,17 @@
|
||||
<div class="pagination-container">
|
||||
<% if (pagination.prev) { %>
|
||||
<% if (pagination.prev.lastIndexOf('/') === pagination.prev.length-1) { %>
|
||||
<a href="<%= pagination.prev %>" class="prev"><i class="icon-arrow-ios-back-outline"></i> 上一页</a>
|
||||
<% } else { %>
|
||||
<a href="<%= pagination.prev %>/" class="prev"><i class="icon-arrow-ios-back-outline"></i> 上一页</a>
|
||||
<% } %>
|
||||
|
||||
<% } %>
|
||||
<% if (pagination.next) { %>
|
||||
<% if (pagination.next.lastIndexOf('/') === pagination.next.length-1) { %>
|
||||
<a href="<%= pagination.next %>" class="next">下一页 <i class="icon-arrow-ios-forward-outline"></i></a>
|
||||
<% } else { %>
|
||||
<a href="<%= pagination.next %>/" class="next">下一页 <i class="icon-arrow-ios-forward-outline"></i></a>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<script src="<%= themeConfig.domain %>/media/js/highlight.min.js" type="text/javascript"></script>
|
||||
<script src="<%= themeConfig.domain %>/media/js/main.js?v=3" type="text/javascript"></script>
|
||||
<script src="<%= themeConfig.domain %>/media/js/bootstrap/bootstrap.min.js" type="text/javascript"></script>
|
||||
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<%- include('./_blocks/head', { isHome: false,siteTitle: `文章归档 | ${themeConfig.siteName}` }) %>
|
||||
<meta name="description" content="<%= themeConfig.siteDescription %>">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
if (/mobile/i.test(navigator.userAgent) || /android/i.test(navigator.userAgent)) {
|
||||
document.body.classList.add('mobile')
|
||||
}
|
||||
</script>
|
||||
<div>
|
||||
<div class="inner">
|
||||
<h2>文章归档</h2>
|
||||
<% let years = []; posts.forEach((item) => {
|
||||
const year = item.date.substring(0, 4);
|
||||
if (!years.includes(year)) {
|
||||
years.push(year);
|
||||
}
|
||||
}); %>
|
||||
|
||||
<% years.forEach(function(year) { %>
|
||||
<h3><%- year %></h3>
|
||||
<% posts.forEach(function(post) { %>
|
||||
<% if (post.date.indexOf(year) !== -1) { %>
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item title">
|
||||
<a href="<%= post.link %>" target="_self"><%= post.title %></a>
|
||||
<div class="word-count2"><%= post.stats.words %>字</div>
|
||||
<div class="date" style="color:darkgray;font-size:80%"><%= post.dateFormat %></div>
|
||||
</li>
|
||||
</ul>
|
||||
<% } %>
|
||||
<% }); %>
|
||||
<% }); %>
|
||||
<h3> </h3>
|
||||
<%- include('./_blocks/pagination') %>
|
||||
<div style="text-align: right;">
|
||||
↶ <a href="/">返回首页</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%- include('./_blocks/scripts') %>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<%- include('./_blocks/head', { isHome: true,siteTitle: themeConfig.siteName }) %>
|
||||
<meta name="description" content="<%= themeConfig.siteDescription %>">
|
||||
<% if (site.customConfig.renderKaTeX) { %>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/katex.min.css">
|
||||
<% } %>
|
||||
</head>
|
||||
<body style="">
|
||||
<script type="text/javascript">
|
||||
if (/mobile/i.test(navigator.userAgent) || /android/i.test(navigator.userAgent)) {
|
||||
document.body.classList.add('mobile')
|
||||
}
|
||||
</script>
|
||||
<nav class="navbar navbar-default navbar-fixed-top" style="opacity:.9;" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse"
|
||||
data-target="#bs-example-navbar-collapse-1">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/"><%= themeConfig.siteName %></a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse" id="navbar-bs" style="height:1px;">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<% var i = 0; %>
|
||||
<% menus.forEach(function(menu) { %>
|
||||
<% i++; %>
|
||||
<% if (i === 1){ %>
|
||||
<li class="active">
|
||||
<% } else { %>
|
||||
<li>
|
||||
<% } %>
|
||||
<% if (menu.openType === 'External') { %>
|
||||
<a href="<%= menu.link %>" target="_blank">
|
||||
<%= menu.name %>
|
||||
</a>
|
||||
<% } else { %>
|
||||
<a href="<%= menu.link %>" target="_self">
|
||||
<%= menu.name %>
|
||||
</a>
|
||||
<% } %>
|
||||
<% }); %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div>
|
||||
<div class="outer">
|
||||
<ul class="list-group">
|
||||
<% posts.forEach(function(post) { %>
|
||||
<li class="list-group-item title">
|
||||
<div class="date"><%= post.dateFormat %></div>
|
||||
<a href="<%= post.link %>" target="_self"><%= post.title %></a>
|
||||
<div class="word-count"><%= post.stats.words %>字</div>
|
||||
</li>
|
||||
<% }); %>
|
||||
</ul>
|
||||
<h5> </h5>
|
||||
<%- include('./_blocks/pagination') %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%- include('./_blocks/scripts') %>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<%- include('./_blocks/head', { isHome: false,siteTitle: themeConfig.siteName }) %>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
if (/mobile/i.test(navigator.userAgent) || /android/i.test(navigator.userAgent)) {
|
||||
document.body.classList.add('mobile')
|
||||
}
|
||||
</script>
|
||||
<div>
|
||||
<div class="inner">
|
||||
<h2><%= post.title %></h2>
|
||||
<%- post.content %>
|
||||
<h3> </h3>
|
||||
<% post.tags.forEach((tag) => { %>
|
||||
<a href="<%= tag.link %>">#<%= tag.name %></a>
|
||||
<% }); %>
|
||||
<div style="text-align: right;">
|
||||
↶ <a href="/">返回首页</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%- include('./_blocks/scripts') %>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<%- include('./_blocks/head', { isHome: false,siteTitle: `${tag.name} | ${themeConfig.siteName}` }) %>
|
||||
<meta name="description" content="<%= themeConfig.siteDescription %>">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
if (/mobile/i.test(navigator.userAgent) || /android/i.test(navigator.userAgent)) {
|
||||
document.body.classList.add('mobile')
|
||||
}
|
||||
</script>
|
||||
<div>
|
||||
<div class="inner">
|
||||
<h2><%= tag.name %></h2>
|
||||
<ul class="list-group">
|
||||
<% posts.forEach(function(post) { %>
|
||||
<li class="list-group-item title"><a href="<%= post.link %>" target="_self"><%= post.title %></a>
|
||||
<div class="word-count2"><%= post.stats.words %>字</div>
|
||||
<div class="date" style="color:darkgray;font-size:80%"><%= post.dateFormat %></div>
|
||||
</li>
|
||||
<% }); %>
|
||||
</ul>
|
||||
<h3> </h3>
|
||||
<%- include('./_blocks/pagination') %>
|
||||
<div style="text-align: right;">
|
||||
↶ <a href="/tags/">标签云</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%- include('./_blocks/scripts') %>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<%- include('./_blocks/head', { isHome:false,siteTitle: `标签云 | ${themeConfig.siteName}` }) %>
|
||||
<meta name="description" content="<%= themeConfig.siteDescription %>">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
if (/mobile/i.test(navigator.userAgent) || /android/i.test(navigator.userAgent)) {
|
||||
document.body.classList.add('mobile')
|
||||
}
|
||||
</script>
|
||||
<div>
|
||||
<div class="inner">
|
||||
<h2>标签云</h2>
|
||||
<% tags.forEach((tag) => { %>
|
||||
<% var size = 0; %>
|
||||
<% if (tag.count <= 5){ %>
|
||||
<% size = 12 + 0.7 * tag.count; %>
|
||||
<% }else if(tag.count <= 10){ %>
|
||||
<% size = 12 + 0.7 * 5 + 0.4 * (tag.count - 5); %>
|
||||
<% }else { %>
|
||||
<% size = 12 + 0.7 * 5 + 0.4 * 5 + 0.2 * (tag.count - 10); %>
|
||||
<% } %>
|
||||
<a href="<%= tag.link %>" style="font-size: <%= size %>px;"><%= tag.name %>(<%= tag.count %>)</a>
|
||||
<% }); %>
|
||||
<h3>列表</h3>
|
||||
<ul class="tag-list" itemprop="keywords">
|
||||
<% tags.forEach((tag) => { %>
|
||||
<li class="tag-list-item">
|
||||
<a class="tag-list-link" href="<%= tag.link %>" rel="tag">
|
||||
<%= tag.name %>
|
||||
</a>
|
||||
<span class="tag-list-count">
|
||||
<%= tag.count %>
|
||||
</span>
|
||||
</li>
|
||||
<% }); %>
|
||||
</ul>
|
||||
<h3> </h3>
|
||||
<p id="hitokoto">
|
||||
<div id="hitokoto_text" style="font-size: 90%;"></div>
|
||||
<div id="hitokoto_from" style="font-size: 50%;"></div>
|
||||
</p>
|
||||
<div style="text-align: right;">
|
||||
↶ <a href="/">返回首页</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
fetch('https://v1.hitokoto.cn')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
const hitokoto = document.querySelector('#hitokoto_text')
|
||||
const from = document.querySelector('#hitokoto_from')
|
||||
//hitokoto.href = `https://hitokoto.cn/?uuid=${data.uuid}`
|
||||
if( data.from_who){
|
||||
from.innerText = '————'+ data.from_who + '「'+data.from+'」'
|
||||
}else{
|
||||
from.innerText = '————'+ '「'+data.from+'」'
|
||||
}
|
||||
hitokoto.innerText = data.hitokoto
|
||||
})
|
||||
.catch(console.error)
|
||||
</script>
|
||||
<%- include('./_blocks/scripts') %>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user