Skip to content

Commit 6294d9d

Browse files
committed
docs: add buy me a coffee
1 parent cb72623 commit 6294d9d

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

packages/docs-site/docs/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export default {
88
ANALYTICS_ID: 'G-L74NT4DL5X',
99
ORIGIN_PROD: 'https://hetree.phphe.com', // production host name
1010
GIT_NAME: 'phphe/he-tree',
11+
DONATE_URL: 'https://www.paypal.com/paypalme/phphe',
1112
VERSION: '2.x',
1213
MENU: [
1314
{
3.18 KB
Loading

packages/docs-site/src/layouts/default_layout.vue

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
.shadow.rounded.text-sm
3535
Anchor.block.py-2.px-3(v-for="item in versions" class="hover:bg-gray-100" :to="item.homePath") {{$t(item.version)}}
3636
Anchor.main-menu-item(:to="githubURL" v-if="githubURL") Github
37+
Anchor.main-menu-item.buy-me-coffee(v-if="DONATE_URL" :to="DONATE_URL")
38+
img(alt="Buy me a coffee" :src="coffeeImg")
39+
span Buy me a coffee
3740
//- Anchor.main-menu-item(v-if="config.IS_DEVLOPMENT" @click="reloadRouteView()") Reload Route
3841
//- .flex-shrink-0.py-2.text-center
3942
.main-right.flex-grow.overflow-auto.relative()
@@ -69,6 +72,7 @@ import SearchModal from '../parts/SearchModal.vue'
6972
import { mdiMenu, mdiSearch } from 'mdi-js/filled'
7073
import { useRouter } from 'vue-router'
7174
import GithubButton from 'vue-github-button'
75+
import coffeeImg from "../assets/img/coffee.jpg";
7276
7377
export default defineComponent({
7478
components: { DocsMenuItem, SearchModal, GithubButton },
@@ -90,6 +94,8 @@ export default defineComponent({
9094
version,
9195
homeUrl,
9296
githubURL,
97+
DONATE_URL: config.DONATE_URL,
98+
coffeeImg,
9399
}
94100
},
95101
data() {
@@ -143,4 +149,15 @@ export default defineComponent({
143149
.main-search-icon {
144150
align-self: flex-end;
145151
}
152+
153+
.buy-me-coffee {
154+
color: #2a2a2a;
155+
background-color: #e4d7c5;
156+
@apply flex items-center;
157+
158+
img {
159+
width: 50px;
160+
margin-right: 10px;
161+
}
162+
}
146163
</style>

0 commit comments

Comments
 (0)