Skip to content

Commit fa2b011

Browse files
author
Pavlo Kulyk
committed
feat: add GitHub button component and integrate into global header
1 parent 941974a commit fa2b011

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<template>
2+
<a
3+
href="https://github.com/devforth/adminforth/tree/main/live-demo/app"
4+
target="_blank"
5+
rel="noopener noreferrer"
6+
7+
>
8+
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-white mr-[-10px]" viewBox="0 0 24 24" fill="currentColor">
9+
<path d="M12 0.297C5.372 0.297 0 5.67 0 12.297c0 5.303 3.438 9.8 8.205 11.387.6.113.82-.258.82-.577v-2.234c-3.338.724-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.744.082-.729.082-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.834 2.807 1.304 3.492.997.108-.775.418-1.305.762-1.605-2.665-.303-5.466-1.332-5.466-5.931 0-1.31.467-2.381 1.235-3.221-.123-.303-.536-1.523.117-3.176 0 0 1.008-.322 3.3 1.23a11.52 11.52 0 013.003-.404c1.018.004 2.043.137 3.003.404 2.289-1.552 3.296-1.23 3.296-1.23.655 1.653.242 2.873.12 3.176.77.84 1.233 1.911 1.233 3.221 0 4.609-2.807 5.625-5.479 5.921.43.37.823 1.102.823 2.222v3.293c0 .319.218.694.825.576C20.565 22.092 24 17.598 24 12.297 24 5.67 18.627.297 12 .297z"/>
10+
</svg>
11+
</a>
12+
</template>

live-demo/app/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ new AdminForth({
4747
closable: true,
4848
// title: 'Support us for free',
4949
}
50+
},
51+
globalInjections: {
52+
header: [
53+
{
54+
file: '@/custom/GitHubButton.vue',
55+
meta: { thinEnoughToShrinkHeader: true }
56+
}
57+
]
5058
}
5159
},
5260

0 commit comments

Comments
 (0)