Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluscream committed Apr 6, 2024
1 parent b512c15 commit de15df4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions assets/js/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ function generateCard(data) {
/* */
let html = `
<div class="col">
<div class="card shadow-sm">
<svg class="bd-placeholder-img card-img-top" width="auto" height="auto" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Source Icon" preserveAspectRatio="xMidYMid slice" focusable="false">
<title>${data.name} Source Icon</title>`;
<div class="card shadow-sm">`;
if (data.iconUrl) {
html += `<img src="${data.iconUrl}" width="auto" height="auto"></img>`;
html += `<img alt="${data.name}" src="${data.iconUrl}" width="auto" height="auto"></img>`;
} else {
html += '<rect width="auto" height="auto" fill="#55595c"></rect>';
html += `<svg class="bd-placeholder-img card-img-top" width="auto" height="auto" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Source Icon" preserveAspectRatio="xMidYMid slice" focusable="false">
<title>${data.name} Source Icon</title>
<rect width="auto" height="auto" fill="#55595c"></rect>
<text x="50%" y="50%" fill="#eceeef" dy=".3em">${data.name}</text>
</svg>`;
}
html +=`<text x="50%" y="50%" fill="#eceeef" dy=".3em">${data.name}</text>
</svg>
<div class="card-body">
html +=`<div class="card-body">
<p class="card-text">${data.description}</p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
Expand Down

0 comments on commit de15df4

Please sign in to comment.