@burh/nuxt-core 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-tooltip
|
|
3
3
|
placement="top"
|
|
4
|
-
:content="
|
|
4
|
+
:content="parsedProfile"
|
|
5
5
|
>
|
|
6
6
|
<div
|
|
7
7
|
class="aboutme--profile"
|
|
8
|
-
:style="`--profile-gradient: ${getProfileColors()}; --profile-size: ${size}px`"
|
|
8
|
+
:style="`--profile-gradient: ${getProfileColors()}; --profile-size: ${size}px; --profile-bg-color: ${bgColor}`"
|
|
9
9
|
>
|
|
10
10
|
<span
|
|
11
|
-
:style="`--count: ${String(
|
|
11
|
+
:style="`--count: ${String(parsedProfile).length || 4}`"
|
|
12
12
|
>
|
|
13
|
-
{{String(
|
|
13
|
+
{{String(parsedProfile).toUpperCase()}}
|
|
14
14
|
</span>
|
|
15
15
|
</div>
|
|
16
16
|
</el-tooltip>
|
|
@@ -32,6 +32,16 @@ export default {
|
|
|
32
32
|
size: {
|
|
33
33
|
type: Number,
|
|
34
34
|
default: 32
|
|
35
|
+
},
|
|
36
|
+
bgColor: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: '#ffffff'
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
computed: {
|
|
42
|
+
parsedProfile() {
|
|
43
|
+
const profile = this.profile.split('').slice(0, 2).join('');
|
|
44
|
+
return profile;
|
|
35
45
|
}
|
|
36
46
|
},
|
|
37
47
|
methods: {
|
|
@@ -45,10 +55,10 @@ export default {
|
|
|
45
55
|
|
|
46
56
|
const gradient = [];
|
|
47
57
|
|
|
48
|
-
this.
|
|
58
|
+
this.parsedProfile.split('').forEach(letter => {
|
|
49
59
|
gradient.push(colors[String(letter || '').toLowerCase()]);
|
|
50
60
|
|
|
51
|
-
if (this.
|
|
61
|
+
if (this.parsedProfile.length <= 1) {
|
|
52
62
|
gradient.push(colors[String(letter || '').toLowerCase()]);
|
|
53
63
|
}
|
|
54
64
|
});
|
|
@@ -63,6 +73,7 @@ export default {
|
|
|
63
73
|
.aboutme--profile {
|
|
64
74
|
$size: var(--profile-size);
|
|
65
75
|
$gradient: var(--profile-gradient);
|
|
76
|
+
$bgColor: var(--profile-bg-color);
|
|
66
77
|
|
|
67
78
|
position: relative;
|
|
68
79
|
|
|
@@ -85,6 +96,10 @@ export default {
|
|
|
85
96
|
|
|
86
97
|
background-image: linear-gradient(-45deg, $gradient);
|
|
87
98
|
background-clip: text;
|
|
99
|
+
-webkit-background-clip: text;
|
|
100
|
+
-moz-background-clip: text;
|
|
101
|
+
-o-background-clip: text;
|
|
102
|
+
|
|
88
103
|
-webkit-text-fill-color: transparent;
|
|
89
104
|
}
|
|
90
105
|
|
|
@@ -103,9 +118,9 @@ export default {
|
|
|
103
118
|
border: 2px solid transparent;
|
|
104
119
|
border-radius: inherit;
|
|
105
120
|
|
|
106
|
-
background-image: linear-gradient(
|
|
121
|
+
background-image: linear-gradient($bgColor, $bgColor), linear-gradient(-45deg, $gradient);
|
|
107
122
|
background-origin: border-box;
|
|
108
123
|
background-clip: content-box, border-box;
|
|
109
124
|
}
|
|
110
125
|
}
|
|
111
|
-
</style>
|
|
126
|
+
</style>
|