Add a prominent link to the full portfolio
The top bar's accent button becomes Portfolio (Email stays in the hero and the contact band), the hero gets a Full portfolio button, and the project list ends with a large block linking to it. The link points at Gitea's list of repos with the portfolio topic; the sync supplies the count and the resume file can override the target and label. Also eases the display weight and tracking of the name in the dark theme. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XtcZtnG4GQA1d6mW5PNrS9
This commit is contained in:
+15
-2
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useMemo, useState } from 'react'
|
||||
import { planSpans, type Span } from '@/lib/plan'
|
||||
import type { Project } from '@/lib/types'
|
||||
import type { Portfolio, Project } from '@/lib/types'
|
||||
import Cover from './Cover'
|
||||
import styles from './projects.module.css'
|
||||
|
||||
@@ -69,9 +69,10 @@ type Props = {
|
||||
status: 'loading' | 'live' | 'offline'
|
||||
generatedAt?: string
|
||||
profileUrl: string
|
||||
portfolio: Portfolio
|
||||
}
|
||||
|
||||
export default function Projects({ projects, status, generatedAt, profileUrl }: Readonly<Props>) {
|
||||
export default function Projects({ projects, status, generatedAt, profileUrl, portfolio }: Readonly<Props>) {
|
||||
const spans = useMemo(() => planSpans(projects.length), [projects.length])
|
||||
return (
|
||||
<section className={styles.section} id="projects">
|
||||
@@ -102,6 +103,18 @@ export default function Projects({ projects, status, generatedAt, profileUrl }:
|
||||
<Item key={project.name} project={project} span={spans[index]} />
|
||||
))}
|
||||
</div>
|
||||
|
||||
{status === 'live' && projects.length > 0 && (
|
||||
<a className={styles.more} href={portfolio.href} target="_blank" rel="noreferrer">
|
||||
<span>
|
||||
<span className={styles.moreTitle}>There is more in the portfolio</span>
|
||||
<span className={styles.moreText}>
|
||||
{portfolio.count ? `${portfolio.count} projects in total, including the ones above.` : 'The full list of projects, including the ones above.'}
|
||||
</span>
|
||||
</span>
|
||||
<span className={styles.moreButton}>{portfolio.label ?? 'Open the portfolio'}</span>
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user