valaxy-theme-yun 0.14.35 → 0.14.36

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.
@@ -57,6 +57,8 @@ const bannerStyles = computed<CSSProperties>(() => {
57
57
  </template>
58
58
 
59
59
  <style lang="scss">
60
+ @use "../styles/widgets/banner.scss" as *;
61
+
60
62
  :root {
61
63
  // banner
62
64
  --banner-line-color: black;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
- "version": "0.14.35",
3
+ "version": "0.14.36",
4
4
  "author": {
5
5
  "email": "me@yunyoujun.cn",
6
6
  "name": "YunYouJun",
@@ -24,6 +24,6 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/animejs": "^3.1.7",
27
- "valaxy": "0.14.35"
27
+ "valaxy": "0.14.36"
28
28
  }
29
29
  }
@@ -0,0 +1,133 @@
1
+ $banner-animation-duration: 1s;
2
+ $char-animation-duration: 0.4s;
3
+
4
+ #banner {
5
+ --banner-line-height: 0;
6
+ --line-animation-duration: 0.4s;
7
+
8
+ position: relative;
9
+ display: flex;
10
+ flex-direction: column;
11
+ justify-content: center;
12
+ align-items: center;
13
+ width: 100%;
14
+ height: var(--banner-container-height, 100vh);
15
+ }
16
+
17
+ .banner-char-container {
18
+ display: flex;
19
+ flex-direction: column;
20
+ align-items: center;
21
+ }
22
+
23
+ .banner-line-container {
24
+ position: relative;
25
+ display: flex;
26
+ flex-direction: column;
27
+ align-items: center;
28
+ height: var(--banner-line-height);
29
+
30
+ &.bottom {
31
+ justify-content: end;
32
+ }
33
+ }
34
+
35
+ .vertical-line {
36
+ &-top,
37
+ &-bottom {
38
+ display: flex;
39
+ background-color: var(--banner-line-color);
40
+ width: 1px;
41
+ height: 0;
42
+ animation-name: extend-line;
43
+ animation-duration: var(--line-animation-duration);
44
+ animation-fill-mode: forwards;
45
+ animation-timing-function: ease-in;
46
+ }
47
+
48
+ &-bottom {
49
+ flex-direction: column-reverse;
50
+ }
51
+ }
52
+
53
+ @keyframes extend-line {
54
+ from {
55
+ height: 0;
56
+ }
57
+
58
+ to {
59
+ height: var(--banner-line-height);
60
+ }
61
+ }
62
+
63
+ .char {
64
+ font-family: var(--va-font-serif);
65
+ font-weight: 900;
66
+ font-size: var(--banner-char-size, 1rem);
67
+ background-color: var(--banner-char-bg-color);
68
+ line-height: 1;
69
+
70
+ transition: all 0.3s ease-in-out;
71
+ transition-delay: 0s;
72
+
73
+ &:hover {
74
+ color: var(--banner-char-hover-color);
75
+ background-color: var(--banner-char-color);
76
+ }
77
+
78
+ &-left,
79
+ &-right {
80
+ display: flex;
81
+ color: var(--banner-char-color);
82
+ opacity: 0;
83
+ }
84
+
85
+ &-left {
86
+ border-left: 1px solid var(--banner-line-color);
87
+ border-right: 0px solid rgba(var(--va-c-primary-rgb), 0.1);
88
+ border-right-width: 0px;
89
+ animation-name: char-move-left;
90
+ animation-duration: $char-animation-duration;
91
+ animation-delay: var(--line-animation-duration);
92
+ animation-fill-mode: forwards;
93
+ animation-timing-function: ease-out;
94
+ }
95
+
96
+ &-right {
97
+ border-left: 0px solid rgba(var(--va-c-primary-rgb), 0.1);
98
+ border-right: 1px solid var(--banner-line-color);
99
+ border-left-width: 0px;
100
+ animation-name: char-move-right;
101
+ animation-duration: $char-animation-duration;
102
+ animation-delay: var(--line-animation-duration);
103
+ animation-fill-mode: forwards;
104
+ animation-timing-function: ease-out;
105
+ }
106
+ }
107
+
108
+ @keyframes char-move-left {
109
+ from {
110
+ opacity: 0;
111
+ border-right-width: 0;
112
+ }
113
+
114
+ to {
115
+ opacity: 1;
116
+ border-right-width: var(
117
+ --banner-empty-border-size,
118
+ var(--banner-char-size)
119
+ );
120
+ }
121
+ }
122
+
123
+ @keyframes char-move-right {
124
+ from {
125
+ opacity: 0;
126
+ border-left-width: 0;
127
+ }
128
+
129
+ to {
130
+ opacity: 1;
131
+ border-left-width: var(--banner-empty-border-size, var(--banner-char-size));
132
+ }
133
+ }