Sponsor赞赏
原创大约 7 分钟约 1997 字...
VuePress-Theme-Hope主题,当在 行为选项 中设置
{ custom: true }
时,主题将通过@theme-hope
别名来引入组件,所以你可以利用这一点来替换主题的任何一个组件。
替换组件的方式
你需要在自己的 VuePress 配置文件通过 alias
替换主题中使用的组件别名。
具体步骤参考官方文档 替换组件的方式
本章要说的是对于 插槽利用,以实现 赞赏 的功能。
插槽利用
关于插槽的详细使用参考官方文档 插槽利用
有些组件提供了插槽,在这种情况下,你可以在覆盖组件时直接引入原组件,并通过插槽传入你需要的内容。通过这个特性可以实现传入赞赏组件。
插槽位置示例
常用插槽位置示例,详见 主布局插槽演示。
提供插槽的组件
主题:
AutoLink
:default
,before
,after
CommonWrapper
:default
,navbarStartBefore
,navbarStartAfter
,navbarCenterBefore
,navbarCenterAfter
,navbarEndBefore
,navbarEndAfter
,navScreenTop
,navScreenBottom
,sidebar
,sidebarTop
,sidebarBottom
HeroInfo
:heroImage
,heroInfo
,heroBg
heroInfo
插槽将接收text
tagline
和isFullScreen
属性。heroImage
插槽将接收image
imageDark
heroStyle
alt
和isFullScreen
属性。heroBg
插槽将接收image
bgStyle
和isFullScreen
属性。
HomePage
:top
,center
,bottom
NormalPage
:top
,contentBefore
,contentAfter
,bottom
,tocBefore
,tocAfter
博客:
ArticleItem
:title
,cover
,info
,excerpt
title
插槽将接收title
isEncrypted
和type
属性。excerpt
插槽将接收excerpt
属性。cover
插槽将接收cover
属性。info
插槽将接收info
属性。
BlogHero
:heroBg
,heroInfo
heroInfo
插槽将接收text
tagline
image
imageDark
heroStyle
alt
和isFullScreen
属性。heroBg
插槽将接收image
bgStyle
和isFullScreen
属性。
导航栏:
DropdownLink
:title
NavActions
:before
,after
Navbar
:startBefore
,startAfter
,centerBefore
,centerAfter
,endBefore
,endAfter
NavbarBrand
:default
NavScreen
:before
,after
NavScreenDropdown
:before
,after
侧边栏:
Sidebar
:top
,default
,bottom
TOC:
TOC
:before
,after
相关信息
对于每个插槽的对应位置和功能,请详见 主题源码 。
实现赞赏
思路
- 下载赞赏组件
Sponsor.vue
,添加到项目组件目录下。组件来自 Sponsor-Page 🙏 - 赞赏使用在所有页面,创建
Layout.vue
布局,覆盖掉主题默认同名Layout.vue
布局 - 将
Sponsor.vue
组件传入到Layout.vue
布局的NormalPage:contentAfter
中 - 在
.vuepress/client.ts
文件下,覆盖掉的默认的布局layouts:{ Layout }
1、组件添加到项目组件目录下
盒子小屋🏠 的赞赏组件放置在
.vuepress/components/layout
下。
赞赏组件
// .vuepress/components/layout/Sponsor.vue
<template>
<div class="sponsor">
<div id="drinks-box">
<div id="drinks-box-s" class="drinks-button left-100">
<div id="drinks-icons" class="left-100 tr3">
<div id="coffee-donate" class="icon-donate">
<span class="font-icon icon iconfont icon-hk-flutter"></span>
赞赏
</div>
</div>
<div id="drinks-button-box" class="tr3 left-100">
<div id="drinks-button-bg" class="left-100"></div>
<div id="github-box">
<!-- <a :href="githubLink" target="_blank">Github</a> -->
</div>
<ul id="donate-buttons" class="list tr3">
<li id="paypal_donate">
<a :href="paypalLink" target="_blank">Paypal</a>
</li>
<!-- <li id="btc_donate" class="donate-button">Bitcoin</li> -->
<li id="alipay_donate" class="donate-button">AliPay</li>
<li id="wechat_donate" class="donate-button2">WeChat</li>
</ul>
</div>
<div id="drinks-qrcodes" class="left-100 tr3" ref="drinksQrcodes">
<div id="drinks-qrcode"></div>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, reactive, computed, onMounted } from "vue";
import { useWindowSize } from "@theme-hope/composables/index";
const githubLink = "https://github.com/OrageKK/sponsor-page";
const paypalLink = "https://paypal.me/leekbox?country.x=C2&locale.x=zh_XC";
const qrCodes = reactive({
// btc_donate: "/assets/medias/BTCQR.png",
alipay_donate: "/assets/medias/AliPayQR.png",
wechat_donate: "/assets/medias/WeChanSQ.png",
alipay_donate_link: "https://qr.alipay.com/fkx121334smw1w13frg8h91",
});
const { isMobile } = useWindowSize();
onMounted(() => {
const drink_box_s = document.querySelector("#drinks-box-s");
const icon_donate = document.querySelector(".icon-donate");
const donate_button = document.querySelector(".donate-button");
const donate_button2 = document.querySelector(".donate-button2");
const donate_buttons = document.querySelector("#drinks-button-box");
const donate_button_bg = document.querySelector("#drinks-button-bg");
const drinks_qrcodes = document.querySelector("#drinks-qrcodes");
const drinks_qrcode = document.querySelector("#drinks-qrcode") as HTMLElement;
const drinks_an = {};
// 弹出菜单
drinks_an[0] = function () {
drink_box_s.classList.remove("donate-animation-2", "donate-animation-3");
drink_box_s.classList.add("donate-animation-1");
donate_buttons.classList.add("showBox");
setTimeout(() => {
donate_buttons.classList.remove("showBox");
}, 300);
// console.log("弹出菜单");
};
// 关闭菜单
drinks_an[1] = function () {
drink_box_s.classList.remove("donate-animation-1", "donate-animation-3");
drink_box_s.classList.add("donate-animation-2");
setTimeout(() => {
drink_box_s.classList.remove("donate-animation-2");
}, 300);
// console.log("关闭菜单");
};
// 展示二维码
drinks_an[2] = function () {
drink_box_s.classList.remove("donate-animation-2", "donate-animation-1");
drink_box_s.classList.add("donate-animation-3");
drinks_qrcodes.classList.add("showBox");
setTimeout(() => {
drinks_qrcodes.classList.remove("showBox");
}, 300);
// console.log("展示二维码");
};
// 关闭二维码
drinks_an[3] = function () {
drink_box_s.classList.remove("donate-animation-3", "donate-animation-2");
drink_box_s.classList.add("donate-animation-4");
setTimeout(() => {
drink_box_s.classList.remove("donate-animation-4");
drink_box_s.classList.add("donate-animation-1");
}, 300);
// console.log("关闭二维码");
};
icon_donate.addEventListener("click", drinks_an[0]);
donate_button_bg.addEventListener("click", drinks_an[1]);
donate_button.addEventListener("click", function (event: MouseEvent) {
const thisID = (event.target as HTMLElement).getAttribute("id");
if (isMobile.value && thisID === "alipay_donate") {
window.open(qrCodes["alipay_donate_link"]);
} else {
drinks_qrcode.style.backgroundImage = `url(${qrCodes[thisID]})`;
drinks_an[2]();
}
});
donate_button2.addEventListener("click", function (event: MouseEvent) {
const thisID = (event.target as HTMLElement).getAttribute("id");
if (isMobile.value && thisID === "alipay_donate") {
window.open(qrCodes["alipay_donate_link"]);
} else {
drinks_qrcode.style.backgroundImage = `url(${qrCodes[thisID]})`;
drinks_an[2]();
}
});
drinks_qrcode.addEventListener("click", drinks_an[3]);
});
</script>
<style lang="scss" scoped>
.icon-hk-flutter:before {
content: "\e668";
color: var(--theme-color);
margin-right: 5px;
}
img {
border-width: 0px;
}
a {
color: #000;
text-decoration: none;
outline: none;
border: none;
}
.list,
.list li,
.list-left li {
list-style: none;
list-style-type: none;
margin: 0px;
padding: 0px;
}
.pos-f {
position: fixed;
}
.left-100 {
width: 100%;
height: 100%;
float: left;
}
.blur {
-webkit-filter: blur(3px);
filter: blur(3px);
}
.tr3,
.list li {
transition: all 0.3s;
}
.hidden {
display: none;
}
.click-cursor,
.icon-donate,
.list li {
cursor: pointer;
}
#drinks-box .opacity-show {
opacity: 1;
}
.sponsor {
width: 100%;
height: 100px;
text-align: center;
position: relative;
// background-color: #fff;
}
#drinks-box {
width: 320px;
height: 100px;
text-align: center;
left: calc(50% - 160px);
top: calc(50% - 50px);
position: absolute;
// background-color: #62cdff;
}
#drinks-icons {
// background: no-repeat center center url(images/text.png);
}
.drinks-button>div {
position: absolute;
top: 0;
left: 0;
transition: all 0.3s;
transform-style: preserve-3d;
transform-origin: center center;
}
.icon-donate {
width: 80px;
height: 36px;
position: absolute;
left: calc(50% - 32px);
top: calc(50% - 18px);
border: solid 1.5px var(--theme-color);
border-radius: 18px;
display: flex;
align-items: center;
justify-content: center;
}
.icon-donate img {
max-width: 64px;
max-height: 64px;
}
#drinks-button-box {
display: none;
opacity: 0;
transform: scale(1.3, 1.3);
}
#drinks-button-bg {
position: absolute;
top: 0px;
left: 0;
height: 100px;
opacity: 0;
}
#donate-buttons {
position: absolute;
overflow: hidden;
top: calc(50% - 14px);
left: 50px;
height: 28px;
border-radius: 6px;
background-color: #62cdff;
box-shadow: 0 10px 20px 1px rgba(103, 207, 248, 0.5);
}
#donate-buttons a,
#github-box a {
display: block;
}
li[id$="_donate"] {
position: relative;
float: left;
width: 70px;
height: 28px;
line-height: 600px;
overflow: hidden;
cursor: pointer;
background: no-repeat center center;
background-size: 45px;
float: left;
text-align: center;
}
li[id$="_donate"]::after {
content: "";
position: absolute;
top: -5px;
left: calc(50% - 5px);
height: 0;
width: 0;
opacity: 0;
border: 5px solid #fff;
border-color: #fff transparent transparent transparent;
transition: all 0.3s;
}
li[id$="_donate"]:hover::after {
opacity: 1;
top: 0px;
}
#github-box {
width: 32px;
height: 32px;
position: absolute;
top: calc(50% - 16px);
background: no-repeat center center url(/assets/bgImage/github.svg);
background-size: contain;
right: 70px;
line-height: 600px;
overflow: hidden;
transform: rotatez(20deg);
opacity: 0;
transition: all 0.3s ease-out;
@media (max-width: hope-config.$tablet) {
top: calc(50% - 40px);
right: 70px;
transform: rotatez(5deg);
opacity: 0.8;
}
}
#drinks-button-box:hover #github-box {
top: calc(50% - 40px);
right: 70px;
transform: rotatez(5deg);
opacity: 0.8;
}
#paypal_donate {
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjIsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iUGF5UGFsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgdmlld0JveD0iMCAwIDUxMiAxNDUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDUxMiAxNDU7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+DQoJLnN0MHtmaWxsO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4zLTQuMiwwLjYtNS42LDAuOGMtNi4yLDAuOS0xMC42LDIuNy0xMy4zLDUuMmMtMi43LDIuNi00LDYuMy00LDExLjENCgkJCWMwLDUuMiwxLjMsOS4zLDQsMTIuMWMyLjcsMi44LDYuNSw0LjIsMTEuNSw0LjJjMy43LDAsNy0wLjcsOS44LTIuMXM1LjEtMy40LDYuOC02LjFjMCwxLjIsMC4yLDIuNCwwLjQsMy42YzAuMywxLDAuNiwyLDEuMSwyLjkNCgkJCWgxNC4zdi0yLjNDNTAxLjksMTMzLjIsNTAxLjEsMTMyLjUsNTAwLjcsMTMxLjR6IE00ODYuOSwxMTUuNmMwLDMuNy0xLjEsNi41LTMuMiw4LjZzLTUsMy4xLTguNywzLjFjLTIuMSwwLTMuOC0wLjYtNS0xLjcNCgkJCXMtMS44LTIuNi0xLjgtNC41YzAtMS44LDAuNC0zLjMsMS40LTQuM3MyLjctMS45LDUuMS0yLjZjMC4xLDAsMS42LTAuNCw0LjUtMXM1LjUtMS41LDcuNy0yLjVWMTE1LjZ6Ii8+DQoJCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik01MzEuMiw5NC40di05LjZoLTcuOXYtMTRoLTEzLjZ2MTRoLTYuOHY5LjZoNi44djI3LjdjMCw1LjgsMSw5LjYsMi45LDExLjZjMiwxLjksNS41LDIuOSwxMC44LDIuOQ0KCQkJYzAuNCwwLDEuNiwwLDMuMy0wLjFjMS43LTAuMSwzLjItMC4yLDQuNS0wLjJsMCwwdi0xMC4yaC0zLjNjLTEuOSwwLTMuMS0wLjItMy43LTAuNmMtMC42LTAuNS0wLjktMS4zLTAuOS0yLjdWOTQuNEw1MzEuMiw5NC40DQoJCQlMNTMxLjIsOTQuNHoiLz4NCgk8L2c+DQo8L2c+DQo8L3N2Zz4NCg==);
}
#drinks-qrcodes {
display: none;
}
#drinks-qrcode {
position: absolute;
top: calc(50% - 90px);
left: calc(50% - 90px);
width: 180px;
height: 180px;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
border-radius: 6px;
cursor: pointer;
box-shadow: 0 10px 20px rgba(103, 207, 248, 0.5);
}
/* 动画 */
#drinks-icons,
#drinks-button-box {
filter: blur(0px);
}
.donate-animation-1>#drinks-icons,
.donate-animation-4>#drinks-icons,
.donate-animation-3>#drinks-button-box {
transform: scale(0.7, 0.7);
filter: blur(2px);
display: block;
opacity: 1;
}
.donate-animation-1>#drinks-button-box,
.donate-animation-4>#drinks-button-box,
.donate-animation-3>#drinks-qrcodes {
display: block;
opacity: 1;
transform: scale(1, 1);
}
.donate-animation-2>#drinks-button-box,
.donate-animation-4>#drinks-qrcodes,
.hideBox {
display: block;
transform: scale(1, 1);
animation-name: hideBox;
animation-duration: 0.3s;
animation-timing-function: ease-in-out;
animation-iteration-count: 1;
animation-fill-mode: forwards;
}
.donate-animation-3>#drinks-icons {
transform: scale(0.4, 0.4);
filter: blur(2px);
}
.showBox {
animation-name: showBox;
animation-duration: 0.3s;
animation-timing-function: ease-in-out;
animation-iteration-count: 1;
animation-fill-mode: forwards;
}
@keyframes showBox {
from {
opacity: 0;
transform: scale(1.3, 1.3);
}
to {
opacity: 1;
transform: scale(1, 1);
}
}
@keyframes hideBox {
from {
opacity: 1;
transform: scale(1, 1);
}
to {
opacity: 0;
transform: scale(1.3, 1.3);
}
}</style>
Layout.vue
布局,将Sponsor.vue
组件传入
2、创建Layout布局
// .vuepress/components/layout/Layout.vue
<template>
<SkipLink />
<CommonWrapper>
<template #default>
<template v-if="frontmatter.home">
<HomePage v-if="frontmatter.home" />
</template>
<template v-else>
<FadeSlideY>
<NormalPage :key="page.path">
<template #contentAfter>
<Sponsor />
</template>
</NormalPage>
</FadeSlideY>
</template>
</template>
<template v-if="sidebarDisplay !== 'none'" #navScreenBottom>
<BloggerInfo />
</template>
<template v-if="!isMobile && sidebarDisplay === 'always'" #sidebar>
<BloggerInfo />
</template>
</CommonWrapper>
</template>
<script setup lang="ts">
import { usePageData, usePageFrontmatter } from "@vuepress/client";
import { computed, onMounted, h, resolveComponent } from "vue";
import CommonWrapper from "@theme-hope/components/CommonWrapper";
import BloggerInfo from "@theme-hope/modules/blog/components/BloggerInfo";
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 Sponsor from "./Sponsor.vue";
import {
useThemeData,
useThemeLocaleData,
useWindowSize,
} from "@theme-hope/composables/index";
declare const ENABLE_BLOG : boolean
const themeData = useThemeData();
const themeLocale = useThemeLocaleData();
const page = usePageData();
const frontmatter = usePageFrontmatter();
const { isMobile } = useWindowSize();
const sidebarDisplay = computed(() =>
ENABLE_BLOG
? themeLocale.value.blog?.sidebarDisplay ||
themeData.value.blog?.sidebarDisplay ||
"mobile"
: "none"
);
</script>
client.ts
文件下,覆盖掉的默认的布局
3、在覆盖布局
// .vuepress/client.ts
import { defineClientConfig } from "@vuepress/client";
import { setupRunningTimeFooter } from "vuepress-theme-hope/presets/footerRunningTime.js";
import "vuepress-theme-hope/presets/bounce-icon.scss";
import Layout from "./components/layout/Layout.vue";
export default defineClientConfig({
layouts: {
Layout,
},
setup() {
setupRunningTimeFooter(
new Date("2023-09-01"),
{
"/": "已运行 :day 天 :hour 小时 :minute 分钟 :second 秒",
},
true,
);
},
});
赞赏
你认为这篇文章怎么样?
- 0
- 0
- 0
- 0
- 0
- 0