@tsparticles/template-portfolio 4.1.3 → 4.2.1

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.
Files changed (66) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +3 -0
  3. package/package.json +4 -3
  4. package/template/angular/package.json +35 -0
  5. package/template/angular/src/app/app.component.css +180 -0
  6. package/template/angular/src/app/app.component.html +53 -0
  7. package/template/angular/src/app/app.component.ts +47 -0
  8. package/template/angular-confetti/package.json +36 -0
  9. package/template/angular-confetti/src/app/app.component.css +180 -0
  10. package/template/angular-confetti/src/app/app.component.html +53 -0
  11. package/template/angular-confetti/src/app/app.component.ts +47 -0
  12. package/template/angular-fireworks/package.json +36 -0
  13. package/template/angular-fireworks/src/app/app.component.css +180 -0
  14. package/template/angular-fireworks/src/app/app.component.html +53 -0
  15. package/template/angular-fireworks/src/app/app.component.ts +47 -0
  16. package/template/astro/package.json +21 -0
  17. package/template/astro/src/pages/index.astro +131 -0
  18. package/template/ember/app/templates/application.hbs +61 -0
  19. package/template/ember/package.json +25 -0
  20. package/template/inferno/package.json +23 -0
  21. package/template/inferno/src/App.css +180 -0
  22. package/template/inferno/src/App.tsx +100 -0
  23. package/template/jquery/package.json +23 -0
  24. package/template/jquery/src/main.ts +33 -0
  25. package/template/jquery/src/style.css +180 -0
  26. package/template/lit/package.json +22 -0
  27. package/template/lit/src/my-app.ts +117 -0
  28. package/template/lit/src/style.css +180 -0
  29. package/template/nextjs/package.json +25 -0
  30. package/template/nextjs/src/app/page.tsx +94 -0
  31. package/template/nextjs/src/app/providers.tsx +20 -0
  32. package/template/nuxt2/package.json +21 -0
  33. package/template/nuxt2/pages/index.vue +124 -0
  34. package/template/nuxt3/app.vue +116 -0
  35. package/template/nuxt3/package.json +22 -0
  36. package/template/nuxt4/app.vue +116 -0
  37. package/template/nuxt4/package.json +22 -0
  38. package/template/preact/package.json +22 -0
  39. package/template/preact/src/App.css +180 -0
  40. package/template/preact/src/App.tsx +98 -0
  41. package/template/qwik/package.json +22 -0
  42. package/template/qwik/src/App.tsx +104 -0
  43. package/template/react/package.json +19 -0
  44. package/template/react/src/App.css +180 -0
  45. package/template/react/src/App.tsx +85 -0
  46. package/template/riot/package.json +23 -0
  47. package/template/riot/src/app.riot +121 -0
  48. package/template/solid/package.json +18 -0
  49. package/template/solid/src/App.tsx +99 -0
  50. package/template/solid/src/index.css +180 -0
  51. package/template/solid/src/main.tsx +9 -0
  52. package/template/stencil/package.json +21 -0
  53. package/template/stencil/src/components/app-home/app-home.tsx +109 -0
  54. package/template/svelte/package.json +20 -0
  55. package/template/svelte/src/App.svelte +289 -0
  56. package/template/svelte/src/main.ts +12 -0
  57. package/template/vanilla/LICENSE +21 -0
  58. package/template/vanilla/package.json +1 -1
  59. package/template/vue2/package.json +22 -0
  60. package/template/vue2/src/App.vue +273 -0
  61. package/template/vue3/package.json +19 -0
  62. package/template/vue3/src/App.vue +264 -0
  63. package/template/vue3/src/main.ts +14 -0
  64. package/template/webcomponents/package.json +21 -0
  65. package/template/webcomponents/src/main.ts +38 -0
  66. package/template/webcomponents/src/style.css +180 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## [4.2.1](https://github.com/tsparticles/tsparticles/compare/v4.2.0...v4.2.1) (2026-06-18)
7
+
8
+ ### Bug Fixes
9
+
10
+ - fixed some various issues ([8534979](https://github.com/tsparticles/tsparticles/commit/85349791a4978f80f98f141a94a403a7e15785c0))
11
+
12
+ # [4.2.0](https://github.com/tsparticles/tsparticles/compare/v4.1.3...v4.2.0) (2026-06-17)
13
+
14
+ ### Features
15
+
16
+ - adding templates to cli create ([bc118ef](https://github.com/tsparticles/tsparticles/commit/bc118efa3f40497f9fa84186ac6102411a19fda7))
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @tsparticles/template-portfolio
2
+
3
+ tsParticles portfolio template. Use with `create-tsparticles-app` to scaffold a new portfolio project with animated particle background.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/template-portfolio",
3
- "version": "4.1.3",
3
+ "version": "4.2.1",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -8,7 +8,8 @@
8
8
  "scripts": {
9
9
  "prebuild": "node scripts/prebuild.js",
10
10
  "build": "pnpm run prebuild",
11
- "build:ci": "pnpm run prebuild"
11
+ "build:ci": "pnpm run prebuild",
12
+ "version": "pnpm run build && git add template.json"
12
13
  },
13
- "gitHead": "0551736c55ae8eec3855a693af8a99b1b4420350"
14
+ "gitHead": "e2a7699c1f4212bbda4e6933970c062e6fc000dc"
14
15
  }
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "{{packageName}}",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "ng": "ng",
7
+ "start": "ng serve",
8
+ "dev": "ng serve",
9
+ "build": "ng build",
10
+ "preview": "ng serve",
11
+ "watch": "ng build --watch --configuration development"
12
+ },
13
+ "dependencies": {
14
+ "@angular/animations": "~22.0.0",
15
+ "@angular/common": "~22.0.0",
16
+ "@angular/compiler": "~22.0.0",
17
+ "@angular/core": "~22.0.0",
18
+ "@angular/forms": "~22.0.0",
19
+ "@angular/platform-browser": "~22.0.0",
20
+ "@angular/platform-browser-dynamic": "~22.0.0",
21
+ "@angular/router": "~22.0.0",
22
+ "@tsparticles/angular": "^4.1.3",
23
+ "@tsparticles/configs": "^4.0.0",
24
+ "@tsparticles/slim": "^4.0.0",
25
+ "rxjs": "~7.8.2",
26
+ "tslib": "^2.8.1",
27
+ "zone.js": "~0.16.2"
28
+ },
29
+ "devDependencies": {
30
+ "@angular-devkit/build-angular": "~22.0.0",
31
+ "@angular/cli": "~22.0.0",
32
+ "@angular/compiler-cli": "~22.0.0",
33
+ "typescript": "~6.0.3"
34
+ }
35
+ }
@@ -0,0 +1,180 @@
1
+ * {
2
+ margin: 0;
3
+ padding: 0;
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ html {
8
+ scroll-behavior: smooth;
9
+ }
10
+
11
+ body {
12
+ font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
13
+ color: #fff;
14
+ background: #0a0a1a;
15
+ }
16
+
17
+ #navbar {
18
+ position: fixed;
19
+ top: 0;
20
+ width: 100%;
21
+ z-index: 100;
22
+ display: flex;
23
+ justify-content: center;
24
+ gap: 2rem;
25
+ padding: 1rem;
26
+ background: rgba(10, 10, 26, 0.8);
27
+ backdrop-filter: blur(10px);
28
+ }
29
+
30
+ .nav-link {
31
+ color: rgba(255, 255, 255, 0.7);
32
+ text-decoration: none;
33
+ font-size: 0.9em;
34
+ transition: color 0.2s;
35
+ }
36
+
37
+ .nav-link:hover {
38
+ color: #6c5ce7;
39
+ }
40
+
41
+ .section {
42
+ min-height: 100vh;
43
+ display: flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ }
47
+
48
+ #hero {
49
+ position: relative;
50
+ }
51
+
52
+ .hero-content {
53
+ text-align: center;
54
+ z-index: 10;
55
+ }
56
+
57
+ .hero-content h1 {
58
+ font-size: 3.5em;
59
+ margin-bottom: 0.5rem;
60
+ }
61
+
62
+ .highlight {
63
+ color: #6c5ce7;
64
+ }
65
+
66
+ .subtitle {
67
+ font-size: 1.3em;
68
+ opacity: 0.7;
69
+ }
70
+
71
+ .content-section {
72
+ padding: 6rem 1rem;
73
+ min-height: auto;
74
+ }
75
+
76
+ .container {
77
+ max-width: 900px;
78
+ width: 100%;
79
+ margin: 0 auto;
80
+ }
81
+
82
+ h2 {
83
+ font-size: 2.2em;
84
+ margin-bottom: 2rem;
85
+ color: #6c5ce7;
86
+ }
87
+
88
+ p {
89
+ line-height: 1.7;
90
+ opacity: 0.85;
91
+ font-size: 1.1em;
92
+ }
93
+
94
+ .project-grid {
95
+ display: grid;
96
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
97
+ gap: 1.5rem;
98
+ }
99
+
100
+ .project-card {
101
+ background: rgba(255, 255, 255, 0.05);
102
+ border: 1px solid rgba(255, 255, 255, 0.1);
103
+ border-radius: 12px;
104
+ padding: 1.5rem;
105
+ transition: transform 0.2s, border-color 0.2s;
106
+ }
107
+
108
+ .project-card:hover {
109
+ transform: translateY(-4px);
110
+ border-color: #6c5ce7;
111
+ }
112
+
113
+ .project-card h3 {
114
+ margin-bottom: 0.5rem;
115
+ }
116
+
117
+ .skill-bar {
118
+ margin-bottom: 1.2rem;
119
+ }
120
+
121
+ .skill-name {
122
+ display: block;
123
+ margin-bottom: 0.3em;
124
+ font-size: 0.95em;
125
+ opacity: 0.8;
126
+ }
127
+
128
+ .bar {
129
+ height: 10px;
130
+ background: rgba(255, 255, 255, 0.1);
131
+ border-radius: 5px;
132
+ overflow: hidden;
133
+ }
134
+
135
+ .fill {
136
+ height: 100%;
137
+ background: linear-gradient(90deg, #6c5ce7, #a29bfe);
138
+ border-radius: 5px;
139
+ transition: width 1s ease;
140
+ }
141
+
142
+ #contactForm {
143
+ display: flex;
144
+ flex-direction: column;
145
+ gap: 1rem;
146
+ max-width: 500px;
147
+ }
148
+
149
+ #contactForm input,
150
+ #contactForm textarea {
151
+ padding: 0.8em 1em;
152
+ font-size: 1em;
153
+ border: 1px solid rgba(255, 255, 255, 0.1);
154
+ border-radius: 8px;
155
+ background: rgba(255, 255, 255, 0.05);
156
+ color: #fff;
157
+ outline: none;
158
+ font-family: inherit;
159
+ }
160
+
161
+ #contactForm input:focus,
162
+ #contactForm textarea:focus {
163
+ border-color: #6c5ce7;
164
+ }
165
+
166
+ #contactForm button {
167
+ padding: 0.8em;
168
+ font-size: 1em;
169
+ font-weight: 600;
170
+ border: none;
171
+ border-radius: 8px;
172
+ background: #6c5ce7;
173
+ color: #fff;
174
+ cursor: pointer;
175
+ transition: background 0.2s;
176
+ }
177
+
178
+ #contactForm button:hover {
179
+ background: #a29bfe;
180
+ }
@@ -0,0 +1,53 @@
1
+ <ngx-particles id="tsparticles" [options]="options" />
2
+
3
+ <nav id="navbar">
4
+ <a *ngFor="let item of navItems" [href]="'#' + item.toLowerCase()" class="nav-link">{{ item }}</a>
5
+ </nav>
6
+
7
+ <section id="hero" class="section">
8
+ <div class="hero-content">
9
+ <h1>Hello, I'm <span class="highlight">Your Name</span></h1>
10
+ <p class="subtitle">Full-Stack Developer &amp; Designer</p>
11
+ </div>
12
+ </section>
13
+
14
+ <section id="about" class="section content-section">
15
+ <div class="container">
16
+ <h2>About Me</h2>
17
+ <p>A passionate developer who loves building beautiful and performant web applications. Experienced in modern JavaScript frameworks, cloud infrastructure, and UI/UX design.</p>
18
+ </div>
19
+ </section>
20
+
21
+ <section id="projects" class="section content-section">
22
+ <div class="container">
23
+ <h2>Projects</h2>
24
+ <div class="project-grid">
25
+ <div *ngFor="let p of projects" class="project-card">
26
+ <h3>{{ p.title }}</h3>
27
+ <p>{{ p.desc }}</p>
28
+ </div>
29
+ </div>
30
+ </div>
31
+ </section>
32
+
33
+ <section id="skills" class="section content-section">
34
+ <div class="container">
35
+ <h2>Skills</h2>
36
+ <div *ngFor="let s of skills" class="skill-bar">
37
+ <span class="skill-name">{{ s.name }}</span>
38
+ <div class="bar"><div class="fill" [style.width.%]="s.pct"></div></div>
39
+ </div>
40
+ </div>
41
+ </section>
42
+
43
+ <section id="contact" class="section content-section">
44
+ <div class="container">
45
+ <h2>Contact</h2>
46
+ <form #contactForm="ngForm" (ngSubmit)="onSubmit(contactForm.form)">
47
+ <input type="text" placeholder="Your Name" required />
48
+ <input type="email" placeholder="Your Email" required />
49
+ <textarea placeholder="Your Message" rows="5" required></textarea>
50
+ <button type="submit">Send Message</button>
51
+ </form>
52
+ </div>
53
+ </section>
@@ -0,0 +1,47 @@
1
+ import { Component, OnInit } from "@angular/core";
2
+ import { NgParticlesService } from "@tsparticles/angular";
3
+ import { loadSlim } from "@tsparticles/slim";
4
+ import configs from "@tsparticles/configs";
5
+ import type { ISourceOptions } from "@tsparticles/engine";
6
+
7
+ @Component({
8
+ selector: "app-root",
9
+ templateUrl: "./app.component.html",
10
+ styleUrls: ["./app.component.css"],
11
+ })
12
+ export class AppComponent implements OnInit {
13
+ constructor(private readonly ngParticlesService: NgParticlesService) {}
14
+
15
+ options!: ISourceOptions;
16
+
17
+ navItems = ["Home", "About", "Projects", "Skills", "Contact"];
18
+ skills = [
19
+ { name: "TypeScript", pct: 90 },
20
+ { name: "React", pct: 85 },
21
+ { name: "Node.js", pct: 80 },
22
+ { name: "CSS", pct: 88 },
23
+ ];
24
+ projects = [
25
+ { title: "Project One", desc: "A web application built with React and TypeScript." },
26
+ { title: "Project Two", desc: "Real-time dashboard with data visualization." },
27
+ { title: "Project Three", desc: "Mobile-first e-commerce platform." },
28
+ ];
29
+
30
+ ngOnInit(): void {
31
+ const keys = Object.keys(configs);
32
+ const randomKey = keys[Math.floor(Math.random() * keys.length)] as keyof typeof configs;
33
+ this.options = {
34
+ ...(configs[randomKey] as ISourceOptions),
35
+ fullScreen: { enable: true, zIndex: -1 },
36
+ };
37
+
38
+ void this.ngParticlesService.init(async (engine) => {
39
+ await loadSlim(engine);
40
+ });
41
+ }
42
+
43
+ onSubmit(form: HTMLFormElement): void {
44
+ alert("Message sent! (demo)");
45
+ form.reset();
46
+ }
47
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "{{packageName}}",
3
+ "private": true,
4
+ "version": "{{version}}",
5
+ "scripts": {
6
+ "ng": "ng",
7
+ "start": "ng serve",
8
+ "dev": "ng serve",
9
+ "build": "ng build",
10
+ "preview": "ng serve",
11
+ "watch": "ng build --watch --configuration development"
12
+ },
13
+ "dependencies": {
14
+ "@angular/animations": "~22.0.0",
15
+ "@angular/common": "~22.0.0",
16
+ "@angular/compiler": "~22.0.0",
17
+ "@angular/core": "~22.0.0",
18
+ "@angular/forms": "~22.0.0",
19
+ "@angular/platform-browser": "~22.0.0",
20
+ "@angular/platform-browser-dynamic": "~22.0.0",
21
+ "@angular/router": "~22.0.0",
22
+ "@tsparticles/angular": "^4.1.3",
23
+ "@tsparticles/engine": "^4.0.0",
24
+ "@tsparticles/slim": "^4.0.0",
25
+ "@tsparticles/configs": "^4.0.0",
26
+ "rxjs": "~7.8.2",
27
+ "tslib": "^2.8.1",
28
+ "zone.js": "~0.16.2"
29
+ },
30
+ "devDependencies": {
31
+ "@angular-devkit/build-angular": "~22.0.0",
32
+ "@angular/cli": "~22.0.0",
33
+ "@angular/compiler-cli": "~22.0.0",
34
+ "typescript": "~6.0.3"
35
+ }
36
+ }
@@ -0,0 +1,180 @@
1
+ * {
2
+ margin: 0;
3
+ padding: 0;
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ html {
8
+ scroll-behavior: smooth;
9
+ }
10
+
11
+ body {
12
+ font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
13
+ color: #fff;
14
+ background: #0a0a1a;
15
+ }
16
+
17
+ #navbar {
18
+ position: fixed;
19
+ top: 0;
20
+ width: 100%;
21
+ z-index: 100;
22
+ display: flex;
23
+ justify-content: center;
24
+ gap: 2rem;
25
+ padding: 1rem;
26
+ background: rgba(10, 10, 26, 0.8);
27
+ backdrop-filter: blur(10px);
28
+ }
29
+
30
+ .nav-link {
31
+ color: rgba(255, 255, 255, 0.7);
32
+ text-decoration: none;
33
+ font-size: 0.9em;
34
+ transition: color 0.2s;
35
+ }
36
+
37
+ .nav-link:hover {
38
+ color: #6c5ce7;
39
+ }
40
+
41
+ .section {
42
+ min-height: 100vh;
43
+ display: flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ }
47
+
48
+ #hero {
49
+ position: relative;
50
+ }
51
+
52
+ .hero-content {
53
+ text-align: center;
54
+ z-index: 10;
55
+ }
56
+
57
+ .hero-content h1 {
58
+ font-size: 3.5em;
59
+ margin-bottom: 0.5rem;
60
+ }
61
+
62
+ .highlight {
63
+ color: #6c5ce7;
64
+ }
65
+
66
+ .subtitle {
67
+ font-size: 1.3em;
68
+ opacity: 0.7;
69
+ }
70
+
71
+ .content-section {
72
+ padding: 6rem 1rem;
73
+ min-height: auto;
74
+ }
75
+
76
+ .container {
77
+ max-width: 900px;
78
+ width: 100%;
79
+ margin: 0 auto;
80
+ }
81
+
82
+ h2 {
83
+ font-size: 2.2em;
84
+ margin-bottom: 2rem;
85
+ color: #6c5ce7;
86
+ }
87
+
88
+ p {
89
+ line-height: 1.7;
90
+ opacity: 0.85;
91
+ font-size: 1.1em;
92
+ }
93
+
94
+ .project-grid {
95
+ display: grid;
96
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
97
+ gap: 1.5rem;
98
+ }
99
+
100
+ .project-card {
101
+ background: rgba(255, 255, 255, 0.05);
102
+ border: 1px solid rgba(255, 255, 255, 0.1);
103
+ border-radius: 12px;
104
+ padding: 1.5rem;
105
+ transition: transform 0.2s, border-color 0.2s;
106
+ }
107
+
108
+ .project-card:hover {
109
+ transform: translateY(-4px);
110
+ border-color: #6c5ce7;
111
+ }
112
+
113
+ .project-card h3 {
114
+ margin-bottom: 0.5rem;
115
+ }
116
+
117
+ .skill-bar {
118
+ margin-bottom: 1.2rem;
119
+ }
120
+
121
+ .skill-name {
122
+ display: block;
123
+ margin-bottom: 0.3em;
124
+ font-size: 0.95em;
125
+ opacity: 0.8;
126
+ }
127
+
128
+ .bar {
129
+ height: 10px;
130
+ background: rgba(255, 255, 255, 0.1);
131
+ border-radius: 5px;
132
+ overflow: hidden;
133
+ }
134
+
135
+ .fill {
136
+ height: 100%;
137
+ background: linear-gradient(90deg, #6c5ce7, #a29bfe);
138
+ border-radius: 5px;
139
+ transition: width 1s ease;
140
+ }
141
+
142
+ #contactForm {
143
+ display: flex;
144
+ flex-direction: column;
145
+ gap: 1rem;
146
+ max-width: 500px;
147
+ }
148
+
149
+ #contactForm input,
150
+ #contactForm textarea {
151
+ padding: 0.8em 1em;
152
+ font-size: 1em;
153
+ border: 1px solid rgba(255, 255, 255, 0.1);
154
+ border-radius: 8px;
155
+ background: rgba(255, 255, 255, 0.05);
156
+ color: #fff;
157
+ outline: none;
158
+ font-family: inherit;
159
+ }
160
+
161
+ #contactForm input:focus,
162
+ #contactForm textarea:focus {
163
+ border-color: #6c5ce7;
164
+ }
165
+
166
+ #contactForm button {
167
+ padding: 0.8em;
168
+ font-size: 1em;
169
+ font-weight: 600;
170
+ border: none;
171
+ border-radius: 8px;
172
+ background: #6c5ce7;
173
+ color: #fff;
174
+ cursor: pointer;
175
+ transition: background 0.2s;
176
+ }
177
+
178
+ #contactForm button:hover {
179
+ background: #a29bfe;
180
+ }
@@ -0,0 +1,53 @@
1
+ <ngx-particles id="tsparticles" [options]="options" />
2
+
3
+ <nav id="navbar">
4
+ <a *ngFor="let item of navItems" [href]="'#' + item.toLowerCase()" class="nav-link">{{ item }}</a>
5
+ </nav>
6
+
7
+ <section id="hero" class="section">
8
+ <div class="hero-content">
9
+ <h1>Hello, I'm <span class="highlight">Your Name</span></h1>
10
+ <p class="subtitle">Full-Stack Developer &amp; Designer</p>
11
+ </div>
12
+ </section>
13
+
14
+ <section id="about" class="section content-section">
15
+ <div class="container">
16
+ <h2>About Me</h2>
17
+ <p>A passionate developer who loves building beautiful and performant web applications. Experienced in modern JavaScript frameworks, cloud infrastructure, and UI/UX design.</p>
18
+ </div>
19
+ </section>
20
+
21
+ <section id="projects" class="section content-section">
22
+ <div class="container">
23
+ <h2>Projects</h2>
24
+ <div class="project-grid">
25
+ <div *ngFor="let p of projects" class="project-card">
26
+ <h3>{{ p.title }}</h3>
27
+ <p>{{ p.desc }}</p>
28
+ </div>
29
+ </div>
30
+ </div>
31
+ </section>
32
+
33
+ <section id="skills" class="section content-section">
34
+ <div class="container">
35
+ <h2>Skills</h2>
36
+ <div *ngFor="let s of skills" class="skill-bar">
37
+ <span class="skill-name">{{ s.name }}</span>
38
+ <div class="bar"><div class="fill" [style.width.%]="s.pct"></div></div>
39
+ </div>
40
+ </div>
41
+ </section>
42
+
43
+ <section id="contact" class="section content-section">
44
+ <div class="container">
45
+ <h2>Contact</h2>
46
+ <form #contactForm="ngForm" (ngSubmit)="onSubmit(contactForm.form)">
47
+ <input type="text" placeholder="Your Name" required />
48
+ <input type="email" placeholder="Your Email" required />
49
+ <textarea placeholder="Your Message" rows="5" required></textarea>
50
+ <button type="submit">Send Message</button>
51
+ </form>
52
+ </div>
53
+ </section>
@@ -0,0 +1,47 @@
1
+ import { Component, OnInit } from "@angular/core";
2
+ import { NgParticlesService } from "@tsparticles/angular";
3
+ import { loadSlim } from "@tsparticles/slim";
4
+ import configs from "@tsparticles/configs";
5
+ import type { ISourceOptions } from "@tsparticles/engine";
6
+
7
+ @Component({
8
+ selector: "app-root",
9
+ templateUrl: "./app.component.html",
10
+ styleUrls: ["./app.component.css"],
11
+ })
12
+ export class AppComponent implements OnInit {
13
+ constructor(private readonly ngParticlesService: NgParticlesService) {}
14
+
15
+ options!: ISourceOptions;
16
+
17
+ navItems = ["Home", "About", "Projects", "Skills", "Contact"];
18
+ skills = [
19
+ { name: "TypeScript", pct: 90 },
20
+ { name: "Angular", pct: 85 },
21
+ { name: "Node.js", pct: 80 },
22
+ { name: "CSS", pct: 88 },
23
+ ];
24
+ projects = [
25
+ { title: "Project One", desc: "A web application built with Angular and TypeScript." },
26
+ { title: "Project Two", desc: "Real-time dashboard with data visualization." },
27
+ { title: "Project Three", desc: "Mobile-first e-commerce platform." },
28
+ ];
29
+
30
+ ngOnInit(): void {
31
+ const keys = Object.keys(configs);
32
+ const randomKey = keys[Math.floor(Math.random() * keys.length)] as keyof typeof configs;
33
+ this.options = {
34
+ ...(configs[randomKey] as ISourceOptions),
35
+ fullScreen: { enable: true, zIndex: -1 },
36
+ };
37
+
38
+ void this.ngParticlesService.init(async (engine) => {
39
+ await loadSlim(engine);
40
+ });
41
+ }
42
+
43
+ onSubmit(form: HTMLFormElement): void {
44
+ alert("Message sent! (demo)");
45
+ form.reset();
46
+ }
47
+ }