Browse Source

Update

master
186526 7 months ago
parent
commit
c1d8b42b3a
Signed by: 186526 GPG Key ID: C7EB1E6B8CC5E51D
6 changed files with 57 additions and 42 deletions
  1. 20
      themes/suka/README.md
  2. 2
      themes/suka/layout/_pages/links.ejs
  3. 59
      themes/suka/layout/_partial/footer.ejs
  4. 2
      themes/suka/layout/_plugin/comment/valine/main.ejs
  5. 11
      themes/suka/scripts/index.js
  6. 5
      vercel.json

20
themes/suka/README.md

@ -6,16 +6,16 @@
> 现代 · 强大 · 简洁
<p align="center">
<img alt="Version" src="https://img.shields.io/github/v/release/sukkaw/hexo-theme-suka?color=%235755d9&include_prereleases&label=version&style=flat-square">
<a href="https://skk.moe" target="_blank"><img alt="Author" src="https://img.shields.io/badge/Author-Sukka-b68469.svg?style=flat-square"/></a>
<a href="https://hexo.io" target="_blank"><img alt="Hexo" src="https://img.shields.io/badge/hexo-4.0+-0e83cd.svg?style=flat-square"/></a>
<a href="https://nodejs.org/" target="_blank"><img alt="node.js" src="https://img.shields.io/badge/node.js-10%2B-43853d.svg?style=flat-square"/></a>
<img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/sukkaw/hexo-theme-suka?style=flat-square">
<img alt="Version" src="https://img-shields-io.186526.xyz/github/v/release/sukkaw/hexo-theme-suka?color=%235755d9&include_prereleases&label=version&style=flat-square">
<a href="https://skk.moe" target="_blank"><img alt="Author" src="https://img-shields-io.186526.xyz/badge/Author-Sukka-b68469.svg?style=flat-square"/></a>
<a href="https://hexo.io" target="_blank"><img alt="Hexo" src="https://img-shields-io.186526.xyz/badge/hexo-4.0+-0e83cd.svg?style=flat-square"/></a>
<a href="https://nodejs.org/" target="_blank"><img alt="node.js" src="https://img-shields-io.186526.xyz/badge/node.js-10%2B-43853d.svg?style=flat-square"/></a>
<img alt="GitHub repo size" src="https://img-shields-io.186526.xyz/github/repo-size/sukkaw/hexo-theme-suka?style=flat-square">
<br>
<a href="https://travis-ci.org/SukkaW/hexo-theme-suka"><img alt="Build Status" src="https://img.shields.io/travis/SukkaW/hexo-theme-suka.svg?style=flat-square"/></a>
<a href="https://www.codacy.com/app/SukkaW/hexo-theme-suka" target="_blank"><img alt="Codacy Badge" src="https://img.shields.io/codacy/grade/273f45610882413aad88396e06bfa6ec.svg?style=flat-square"></a>
<a href="https://david-dm.org/SukkaW/hexo-theme-suka" target="_blank"><img alt="Dependency Status" src="https://img.shields.io/david/SukkaW/hexo-theme-suka.svg?style=flat-square"></a>
<a href="https://david-dm.org/SukkaW/hexo-theme-suka#info=devDependencies" target="_blank"><img alt="devDependency Status" src="https://img.shields.io/david/dev/SukkaW/hexo-theme-suka.svg?style=flat-square"></a>
<a href="https://travis-ci.org/SukkaW/hexo-theme-suka"><img alt="Build Status" src="https://img-shields-io.186526.xyz/travis/SukkaW/hexo-theme-suka.svg?style=flat-square"/></a>
<a href="https://www.codacy.com/app/SukkaW/hexo-theme-suka" target="_blank"><img alt="Codacy Badge" src="https://img-shields-io.186526.xyz/codacy/grade/273f45610882413aad88396e06bfa6ec.svg?style=flat-square"></a>
<a href="https://david-dm.org/SukkaW/hexo-theme-suka" target="_blank"><img alt="Dependency Status" src="https://img-shields-io.186526.xyz/david/SukkaW/hexo-theme-suka.svg?style=flat-square"></a>
<a href="https://david-dm.org/SukkaW/hexo-theme-suka#info=devDependencies" target="_blank"><img alt="devDependency Status" src="https://img-shields-io.186526.xyz/david/dev/SukkaW/hexo-theme-suka.svg?style=flat-square"></a>
</p>
## Contents 目录
@ -101,7 +101,7 @@ Authored and maintained by Sukka with help from contributors ([list](https://git
## License 许可证
[![license](https://img.shields.io/github/license/sukkaw/hexo-theme-suka.svg?style=flat-square)](./LICENSE)
[![license](https://img-shields-io.186526.xyz/github/license/sukkaw/hexo-theme-suka.svg?style=flat-square)](./LICENSE)
Open sourced under the GPL v3.0 license.

2
themes/suka/layout/_pages/links.ejs

@ -15,7 +15,7 @@
<div class="tile-title link-title"><%= i %></div>
<div class="tile-subtitle link-descr text-gray"><%- site.data.links[i].text %></div>
<% if(site.data.links[i].text!="点我申请友链") { %>
<img alt="Website" src="https://img.shields.io/website?down_color=critical&down_message=Offline&up_color=success&up_message=Online&url=<%= encodeURIComponent(site.data.links[i].url) %>">
<img alt="Website" src="https://img-shields-io.186526.xyz/website?down_color=critical&down_message=Offline&up_color=success&up_message=Online&url=<%= encodeURIComponent(site.data.links[i].url) %>">
<% } %>
</div>
</div>

59
themes/suka/layout/_partial/footer.ejs

@ -1,25 +1,35 @@
<footer class="text-center">
<!-- footer copyright -->
<%- fragment_cache('footer_copyright_text', () => {
return `
<p class="footer-copyright mb-0">Copyright&nbsp;©&nbsp;<span id="copyright-year"></span>
<a class="footer-copyright-a" href="${config.url}">${config.title}</a>
</p>`
}) %>
<!-- footer custom text -->
<p class="footer-text mb-0">
<%- fragment_cache('footer_custom_text', () => {
if (theme.footer.custom_text) {
if (Array.isArray(theme.footer.custom_text)) {
return theme.footer.custom_text.join('<br>');
} else {
return theme.footer.custom_text;
}
}
}) %>
<p class="footer-develop">
<img alt="Keybase PGP" src="https://img-shields-io.186526.xyz/keybase/pgp/186526">
<img alt="Update Commit" src="https://img-shields-io.186526.xyz/badge/commit-<%= globalThis.commitID %> -blue">
<img alt="Latest Update" src="https://img-shields-io.186526.xyz/date/<%= globalThis.commitTime %>?color=sucessful&label=latest%20update">
</p>
<!-- footer develop info -->
<p class="footer-develop">
<img alt="Chromium HSTS preload" src="https://img-shields-io.186526.xyz/hsts/preload/186526.xyz">
<img alt="Uptime Robot ratio (30 days)" src="https://img-shields-io.186526.xyz/uptimerobot/ratio/m786767673-4547971a4f2fb0da2156d1d4">
<img alt="Security Headers" src="https://img-shields-io.186526.xyz/security-headers?url=https%3A%2F%2Fblog.186526.xyz">
</p>
<!-- footer copyright -->
<%- fragment_cache('footer_copyright_text', () => {
return `
<p class="footer-copyright mb-0">Copyright&nbsp;©&nbsp;<span id="copyright-year"></span>
<a class="footer-copyright-a" href="${config.url}">${config.title}</a>
</p>`
}) %>
<!-- footer custom text -->
<p class="footer-text mb-0">
<%- fragment_cache('footer_custom_text', () => {
if (theme.footer.custom_text) {
if (Array.isArray(theme.footer.custom_text)) {
return theme.footer.custom_text.join('<br>');
} else {
return theme.footer.custom_text;
}
}
}) %>
</p>
<!-- footer develop info -->
<p class="footer-develop mb-0">
<%- fragment_cache('footer_counter_text', () => {
if (theme.busuanzi.enable) return partial('_plugin/busuanzi/footer_counter');
@ -34,15 +44,6 @@
--><a href="https://github.com/SukkaW/hexo-theme-suka" target="_blank" class="footer-develop-a" rel="external noopener">Suka</a>
</p>
<br>
<p class="footer-develop">
<img alt="Keybase PGP" src="https://img.shields.io/keybase/pgp/186526">
</p>
<p class="footer-develop">
<img alt="Chromium HSTS preload" src="https://img.shields.io/hsts/preload/186526.xyz">
<img alt="Uptime Robot ratio (30 days)" src="https://img.shields.io/uptimerobot/ratio/m786767673-4547971a4f2fb0da2156d1d4">
<img alt="Security Headers" src="https://img.shields.io/security-headers?url=https%3A%2F%2Fblog.186526.xyz">
<img alt="Latest Update" src="https://img.shields.io/date/<%= Math.round(new Date() / 1000) %>?color=sucessful&label=Latest%20Update">
</p>
</footer>

2
themes/suka/layout/_plugin/comment/valine/main.ejs

@ -14,7 +14,7 @@
var verify = '<%= theme.comment.valine_verify %>' === 'true';
function valinenow(){
var a = document.createElement("script"),d = document;
a.src = "https://cdn.jsdelivr.net/npm/@waline/[email protected]3/dist/Waline.min.js";
a.src = "https://cdn.jsdelivr.net/npm/@waline/[email protected]8/dist/Waline.min.js";
(d.head || d.body).appendChild(a);
whenAvailable("Waline", () => {
const Valine = Waline;

11
themes/suka/scripts/index.js

@ -21,6 +21,17 @@ require('../includes/generator/search')(hexo);
// Filter
require('../includes/filter/prism')(hexo);
const { exec } = require('child_process');
globalThis.exec = exec;
exec('git rev-parse --short HEAD', (err, stdout, stderr) => {
globalThis.commitID = stdout;
console.log(`CommitID: ${stdout}`);
})
exec('git log --pretty=format:"%ct" HEAD -1',(err,stdout, stderr)=>{
globalThis.commitTime = stdout;
console.log(`CommitTime: ${stdout}`);
})
// Debug helper
hexo.extend.helper.register('console', function () {

5
vercel.json

@ -22,7 +22,10 @@
"X-Frame-Options":"SAMEORIGIN",
"Referrer-Policy":"same-origin",
"Content-Security-Policy":"default-src 'unsafe-inline' https: 'self' cdn.jsdelivr.net *.186526.xyz *.186526.top *.186stat.us fonts.gstatic.com *.googletagmanager.com *.google.com; img-src * data: 'unsafe-inline' ; media-src * 'unsafe-inline'",
"X-XSS-Protection": "1; mode=block"
"X-XSS-Protection": "1; mode=block",
"X-Powered-By": "Sw2Express",
"X-Served-By": "Sw2Express",
"X-Generate-By": "Drone CI"
},
"continue": true
}
Loading…
Cancel
Save