@@ -3,104 +3,89 @@ import type { Container, Engine } from "tsparticles-engine";
33import { loadFull } from " tsparticles" ;
44import configs from " tsparticles-demo-configs" ;
55
6- import HelloWorld from " ./components/HelloWorld.vue" ;
7- import TheWelcome from " ./components/TheWelcome.vue" ;
8-
96const options = configs .basic ;
107
118const particlesInit = async (engine : Engine ) => {
12- await loadFull (engine );
9+ await loadFull (engine );
1310
14- console .log (engine );
11+ console .log (engine );
1512};
1613
1714const particlesLoaded = async (container : Container ) => {
18- console .log (container );
15+ console .log (container );
1916};
2017 </script >
2118
2219<template >
23- <header >
24- <img
25- alt =" Vue logo"
26- class =" logo"
27- src =" ./assets/logo.svg"
28- width =" 125"
29- height =" 125"
30- />
31-
32- <div class =" wrapper" >
33- <HelloWorld msg =" You did it!" />
34- </div >
35- </header >
36-
37- <main >
38- <TheWelcome />
39-
40- <vue-particles id =" tsparticles" :options =" options" :particlesInit =" particlesInit"
41- :particlesLoaded =" particlesLoaded" />
42- </main >
20+ <main >
21+ <vue-particles
22+ id =" tsparticles"
23+ :options =" options"
24+ :particles-init =" particlesInit"
25+ @particles-loaded =" particlesLoaded"
26+ />
27+ </main >
4328</template >
4429
4530<style >
4631@import " ./assets/base.css" ;
4732
4833#app {
49- max-width : 1280px ;
50- margin : 0 auto ;
51- padding : 2rem ;
34+ max-width : 1280px ;
35+ margin : 0 auto ;
36+ padding : 2rem ;
5237
53- font-weight : normal ;
38+ font-weight : normal ;
5439}
5540
5641header {
57- line-height : 1.5 ;
42+ line-height : 1.5 ;
5843}
5944
6045.logo {
61- display : block ;
62- margin : 0 auto 2rem ;
46+ display : block ;
47+ margin : 0 auto 2rem ;
6348}
6449
6550a ,
6651.green {
67- text-decoration : none ;
68- color : hsla (160 , 100% , 37% , 1 );
69- transition : 0.4s ;
52+ text-decoration : none ;
53+ color : hsla (160 , 100% , 37% , 1 );
54+ transition : 0.4s ;
7055}
7156
7257@media (hover : hover ) {
73- a :hover {
74- background-color : hsla (160 , 100% , 37% , 0.2 );
75- }
58+ a :hover {
59+ background-color : hsla (160 , 100% , 37% , 0.2 );
60+ }
7661}
7762
7863@media (min-width : 1024px ) {
79- body {
80- display : flex ;
81- place-items : center ;
82- }
83-
84- #app {
85- display : grid ;
86- grid-template-columns : 1fr 1fr ;
87- padding : 0 2rem ;
88- }
89-
90- header {
91- display : flex ;
92- place-items : center ;
93- padding-right : calc (var (--section-gap ) / 2 );
94- }
95-
96- header .wrapper {
97- display : flex ;
98- place-items : flex-start ;
99- flex-wrap : wrap ;
100- }
101-
102- .logo {
103- margin : 0 2rem 0 0 ;
104- }
64+ body {
65+ display : flex ;
66+ place-items : center ;
67+ }
68+
69+ #app {
70+ display : grid ;
71+ grid-template-columns : 1fr 1fr ;
72+ padding : 0 2rem ;
73+ }
74+
75+ header {
76+ display : flex ;
77+ place-items : center ;
78+ padding-right : calc (var (--section-gap ) / 2 );
79+ }
80+
81+ header .wrapper {
82+ display : flex ;
83+ place-items : flex-start ;
84+ flex-wrap : wrap ;
85+ }
86+
87+ .logo {
88+ margin : 0 2rem 0 0 ;
89+ }
10590}
10691 </style >
0 commit comments