Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 29 additions & 25 deletions website/src/components/ProjectGridTemplate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,32 +137,36 @@ export default function ProjectGrids() {
<div>
<div className={styles.topRow}>
<h4 className={styles.projectName}>
{project.repository_url ? (
<a
href={
project.repository_url
}
target={
project.repository_url.startsWith(
'http'
)
? '_blank'
: '_self'
}
rel='noopener noreferrer'
className={
styles.modalLinkUrl_break_word
}
onClick={(e) =>
e.stopPropagation()
}
>
{project.name}
</a>
) : (
project.name
)}
{project.name}
</h4>
{project.repository_url && (
<a
href={project.repository_url}
target='_blank'
rel='noopener noreferrer'
className={styles.externalLinkIcon}
onClick={(e) =>
e.stopPropagation()
}
title="View repository"
>
<svg
width="16"
height="16"
fill="currentColor"
viewBox="0 0 16 16"
>
<path
fillRule="evenodd"
d="M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z"
/>
<path
fillRule="evenodd"
d="M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z"
/>
</svg>
</a>
)}
</div>
</div>

Expand Down
40 changes: 40 additions & 0 deletions website/src/components/ProjectGridTemplate/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,46 @@
.projectName {
overflow-wrap: break-word;
word-break: normal;
margin: 0;
font-size: 1.1rem;
font-weight: 600;
color: #333;
line-height: 1.3;
flex: 1;
padding-bottom: 6px;
}

[data-theme='dark'] .projectName {
color: #e5e5e5;
}

/* External link icon in top-right of card */
.externalLinkIcon {
color: #666;
transition: color 0.2s ease;
padding: 2px;
border-radius: 3px;
display: flex;
align-items: center;
justify-content: center;
min-width: 20px;
min-height: 20px;
margin-left: 8px;
flex-shrink: 0;
}

.externalLinkIcon:hover {
color: #0366d6;
background-color: rgba(3, 102, 214, 0.1);
}

[data-theme='dark'] .externalLinkIcon {
color: #888;
}

[data-theme='dark'] .externalLinkIcon:hover {
color: #58a6ff;
background-color: rgba(88, 166, 255, 0.1);
}

.topRow {
Expand Down