Skip to content

Commit 17a4b0d

Browse files
committed
feat: add fast-injection project card with description and links; adjust padding and margins in styles for better layout
1 parent d3cf3a0 commit 17a4b0d

File tree

2 files changed

+118
-14
lines changed

2 files changed

+118
-14
lines changed

index.html

Lines changed: 105 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
@@ -141,6 +141,110 @@ <h2>The Ecosystem</h2>
141141
</div>
142142

143143
<div class="projects-grid">
144+
<!-- fast-injection -->
145+
<article class="project-card">
146+
<div class="card-header">
147+
<div class="project-meta">
148+
<h3>fast-injection</h3>
149+
<div class="tags">
150+
<span class="tag">Dependency Injection</span>
151+
<span class="tag">TypeScript</span>
152+
<span class="tag">Bun</span>
153+
</div>
154+
</div>
155+
</div>
156+
<p class="project-desc">
157+
Modern TypeScript dependency injection container optimized for Bun runtime. Blazing fast with
158+
sub-microsecond resolution (~26M ops/sec for cached singletons), lightweight (&lt;5KB), and fully
159+
type-safe. Supports singleton, transient, and scoped lifetimes with flexible API options: decorators,
160+
functional, or imperative. Built-in security against prototype pollution, memory leaks, and DoS attacks.
161+
Includes testing utilities for easy mocking and test isolation.
162+
</p>
163+
<div class="project-links">
164+
<a href="https://github.com/BackendStack21/fast-injection" class="link-item"
165+
><svg
166+
xmlns="http://www.w3.org/2000/svg"
167+
width="16"
168+
height="16"
169+
viewBox="0 0 24 24"
170+
fill="none"
171+
stroke="currentColor"
172+
stroke-width="2"
173+
stroke-linecap="round"
174+
stroke-linejoin="round"
175+
>
176+
<path
177+
d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"
178+
></path></svg
179+
>GitHub</a
180+
>
181+
<a href="https://www.npmjs.com/package/fast-injection" target="_blank" class="link-item"
182+
><svg
183+
xmlns="http://www.w3.org/2000/svg"
184+
width="16"
185+
height="16"
186+
viewBox="0 0 24 24"
187+
fill="none"
188+
stroke="currentColor"
189+
stroke-width="2"
190+
stroke-linecap="round"
191+
stroke-linejoin="round"
192+
>
193+
<path
194+
d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"
195+
></path>
196+
<polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline>
197+
<line x1="12" y1="22.08" x2="12" y2="12"></line></svg
198+
>npm</a
199+
>
200+
<a href="https://fast-injection.21no.de" target="_blank" class="link-item"
201+
><svg
202+
xmlns="http://www.w3.org/2000/svg"
203+
width="16"
204+
height="16"
205+
viewBox="0 0 24 24"
206+
fill="none"
207+
stroke="currentColor"
208+
stroke-width="2"
209+
stroke-linecap="round"
210+
stroke-linejoin="round"
211+
>
212+
<circle cx="12" cy="12" r="10"></circle>
213+
<line x1="2" y1="12" x2="22" y2="12"></line>
214+
<path
215+
d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"
216+
></path></svg
217+
>Website</a
218+
>
219+
</div>
220+
<div class="badges">
221+
<img
222+
src="https://img.shields.io/github/stars/BackendStack21/fast-injection?style=flat-square&labelColor=1e293b&color=38bdf8"
223+
alt="GitHub Stars"
224+
/>
225+
<img
226+
src="https://img.shields.io/npm/v/fast-injection?style=flat-square&labelColor=1e293b&color=38bdf8"
227+
alt="npm version"
228+
/>
229+
</div>
230+
<div class="code-preview">
231+
<div class="code-header">
232+
<span>Quick Start</span>
233+
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
234+
</div>
235+
<pre><code><span class="k">import</span> { Container } <span class="k">from</span> <span class="s">'fast-injection'</span>;
236+
<span class="k">import</span> { singleton, inject } <span class="k">from</span> <span class="s">'fast-injection/decorators'</span>;
237+
238+
<span class="k">@singleton</span>()
239+
<span class="k">class</span> <span class="f">UserService</span> {
240+
<span class="f">getUser</span>(id) { <span class="k">return</span> { id, name: <span class="s">'John'</span> }; }
241+
}
242+
243+
<span class="k">const</span> container = <span class="k">new</span> <span class="f">Container</span>();
244+
container.<span class="f">register</span>(UserService);</code></pre>
245+
</div>
246+
</article>
247+
144248
<!-- kMOSAIC -->
145249
<article class="project-card">
146250
<div class="card-header">

styles.css

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,12 @@ ul {
207207

208208
/* Hero Section */
209209
.hero {
210-
padding: 160px 0 100px;
210+
padding: 120px 0 60px;
211211
text-align: center;
212212
}
213213

214214
.badge-wrapper {
215-
margin-bottom: 24px;
215+
margin-bottom: 16px;
216216
animation: fadeDown 0.8s ease-out;
217217
}
218218

@@ -231,7 +231,7 @@ ul {
231231
font-size: clamp(40px, 5vw, 64px);
232232
font-weight: 800;
233233
line-height: 1.1;
234-
margin-bottom: 24px;
234+
margin-bottom: 16px;
235235
letter-spacing: -0.02em;
236236
animation: fadeUp 0.8s ease-out 0.1s backwards;
237237
}
@@ -247,7 +247,7 @@ ul {
247247
font-size: clamp(16px, 2vw, 20px);
248248
color: var(--text-muted);
249249
max-width: 600px;
250-
margin: 0 auto 40px;
250+
margin: 0 auto 24px;
251251
animation: fadeUp 0.8s ease-out 0.2s backwards;
252252
}
253253

@@ -263,7 +263,7 @@ ul {
263263
gap: 16px;
264264
justify-content: center;
265265
align-items: center;
266-
margin-top: 40px;
266+
margin-top: 24px;
267267
flex-wrap: wrap;
268268
animation: fadeUp 0.8s ease-out 0.4s backwards;
269269
}
@@ -283,7 +283,7 @@ ul {
283283

284284
/* Blog Carousel */
285285
.blog-carousel {
286-
padding: 80px 0;
286+
padding: 50px 0;
287287
background: rgba(15, 23, 42, 0.3);
288288
border-bottom: 1px solid var(--border);
289289
}
@@ -420,7 +420,7 @@ ul {
420420
display: flex;
421421
justify-content: center;
422422
gap: 8px;
423-
margin-top: 32px;
423+
margin-top: 20px;
424424
}
425425

426426
.carousel-dot {
@@ -474,7 +474,7 @@ ul {
474474

475475
/* Features Section */
476476
.features {
477-
padding: 80px 0;
477+
padding: 50px 0;
478478
border-top: 1px solid var(--border);
479479
border-bottom: 1px solid var(--border);
480480
background: rgba(15, 23, 42, 0.5);
@@ -483,7 +483,7 @@ ul {
483483
.features-grid {
484484
display: grid;
485485
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
486-
gap: 40px;
486+
gap: 24px;
487487
}
488488

489489
.feature-card {
@@ -514,12 +514,12 @@ ul {
514514

515515
/* Projects Section */
516516
.projects {
517-
padding: 100px 0;
517+
padding: 60px 0;
518518
}
519519

520520
.section-header {
521521
text-align: center;
522-
margin-bottom: 60px;
522+
margin-bottom: 40px;
523523
}
524524

525525
.section-header h2 {
@@ -638,7 +638,7 @@ ul {
638638
.projects-cta {
639639
display: flex;
640640
justify-content: center;
641-
margin-top: 60px;
641+
margin-top: 40px;
642642
}
643643

644644
/* Code Preview */
@@ -695,7 +695,7 @@ ul {
695695

696696
/* Footer */
697697
.footer {
698-
padding: 60px 0;
698+
padding: 40px 0;
699699
border-top: 1px solid var(--border);
700700
background: var(--bg-dark);
701701
}

0 commit comments

Comments
 (0)