mirror of
https://github.com/Kisechan/Mainpage.git
synced 2025-07-10 23:27:18 +00:00
添加源代码链接,修改链接打开方式
This commit is contained in:
23
src/App.vue
23
src/App.vue
@ -1,6 +1,9 @@
|
||||
<script setup>
|
||||
import NavBar from "./components/NavBar.vue";
|
||||
import AppFooter from "./components/AppFooter.vue";
|
||||
const openGitHubRepo = () => {
|
||||
window.open("https://github.com/Kisechan/Mainpage", "_self");
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -9,12 +12,17 @@ import AppFooter from "./components/AppFooter.vue";
|
||||
<transition name="fade" mode="out-in">
|
||||
<router-view />
|
||||
</transition>
|
||||
<el-tooltip content="查看本站源代码" placement="left" class="github-tooltip">
|
||||
<div class="github-corner" @click="openGitHubRepo">
|
||||
<i class="fa-solid fa-code"></i></div
|
||||
></el-tooltip>
|
||||
<AppFooter v-if="!$route.meta.hideFooter" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
html, body {
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
@ -39,4 +47,17 @@ html, body {
|
||||
.fade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.github-corner {
|
||||
position: fixed;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
font-size: 2em;
|
||||
cursor: pointer;
|
||||
color: var(--text-color);
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
.github-corner:hover {
|
||||
color: #409eff;
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user