-
-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
885d3bc
commit b50ea5c
Showing
102 changed files
with
2,072 additions
and
2,020 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
import { defineClientConfig } from "@vuepress/client"; | ||
import { ColorIcon } from "./components/ColorIcon.js"; | ||
import RfrSlot from "./layouts/RfrSlot.vue"; | ||
|
||
export default defineClientConfig({ | ||
enhance: ({ app }) => { | ||
app.component("ColorIcon", ColorIcon); | ||
}, | ||
layouts: { RfrSlot}, | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<script setup lang="ts"> | ||
import { usePageData, usePageFrontmatter } from "@vuepress/client"; | ||
import { ref, watch } from "vue"; | ||
import { useRoute } from "vue-router"; | ||
import CommonWrapper from "@theme-hope/components/CommonWrapper"; | ||
import HomePage from "@theme-hope/components/HomePage"; | ||
import NormalPage from "@theme-hope/components/NormalPage"; | ||
import SkipLink from "@theme-hope/components/SkipLink"; | ||
import FadeSlideY from "@theme-hope/components/transitions/FadeSlideY"; | ||
import type { ThemePageFrontmatter } from "../../shared/index.js"; | ||
const page = usePageData(); | ||
const frontmatter = usePageFrontmatter<ThemePageFrontmatter>(); | ||
const route = useRoute(); | ||
const sidebarTopArray = [ | ||
`<a href="https://jetbrains.com" target="_blank"> | ||
<img className="no-zoom" height="50px" width="220px" src="/img/IntelliJ_IDEA.svg"> | ||
</a>`, | ||
]; | ||
const sidebarContent = ref(""); | ||
function shuffle(arr) { | ||
var l = arr.length; | ||
var index, temp; | ||
while (l > 0) { | ||
index = Math.floor(Math.random() * l); | ||
temp = arr[l - 1]; | ||
arr[l - 1] = arr[index]; | ||
arr[index] = temp; | ||
l--; | ||
} | ||
return arr; | ||
} | ||
watch( | ||
() => route.path, | ||
() => { | ||
if (route.path.startsWith("/en/")) { | ||
sidebarContent.value = ""; | ||
return; | ||
} | ||
shuffle(sidebarTopArray); | ||
sidebarContent.value = `\ | ||
<div style="width:230px;margin:0 auto"> | ||
${sidebarTopArray.slice(0, 4).join("\n ")} | ||
<br/> | ||
<span style='color: grey;font-size: 11px;'>广告采用随机方式显示</span> | ||
<span style='float: right;'> | ||
<a href='/fast-request/guide/sponsor.html' style='color: var(--theme-color);font-size: 11px;font-weight: bolder;'>成为赞助商</a> | ||
</span> | ||
</div> | ||
`; | ||
}, | ||
); | ||
</script> | ||
<template> | ||
<SkipLink /> | ||
<CommonWrapper> | ||
<template #default> | ||
<HomePage v-if="frontmatter.home" /> | ||
<FadeSlideY v-else> | ||
<NormalPage :key="page.path" /> | ||
</FadeSlideY> | ||
</template> | ||
<template v-if="!frontmatter.home" #sidebarTop> | ||
<div v-html="sidebarContent" /> | ||
</template> | ||
</CommonWrapper> | ||
</template> |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.