mirror of
https://github.com/github/awesome-copilot.git
synced 2026-07-14 18:11:01 +00:00
chore: publish from main
This commit is contained in:
@@ -36,7 +36,7 @@ export function renderSharedCardHtml(item: SharedCardRenderItem): string {
|
||||
: "resource-item";
|
||||
|
||||
return `
|
||||
<article class="${articleClass}" role="${escapeHtml(role)}"${item.tabIndex !== undefined ? ` tabindex="${String(item.tabIndex)}"` : ""}${renderAttributes(item.articleAttributes)}>
|
||||
<div class="${articleClass}" role="${escapeHtml(role)}"${item.tabIndex !== undefined ? ` tabindex="${String(item.tabIndex)}"` : ""}${renderAttributes(item.articleAttributes)}>
|
||||
<button type="button" class="resource-preview">
|
||||
${item.previewMediaHtml || ""}
|
||||
<div class="resource-info">
|
||||
@@ -49,6 +49,6 @@ export function renderSharedCardHtml(item: SharedCardRenderItem): string {
|
||||
</div>
|
||||
</button>
|
||||
${item.actionsHtml ? `<div class="resource-actions">${item.actionsHtml}</div>` : ""}
|
||||
</article>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ import {
|
||||
getGitHubHandle,
|
||||
getGitHubUrl,
|
||||
getLastUpdatedHtml,
|
||||
sanitizeUrl,
|
||||
} from "../utils";
|
||||
import { renderEmptyStateHtml, renderSharedCardHtml } from "./card-render";
|
||||
|
||||
@@ -111,15 +110,9 @@ export function renderExtensionsHtml(items: RenderableExtension[]): string {
|
||||
? getGitHubHandle(authorUrl, authorName)
|
||||
: authorName || "";
|
||||
const authorHtml = authorName
|
||||
? `<span class="resource-tag resource-author">by ${
|
||||
authorUrl
|
||||
? `<a href="${escapeHtml(
|
||||
sanitizeUrl(authorUrl)
|
||||
)}" target="_blank" rel="noopener noreferrer" title="${escapeHtml(
|
||||
authorName
|
||||
)}">${escapeHtml(authorHandle)}</a>`
|
||||
: escapeHtml(authorName)
|
||||
}</span>`
|
||||
? `<span class="resource-tag resource-author" title="${escapeHtml(
|
||||
authorName
|
||||
)}">by ${escapeHtml(authorHandle || authorName)}</span>`
|
||||
: "";
|
||||
|
||||
const metaHtml = `
|
||||
@@ -161,7 +154,6 @@ export function renderExtensionsHtml(items: RenderableExtension[]): string {
|
||||
infoExtraHtml,
|
||||
metaHtml,
|
||||
actionsHtml,
|
||||
tabIndex: 0,
|
||||
articleAttributes: {
|
||||
id: item.id,
|
||||
"data-extension-id": item.id,
|
||||
|
||||
Reference in New Issue
Block a user