added author tags

This commit is contained in:
2025-01-16 00:35:46 +11:00
parent af9c4ad250
commit 9539d8fc73
3 changed files with 15 additions and 1 deletions

View File

@@ -36,6 +36,7 @@ document.addEventListener('DOMContentLoaded', async () => {
<img class="material-preview" src="${material.preview}" alt="${material.name}"> <img class="material-preview" src="${material.preview}" alt="${material.name}">
<div class="material-info"> <div class="material-info">
<h3>${material.name}</h3> <h3>${material.name}</h3>
<p class="author">${material.author}</p>
<p>${material.description}</p> <p>${material.description}</p>
<div class="material-tags"> <div class="material-tags">
${material.categories.map(cat => `<span class="tag" data-tag="${cat}">${cat}</span>`).join(' ')} ${material.categories.map(cat => `<span class="tag" data-tag="${cat}">${cat}</span>`).join(' ')}

View File

@@ -1,8 +1,13 @@
{ {
"materials": [ "materials": [
{ {
"author": "Litruv",
"name": "Vinette", "name": "Vinette",
"categories": ["photo", "fx", "vintage"], "categories": [
"photo",
"fx",
"vintage"
],
"preview": "./thumbnails/vinette.png", "preview": "./thumbnails/vinette.png",
"snippet": "snippets/vinette.txt", "snippet": "snippets/vinette.txt",
"description": "Adds a subtle darkened border around the edges of the image for a vintage effect." "description": "Adds a subtle darkened border around the edges of the image for a vintage effect."

View File

@@ -174,6 +174,14 @@ h1 {
font-size: 14px; font-size: 14px;
} }
.material-info .author {
color: var(--text-primary);
font-size: 12px;
margin-top: 5px;
margin-bottom: 10px;
font-weight: bold;
}
.material-tags { .material-tags {
margin-top: 10px; margin-top: 10px;
display: flex; display: flex;