Skip to content

Commit 94d9ef0

Browse files
committed
snake, tictactoe games added
issues with image urls fixed
1 parent 331473c commit 94d9ef0

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed
2.47 KB
Loading
6.85 KB
Loading

assets/js/data/projects.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,5 +256,28 @@
256256
"sources": [{ "title": "gitHub", "url": "https://github.com/devshashtag/flexbox-kit" }]
257257
}
258258
]
259+
},
260+
{
261+
"category": "frontend <span>&gt;</span> games",
262+
"projects": [
263+
{
264+
"name": "snake",
265+
"root": "/snake",
266+
"description": "a classic snake game that using hamiltonian cycle algorithm for snake movement",
267+
"image": ["/assets/images/projects/frontend/games/snake.webp"],
268+
"tags": ["HTML", "CSS", "JAVASCRIPT", "RESPONSIVE"],
269+
"pages": [{ "title": "home", "url": "" }],
270+
"sources": [{ "title": "gitHub", "url": "https://github.com/devshashtag/snake" }]
271+
},
272+
{
273+
"name": "tic tac toe",
274+
"root": "/tictactoe",
275+
"description": "a simple tic-tac-toe game",
276+
"image": ["/assets/images/projects/frontend/games/tictactoe.webp"],
277+
"tags": ["HTML", "CSS", "JAVASCRIPT", "RESPONSIVE"],
278+
"pages": [{ "title": "home", "url": "" }],
279+
"sources": [{ "title": "gitHub", "url": "https://github.com/devshashtag/tictactoe" }]
280+
}
281+
]
259282
}
260283
]

assets/js/modules/template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function projectCardTemplate(project) {
9696
<div class="category__card">
9797
<div class="card__name">${project.name}</div>
9898
<div class="card__image">
99-
<img src="${project.image}" alt="${project.name}" loading="lazy" />
99+
<img src="${project.image ?? ''}" alt="${project.name}" loading="lazy" />
100100
</div>
101101
<div class="card__modal">
102102
<div class="modal__box">

0 commit comments

Comments
 (0)