feat: Add demo card on demos page for first showcased demo

- add _data/demos.js data file
- add Nunjucks logic for dynamically injecting demo attributes into demo cards
- add style rules for demo cards
This commit is contained in:
2025-09-07 17:24:16 -05:00
parent 264529c428
commit 3c22c88396
8 changed files with 212 additions and 46 deletions

View File

@@ -16,4 +16,96 @@ h1, h2 {
text-align: center;
margin-top: 200px;
font-size: 2.5rem;
margin-top: 50px;
}
.demo-card {
box-shadow: var(--shadow-small);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.demo-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-medium);
}
.demo-title {
margin-top: 0;
font-size: 2rem;
color: var(--primary-color);
margin-bottom: var(--margin-small);
}
.demo-image {
width: 70%;
height: auto;
border-radius: 8px;
box-shadow: var(--shadow-small);
margin-bottom: var(--margin-medium);
}
.demo-description,
.demo-problem,
.demo-solution,
.coming-soon {
line-height: 1.6;
margin-bottom: var(--margin-small);
font-size: 1.25rem;
text-align: center;
}
.demo-problem,
.demo-solution {
font-weight: 500;
}
h3 {
font-weight: bold;
color: var(--primary-color);
font-size: 2rem;
}
.coming-soon {
font-weight: bold;
color: var(--secondary-color);
text-align: center;
font-style: italic;
margin-top: 10px;
}
.demo-link,
.demo-repo {
display: inline-block;
padding: 8px 25px;
margin: 20px 10px;
background-color: var(--secondary-color);
color: var(--light-bg-color);
text-decoration: none;
font-weight: 600;
border-radius: 50px;
transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.demo-link:hover,
.demo-repo:hover {
background-color: var(--primary-color);
box-shadow: 0 4px 8px rgba(46, 151, 190, 0.2);
}
/* Responsive tweaks */
@media (max-width: 768px) {
h1 {
font-size: 2rem;
}
.demo-card {
padding: var(--padding-medium);
}
.demo-link,
.demo-repo {
display: block;
margin: 10px auto;
width: fit-content;
}
}