creator.html: Rendering ebenfalls auf dogiFeld() umgestellt (Zukunftssicherheit)
CREATORS ist aktuell noch leer, aber role/quote werden jetzt konsistent mit team-scouts.html/team-modis.html über dogiFeld() aufgelöst, damit künftige Creator-Profile automatisch mehrsprachig funktionieren, sobald sie in data-creator.js ergänzt werden.
This commit is contained in:
+9
-4
@@ -94,16 +94,21 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
`<button class="filter-btn${c === aktiverFilter ? " active" : ""}" data-filter="${c}">${c === "alle" ? uebersetzen("crt_filter_alle") : c}</button>`).join("");
|
||||
}
|
||||
|
||||
const feld = (x) => (window.dogiFeld ? window.dogiFeld(x) : x || "");
|
||||
|
||||
function draw(filter) {
|
||||
const items = filter === "alle" ? list : list.filter((c) => c.category === filter);
|
||||
grid.innerHTML = items.map((c) => `
|
||||
grid.innerHTML = items.map((c) => {
|
||||
const quoteText = feld(c.quote);
|
||||
return `
|
||||
<a class="profile-card" href="profil.html?p=${c.slug}">
|
||||
<div class="avatar">${(c.avatar || c.photo) ? `<img src="${c.avatar || c.photo}" alt="${c.name}" loading="lazy">` : `<span class="avatar-initial">${c.name.charAt(0).toUpperCase()}</span>`}</div>
|
||||
<h3>${c.name}</h3>
|
||||
<div class="role">${c.role}</div>
|
||||
${c.quote ? `<p class="quote">„${c.quote}"</p>` : ""}
|
||||
<div class="role">${feld(c.role)}</div>
|
||||
${quoteText ? `<p class="quote">„${quoteText}"</p>` : ""}
|
||||
<span class="btn btn-outline" style="margin-top:.7rem;pointer-events:none;">${uebersetzen("crt_profil_btn")}</span>
|
||||
</a>`).join("");
|
||||
</a>`;
|
||||
}).join("");
|
||||
}
|
||||
|
||||
filterBar.addEventListener("click", (e) => {
|
||||
|
||||
Reference in New Issue
Block a user