Skip to content

Commit bd7555c

Browse files
committed
fix: fixed config, packages, and twitter social button
1 parent ae5339e commit bd7555c

File tree

6 files changed

+8291
-14204
lines changed

6 files changed

+8291
-14204
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<template>
2+
<svg
3+
version="1.1"
4+
id="Logo"
5+
xmlns="http://www.w3.org/2000/svg"
6+
xmlns:xlink="http://www.w3.org/1999/xlink"
7+
x="0px"
8+
y="0px"
9+
viewBox="0 0 248 204"
10+
style="enable-background: new 0 0 248 204"
11+
xml:space="preserve"
12+
>
13+
<g id="Logo_1_">
14+
<path
15+
id="white_background"
16+
class="st0"
17+
d="M221.95,51.29c0.15,2.17,0.15,4.34,0.15,6.53c0,66.73-50.8,143.69-143.69,143.69v-0.04
18+
C50.97,201.51,24.1,193.65,1,178.83c3.99,0.48,8,0.72,12.02,0.73c22.74,0.02,44.83-7.61,62.72-21.66
19+
c-21.61-0.41-40.56-14.5-47.18-35.07c7.57,1.46,15.37,1.16,22.8-0.87C27.8,117.2,10.85,96.5,10.85,72.46c0-0.22,0-0.43,0-0.64
20+
c7.02,3.91,14.88,6.08,22.92,6.32C11.58,63.31,4.74,33.79,18.14,10.71c25.64,31.55,63.47,50.73,104.08,52.76
21+
c-4.07-17.54,1.49-35.92,14.61-48.25c20.34-19.12,52.33-18.14,71.45,2.19c11.31-2.23,22.15-6.38,32.07-12.26
22+
c-3.77,11.69-11.66,21.62-22.2,27.93c10.01-1.18,19.79-3.86,29-7.95C240.37,35.29,231.83,44.14,221.95,51.29z"
23+
/>
24+
</g>
25+
</svg>
26+
</template>
27+
28+
<style scoped>
29+
.st0 {
30+
fill: #ffffff;
31+
}
32+
</style>
Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,47 @@
11
<template>
2-
<div>
3-
<a
4-
href="https://twitter.com/kirorisk?ref_src=twsrc%5Etfw"
5-
class="twitter-follow-button"
6-
data-size="large"
7-
data-show-screen-name="false"
8-
data-dnt="true"
9-
data-show-count="false"
10-
>Follow</a
11-
>
12-
<script
13-
async
14-
src="https://platform.twitter.com/widgets.js"
15-
charset="utf-8"
16-
></script>
17-
</div>
2+
<a :href="fullyQualifiedHref" class="twitter-btn">
3+
<TwitterBird class="twitter-bird" /> Follow
4+
</a>
185
</template>
196

20-
<script lang="ts">
21-
export default {
22-
name: 'TwitterFollow'
23-
}
7+
<script setup lang="ts">
8+
import { ref } from 'vue'
9+
10+
import TwitterBird from './TwitterBird.vue'
11+
12+
const url = new URL('https://twitter.com/intent/follow')
13+
url.searchParams.append('original_referer', window.location.href)
14+
url.searchParams.append(
15+
'ref_src',
16+
encodeURIComponent('twsrc^tfw|twcamp^buttonembed|twterm^follow|twgr^kirorisk')
17+
)
18+
url.searchParams.append('region', 'follow_link')
19+
url.searchParams.append('screen_name', 'kirorisk')
20+
21+
const fullyQualifiedHref = ref(url.toString())
2422
</script>
23+
24+
<style scoped>
25+
.twitter-bird {
26+
height: 12px;
27+
}
28+
29+
.twitter-btn {
30+
font-size: 12px;
31+
position: relative;
32+
height: 28px;
33+
box-sizing: border-box;
34+
padding: 1px 12px 1px 12px;
35+
background-color: #1d9bf0;
36+
color: #fff;
37+
border-radius: 9999px;
38+
font-weight: bolder;
39+
cursor: pointer;
40+
visibility: visible;
41+
width: 86px;
42+
display: flex;
43+
align-items: center;
44+
justify-content: stretch;
45+
gap: 4px;
46+
}
47+
</style>

docs/.vuepress/config.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
import tabsPlugin from '@snippetors/vuepress-plugin-tabs'
2+
import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics'
13
import { pwaPlugin } from '@vuepress/plugin-pwa'
24
import { registerComponentsPlugin } from '@vuepress/plugin-register-components'
5+
import { defaultTheme } from '@vuepress/theme-default'
36
import {
47
defineUserConfig,
58
HeadAttrsConfig,
@@ -10,11 +13,6 @@ import {
1013
type HeadTagEmpty
1114
} from 'vuepress'
1215

13-
import { defaultTheme } from '@vuepress/theme-default'
14-
15-
import tabsPlugin from '@snippetors/vuepress-plugin-tabs'
16-
import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics'
17-
1816
const GA_MEASUREMENT_ID = 'UA-82107035-1'
1917
const GOOGLE_SITE_VERIFICATION = '4nm40QLVcDJmEJSAbrMfZ7fpBJZIXL1oSngBAYrZopY'
2018
//const GOOGLE_AD_CLIENT_ID = 'ca-pub-3734944050099256'
@@ -111,7 +109,7 @@ function getHead(): HeadConfig[] {
111109
'144x144',
112110
'152x152',
113111
'180x180'
114-
].flatMap<[HeadTagEmpty, HeadAttrsConfig]>((size) => [
112+
].map<[HeadTagEmpty, HeadAttrsConfig]>((size) => [
115113
'link',
116114
{ rel: 'apple-touch-icon', size, href: `/icons/apple-icon-${size}.png` }
117115
])
@@ -124,7 +122,7 @@ function getHead(): HeadConfig[] {
124122
{ size: '32x32', href: 'favicon-32x32.png' },
125123
{ size: '96x96', href: 'favicon-96x96.png' },
126124
{ size: '16x16', href: 'favicon-16x16.png' }
127-
].flatMap<[HeadTagEmpty, HeadAttrsConfig]>(({ size, href }) => [
125+
].map<[HeadTagEmpty, HeadAttrsConfig]>(({ size, href }) => [
128126
'link',
129127
{ rel: 'icon', type: 'image/png', size, href: `/icons/${href}` }
130128
])
@@ -137,7 +135,7 @@ function getHead(): HeadConfig[] {
137135
name: 'google-site-verification',
138136
content: GOOGLE_SITE_VERIFICATION
139137
}
140-
].flatMap<[HeadTagEmpty, HeadAttrsConfig]>(({ name, content }) => [
138+
].map<[HeadTagEmpty, HeadAttrsConfig]>(({ name, content }) => [
141139
'meta',
142140
{ name, content }
143141
])
@@ -152,7 +150,7 @@ function getHead(): HeadConfig[] {
152150
(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(bsa_optimize);
153151
})();
154152
`
155-
].flatMap<[HeadTagNonEmpty, HeadAttrsConfig, string]>((content) => [
153+
].map<[HeadTagNonEmpty, HeadAttrsConfig, string]>((content) => [
156154
'script',
157155
{},
158156
content

docs/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ shareTitle: Fuse.js - JavaScript fuzzy-search library
66

77
<TwitterFollow />
88

9-
<!-- <a href="https://twitter.com/kirorisk?ref_src=twsrc%5Etfw" class="twitter-follow-button" data-size="large" data-show-screen-name="false" data-dnt="true" data-show-count="false">Follow</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> -->
10-
11-
<!-- <social-share :networks="['twitter', 'reddit', 'linkedin', 'email']" /> -->
12-
139
Fuse.js is a **powerful, lightweight fuzzy-search library, with zero dependencies**.
1410

1511
<Sponsors />

0 commit comments

Comments
 (0)