Skip to content

Commit

Permalink
Ver 0.7.5: 你说的对,但是
Browse files Browse the repository at this point in the history
  • Loading branch information
Shiroiame-Kusu committed Apr 22, 2023
1 parent c643199 commit 15579a3
Show file tree
Hide file tree
Showing 5 changed files with 373 additions and 11 deletions.
6 changes: 3 additions & 3 deletions docs/.vitepress/cache/deps/_metadata.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"hash": "1299b720",
"browserHash": "7ad6e02f",
"hash": "3db74797",
"browserHash": "52b1ca27",
"optimized": {
"vue": {
"src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "8656d956",
"fileHash": "28833c94",
"needsInterop": false
}
},
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default defineConfig({
title: 'Fuukei 周边文档',
head:[
['link', { rel: 'icon', href: 'https://s.nmxc.ltd/fuukei_docs/sakurairo/favicon.ico' }],
["script", { src: './js/main.js'}]
["script", { src: '/js/main.js'}]
],
themeConfig: {
logo: 'https://s.nmxc.ltd/fuukei_docs/sakurairo/icon.png',
Expand Down
28 changes: 27 additions & 1 deletion docs/public/js/main.js
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
var demo = document.getElementsByClassName("Demo")
var demo = document.getElementsByClassName("Demo")
function handleRouting() {
var AccessPath = window.location.pathname;
switch (AccessPath){
case '/secret':
var ClassChange = document.getElementsByClassName('NotFound')[0];
ClassChange.getElementsByClassName('code')[0].innerHTML = "000"
ClassChange.getElementsByClassName('title')[0].innerHTML = "你不该来这里"
fetch('https://v1.hitokoto.cn?min_length=20&max_length=32')
.then(response => response.json())
.then(data => {
ClassChange.getElementsByClassName('quote')[0].innerHTML = data.hitokoto + ' ---- '+ data.from
})
.catch(console.error)

ClassChange.getElementsByClassName('action')[0].getElementsByClassName('link')[0].innerHTML = "回头吧,孩子"
break;
case '/secret.html':
break;
default:
break;
}
}

handleRouting();

window.addEventListener("hashchange", handleRouting)
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"docs:serve": "vitepress serve docs"
},
"dependencies": {
"jsdom": "^21.1.1",
"rollup": "^3.9.0",
"yarn": "^1.22.19"
},
Expand Down
Loading

0 comments on commit 15579a3

Please sign in to comment.