Skip to content

Commit

Permalink
bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Ezgx committed Mar 11, 2023
1 parent 959a42b commit 19a37c7
Show file tree
Hide file tree
Showing 14 changed files with 115 additions and 289 deletions.
3 changes: 0 additions & 3 deletions layout/includes/footer.pug
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
a.footer-item(href="/about/") 关于我
a.footer-item(href="/archives") 文章归档
a.footer-item(href="/tags") 标签
.footer-group
h3.footer-title 友链
.footer-links#friend-links-in-footer
.footer-group
h3.footer-title 协议
.footer-links
Expand Down
3 changes: 3 additions & 0 deletions layout/includes/header/post-info.pug
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
- let comments = theme.comments
#post-info
.post-meta__tag-list
each item, index in page.tags.data
a(href=url_for(item.path)).post-meta__tags #[=item.name]
h1.post-title= page.title || _p('no_title')
if theme.post_edit.enable
a.post-edit-link(href=theme.post_edit.url + page.source title=_p('post.edit') target="_blank")
Expand Down
12 changes: 0 additions & 12 deletions layout/includes/layout.pug
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,12 @@ html(lang=config.language data-theme=theme.display_mode class=htmlClassHideAside
link(rel='preload' as='font' type='font/ttf' href='/fonts/font.woff2' crossorigin='anonymous')
link(rel='stylesheet' href='https://cdn.jsdelivr.net/npm/[email protected]/packages/theme-chalk/lib/index.css')
script(async='' data-pjax='' src='/js/custom.js')
script(src='/js/tagsbar.js')
script(src='/js/random.js')
script(src='/js/funnytitle.js')
script(async='' src='https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.min.js')
script(async='' src='https://cdn.jsdelivr.net/npm/[email protected]/lib/index.js')
script(src='/js/fps.js')
script(async='' data-pjax='' src='/js/linksbar.js')
include ./head.pug
body
script(async='' data-pjax='' src='/js/custom.js')
script(src='/js/tagsbar.js')
script(src='/js/random.js')
script(src='/js/funnytitle.js')
script(async='' src='https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.min.js')
script(async='' src='https://cdn.jsdelivr.net/npm/[email protected]/lib/index.js')
script(src='/js/fps.js')
script(async='' data-pjax='' src='/js/linksbar.js')

if theme.preloader.enable
!=partial('includes/loading/index', {}, {cache: true})

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-dimension",
"version": "5.4.5",
"version": "5.4.8",
"description": "一个二次元风格的hexo主题",
"main": "package.json",
"scripts": {
Expand Down
30 changes: 13 additions & 17 deletions scripts/events/welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,18 @@ const logger = require('hexo-log')()
hexo.on('ready', () => {
const { version } = require('../../package.json')
logger.info(`
┏━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃~Browser~┃ ECX-UI - 1.3.0 ┃[+] ┃ [-] [□] [X] ┃
┣━━━━━━━━━┻━━━┳━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━┫
┃ECX-UI: ┃ ┃
┃ ├Rounded ┃ ██████╗ ██████╗ █═╗ █╗ █═╗ █═╗ ███████╗ ┃
┃ ├colorful ┃ █ ╔═══╝ █ ╔════╝ █╚╗ █╔╝ █ ║ █ ║ █ ╔═╝ ┃
┃ ├creatively ┃ █ ║ █ ║ █╣█╔╝ █ ║ █ ║ █ ║ ┃
┃ └wonderful ┃ ██████╗ █ ║ █ ╣ ███████████╗ █ ║ █ ║ █ ║ ┃
┃ ┃ █ ╔═══╝ █ ║ █╔█╚╗ ╚══════════╝ █ ║ █ ║ █ ║ ┃
┃ ┃ █ ║ █ ║ █╔╝ █╚╗ █ ║ █ ╚╗ █ ║ ┃
┃ ┃ ██████╗ ██████╗ █╔╝ █║ ██████╦█ ║ ███████╗ ┃
┃ ECX-UI: ┃ ╚═════╝ ╚═════╝ ╚╝ ╚╝ ╚═════╝╚═╝ ╚══════╝ ┃
┃ V - 1.3.0 ┃ butterfly : ${version}
┣━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃ dimension by Echocbx - https://ezgx.site/ ┃
┃ based-on--theme-butterfly - https://butterfly.js.org/ ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
██████ ██ ███ ███ ████████ ███ ██ ██████ ██ █████ ███ ██
██ ██ ██ ██ ██ ██ █ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ████ ██ ██ ██ ██ █ ██ ██ ██ ██ ████ ██ ██ ██ ██ ██
██ ██ ██ ██ ███ ██ ████████ ██ ██ ██ █████ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ █ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ █ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██████ ████ ██ ██ ████████ ██ ███ ██████ ████ █████ ██ ███
version:${version}
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
`)
})
13 changes: 10 additions & 3 deletions source/css/_custom/Ecx-UI.css
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ img {
}

::-webkit-scrollbar-thumb {
background-color: #49b1f5;
background-color: #ff7a7a;
background-image: -webkit-linear-gradient(
45deg,
rgba(255, 255, 255, 0.4) 25%,
Expand All @@ -554,7 +554,7 @@ img {

::-moz-selection {
color: #fff;
background-color: #49b1f5;
background-color: #ff7a7a;
}

/* 首页下滑小箭头 */
Expand Down Expand Up @@ -663,7 +663,14 @@ img {
#post .post-copyright {
box-shadow: 0px 0px 10px 6px #aaa;
}

a.post-meta__tags {
box-shadow: 0 0 0 2px #ff7a7a !important;
background: #ffffff !important;
border-radius: 10px !important;
margin-right: 10px !important;
color: #ff7a7a !important;
padding: 10px !important;
}

/* 帧率检测 */
#fps {
Expand Down
40 changes: 0 additions & 40 deletions source/js/bar.js

This file was deleted.

84 changes: 64 additions & 20 deletions source/js/custom.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,69 @@
PostActive()
topPostScroll()

//分类条
function PostActive(){
var urlinfo = window.location.pathname;
urlinfo = decodeURIComponent(urlinfo)
console.log(urlinfo);
//标题
var OriginTitile = document.title; // 保存之前页面标题
var titleTime;
document.addEventListener('visibilitychange', function(){
if (document.hidden){
document.title = '404 Not Found';
clearTimeout(titleTime);
}else{
document.title = '上当了吧哈哈!';
titleTime = setTimeout(function() {
document.title = OriginTitile;
}, 3000); // 3秒后恢复原标题
}
});

// 帧率
if (window.localStorage.getItem("fpson") == undefined || window.localStorage.getItem("fpson") == "1") {
var rAF = function () {
return (
window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
function (callback) {
window.setTimeout(callback, 1000 / 60);
}
);
}();
var frame = 0;
var allFrameCount = 0;
var lastTime = Date.now();
var lastFameTime = Date.now();
var loop = function () {
var now = Date.now();
var fs = (now - lastFameTime);
var fps = Math.round(1000 / fs);

lastFameTime = now;
// 不置 0,在动画的开头及结尾记录此值的差值算出 FPS
allFrameCount++;
frame++;

if (now > 1000 + lastTime) {
var fps = Math.round((frame * 1000) / (now - lastTime));
if (fps <= 5) {
var kd = `一秒一帧🤢`
} else if (fps <= 15) {
var kd = `非常难受😖`
} else if (fps <= 25) {
var kd = `较低帧率😨`
} else if (fps < 35) {
var kd = `不太流畅🙄`
} else if (fps <= 45) {
var kd = `还不错哦😁`
} else {
var kd = `十分流畅🤣`
}
document.getElementById("fps").innerHTML = `FPS:${fps} ${kd}`;
frame = 0;
lastTime = now;
};

rAF(loop);
}

//鼠标控制横向滚动
function topPostScroll(){
if (document.getElementById("recent-post-top")){
let xscroll = document.getElementById("recent-post-top");
xscroll.addEventListener("mousewheel", function (e) {
//计算鼠标滚轮滚动的距离
let v = -e.wheelDelta / 2;
xscroll.scrollLeft += v;
//阻止浏览器默认方法
e.preventDefault();
}, false);
}
loop();
} else {
document.getElementById("fps").style = "display:none!important"
}

var percentFlag = false; // 节流阀
Expand Down
61 changes: 0 additions & 61 deletions source/js/dust.js

This file was deleted.

49 changes: 0 additions & 49 deletions source/js/footer.js

This file was deleted.

Loading

0 comments on commit 19a37c7

Please sign in to comment.