File tree Expand file tree Collapse file tree 5 files changed +73
-1
lines changed
.vitepress/config/locales
components/CyberpunkCordon Expand file tree Collapse file tree 5 files changed +73
-1
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,11 @@ function sidebarComponents(): DefaultTheme.SidebarItem[] {
8686 link : '/components/cyberpunk-glitch'
8787 } ,
8888 {
89- text : '流光灯效果' ,
89+ text : '赛博朋克警戒线' ,
90+ link : '/components/cyberpunk-cordon'
91+ } ,
92+ {
93+ text : '流光灯' ,
9094 link : '/components/flowing-light'
9195 }
9296 ]
Original file line number Diff line number Diff line change 1+ # IxCyberpunkCordon
2+
3+ 赛博朋克警戒线组件
4+
5+ ## 基本
6+
7+ <div py-4 rounded-md bg-slate-950 >
8+ <IxCyberpunkCordon >
9+ <div text-8 font-bold>POLICE</div>
10+ </IxCyberpunkCordon >
11+ </div >
12+
13+ ``` vue
14+ <template>
15+ <IxCyberpunkCordon>
16+ <div text-8 font-bold>
17+ POLICE
18+ </div>
19+ </IxCyberpunkCordon>
20+ </template>
21+ ```
Original file line number Diff line number Diff line change 1+ export { default as IxCyberpunkCordon } from './src/index.vue'
Original file line number Diff line number Diff line change 1+ <style lang="scss" scoped>
2+ .marquee {
3+ white-space : nowrap ;
4+ overflow : hidden ;
5+ position : relative ;
6+ display : inline-block ;
7+ padding-left : 100% ;
8+ animation : marquee 10s linear infinite ;
9+ }
10+
11+ .cyberpunk-cordon {
12+ .mask {
13+ mask : radial-gradient (#000 , transparent ) repeat 0 0 / 4px 4px ;
14+ }
15+ }
16+
17+ @keyframes marquee {
18+ 0% {
19+ transform : translate (0 , 0 );
20+ }
21+
22+ 100% {
23+ transform : translate (-100% , 0 );
24+ }
25+ }
26+ </style >
27+
28+ <template >
29+ <div pr w-full class =" cyberpunk-cordon" >
30+ <div class =" mask" :class =" props.bgClass" >
31+ <div class =" marquee" pt =" 1.5" leading-none blur-1 >
32+ <slot />
33+ </div >
34+ </div >
35+ <div pa top-0 right-0 bottom-0 left-0 op-50 blur-md :class =" props.bgClass" />
36+ </div >
37+ </template >
38+
39+ <script lang="ts" setup>
40+ const props = withDefaults (defineProps < {
41+ bgClass?: string
42+ } > (), {
43+ bgClass: ' bg-amber'
44+ })
45+ </script >
Original file line number Diff line number Diff line change 11import 'virtual:uno.css'
22
3+ export * from './components/CyberpunkCordon'
34export * from './components/CyberpunkGlitch'
45export * from './components/FlowingLight'
56export * from './components/IconText'
You can’t perform that action at this time.
0 commit comments