mirror of
https://github.com/avinal/avinal.github.io.git
synced 2026-07-04 07:40:09 +05:30
feat: add events page and music widget
- add music source from Listenbrainz, easter egg and evets page - update design of resume page Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
This commit is contained in:
@@ -0,0 +1,322 @@
|
||||
---
|
||||
import BaseLayout from "@/layouts/BaseLayout.astro";
|
||||
import eventsData from "@/data/events.json";
|
||||
|
||||
interface EventLink {
|
||||
label: string;
|
||||
url: string;
|
||||
}
|
||||
|
||||
interface EventEntry {
|
||||
name: string;
|
||||
date: string;
|
||||
location: string;
|
||||
role: "speaker" | "attendee" | "organizer" | "mentor";
|
||||
talk?: string;
|
||||
description?: string;
|
||||
blog?: string;
|
||||
links?: EventLink[];
|
||||
}
|
||||
|
||||
const events = (eventsData as EventEntry[]).sort(
|
||||
(a, b) => new Date(b.date).getTime() - new Date(a.date).getTime(),
|
||||
);
|
||||
|
||||
function fmtDate(iso: string) {
|
||||
const d = new Date(iso);
|
||||
return `${d.getDate()} ${d.toLocaleString("en-US", { month: "short" })} ${d.getFullYear()}`;
|
||||
}
|
||||
|
||||
const roleLabels: Record<string, string> = {
|
||||
speaker: "Speaker",
|
||||
attendee: "Attendee",
|
||||
organizer: "Organizer",
|
||||
mentor: "Mentor",
|
||||
};
|
||||
|
||||
const linkIcons: Record<string, string> = {
|
||||
slides: `<rect x="2" y="3" width="20" height="14" rx="2" ry="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/>`,
|
||||
recording: `<polygon points="5 3 19 12 5 21 5 3"/>`,
|
||||
video: `<polygon points="5 3 19 12 5 21 5 3"/>`,
|
||||
photos: `<rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/>`,
|
||||
github: `<path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"/>`,
|
||||
website: `<circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/>`,
|
||||
default: `<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/>`,
|
||||
};
|
||||
|
||||
function iconForLabel(label: string): string {
|
||||
const key = label.toLowerCase();
|
||||
for (const [k, v] of Object.entries(linkIcons)) {
|
||||
if (key.includes(k)) return v;
|
||||
}
|
||||
return linkIcons.default;
|
||||
}
|
||||
---
|
||||
|
||||
<BaseLayout title="Events" description="Conferences, meetups, and events attended or spoken at">
|
||||
<div class="events-page">
|
||||
<header class="events-header">
|
||||
<h1>Events</h1>
|
||||
<p class="events-desc">
|
||||
Conferences, summits, and meetups I've attended or spoken at.
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<div class="timeline">
|
||||
{events.map((ev) => (
|
||||
<div class={`tl-entry ev-${ev.role}`}>
|
||||
<div class="tl-label-cell">
|
||||
<span class="tl-type-label">{roleLabels[ev.role]}</span>
|
||||
</div>
|
||||
<div class="tl-rail-cell">
|
||||
<div class="tl-dot" />
|
||||
</div>
|
||||
<div class="tl-card">
|
||||
<div class="tl-card-header">
|
||||
<div class="tl-dates">
|
||||
{fmtDate(ev.date)}
|
||||
<span class="tl-location">
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/><circle cx="12" cy="10" r="3"/></svg>
|
||||
{ev.location}
|
||||
</span>
|
||||
</div>
|
||||
<h3 class="tl-title">{ev.name}</h3>
|
||||
</div>
|
||||
|
||||
{ev.talk && <p class="event-talk">{ev.talk}</p>}
|
||||
{ev.description && <p class="event-description">{ev.description}</p>}
|
||||
|
||||
{((ev.links && ev.links.length > 0) || ev.blog) && (
|
||||
<div class="event-links">
|
||||
{ev.links?.map((link) => (
|
||||
<a href={link.url} class="event-link" target="_blank" rel="noopener noreferrer">
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><Fragment set:html={iconForLabel(link.label)} /></svg>
|
||||
{link.label}
|
||||
</a>
|
||||
))}
|
||||
{ev.blog && (
|
||||
<a href={ev.blog} class="event-link blog-link">
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/></svg>
|
||||
Blog Post
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</BaseLayout>
|
||||
|
||||
<style>
|
||||
.events-page {
|
||||
max-width: var(--max-w-page);
|
||||
margin-inline: auto;
|
||||
}
|
||||
|
||||
.events-header {
|
||||
margin-bottom: var(--space-10);
|
||||
}
|
||||
|
||||
.events-header h1 {
|
||||
margin-bottom: var(--space-3);
|
||||
}
|
||||
|
||||
.events-desc {
|
||||
font-size: var(--text-lg);
|
||||
color: var(--text-secondary);
|
||||
line-height: var(--leading-relaxed);
|
||||
max-width: var(--max-w-prose);
|
||||
}
|
||||
|
||||
/* ---- Timeline ---- */
|
||||
.timeline {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-1);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tl-entry {
|
||||
display: grid;
|
||||
grid-template-columns: 64px 24px 1fr;
|
||||
gap: 0 var(--space-2);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tl-label-cell {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-end;
|
||||
padding-top: var(--space-5);
|
||||
padding-right: var(--space-2);
|
||||
}
|
||||
|
||||
.tl-type-label {
|
||||
font-size: 9px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ev-speaker .tl-type-label { color: var(--accent); }
|
||||
.ev-attendee .tl-type-label { color: #10b981; }
|
||||
.ev-organizer .tl-type-label { color: #f59e0b; }
|
||||
.ev-mentor .tl-type-label { color: #8b5cf6; }
|
||||
|
||||
.tl-rail-cell {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tl-dot {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 50%;
|
||||
border: 2px solid var(--accent);
|
||||
background: var(--bg);
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
margin-top: var(--space-5);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.ev-speaker .tl-dot { border-color: var(--accent); }
|
||||
.ev-attendee .tl-dot { border-color: #10b981; }
|
||||
.ev-organizer .tl-dot { border-color: #f59e0b; }
|
||||
.ev-mentor .tl-dot { border-color: #8b5cf6; }
|
||||
|
||||
.tl-rail-cell::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: calc(var(--space-5) + 12px);
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
width: 2px;
|
||||
background: var(--border);
|
||||
transform: translateX(-50%);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.tl-entry:last-child .tl-rail-cell::after { display: none; }
|
||||
|
||||
.tl-card {
|
||||
padding: var(--space-4) var(--space-5);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--bg-surface);
|
||||
transition: border-color var(--duration-fast) var(--ease-out),
|
||||
box-shadow var(--duration-fast) var(--ease-out);
|
||||
}
|
||||
|
||||
.tl-card:hover {
|
||||
border-color: var(--border-strong);
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.tl-dates {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
font-size: var(--text-xs);
|
||||
font-weight: 500;
|
||||
color: var(--text-muted);
|
||||
margin-bottom: var(--space-1);
|
||||
font-variant-numeric: tabular-nums;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.tl-location {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: var(--text-xs);
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.tl-title {
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
margin-bottom: var(--space-1);
|
||||
}
|
||||
|
||||
.event-talk {
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 500;
|
||||
font-style: italic;
|
||||
color: var(--accent);
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
|
||||
.event-talk::before {
|
||||
content: "\201C";
|
||||
}
|
||||
|
||||
.event-talk::after {
|
||||
content: "\201D";
|
||||
}
|
||||
|
||||
.event-description {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--text-secondary);
|
||||
line-height: var(--leading-relaxed);
|
||||
}
|
||||
|
||||
.event-links {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-3);
|
||||
margin-top: var(--space-4);
|
||||
padding-top: var(--space-3);
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.event-link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: var(--text-xs);
|
||||
font-weight: 500;
|
||||
color: var(--text-muted);
|
||||
text-decoration: none;
|
||||
padding: var(--space-1) var(--space-2);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-full);
|
||||
transition: all var(--duration-fast) var(--ease-out);
|
||||
}
|
||||
|
||||
.event-link:hover {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent);
|
||||
background-color: var(--accent-subtle);
|
||||
}
|
||||
|
||||
.blog-link {
|
||||
color: var(--accent);
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
/* ---- Responsive ---- */
|
||||
@media (max-width: 768px) {
|
||||
.tl-entry {
|
||||
grid-template-columns: 48px 16px 1fr;
|
||||
}
|
||||
|
||||
.tl-type-label { font-size: 8px; }
|
||||
|
||||
.tl-dot {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.tl-dates {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: var(--space-1);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -2,7 +2,7 @@
|
||||
import { getCollection } from "astro:content";
|
||||
import BaseLayout from "@/layouts/BaseLayout.astro";
|
||||
import HeroCard from "@/components/HeroCard.astro";
|
||||
import GameOfLife from "@/components/GameOfLife.astro";
|
||||
import MusicPlayer from "@/components/MusicPlayer.astro";
|
||||
import ActivityRow from "@/components/ActivityRow.astro";
|
||||
import RepoList from "@/components/RepoList.astro";
|
||||
import RecentPosts from "@/components/RecentPosts.astro";
|
||||
@@ -10,13 +10,15 @@ import RecentPosts from "@/components/RecentPosts.astro";
|
||||
import { fetchGitHubUser, fetchGitHubRepos, fetchContributions } from "@/lib/github";
|
||||
import { fetchWakaTimeData } from "@/lib/wakatime";
|
||||
import { mergeActivity } from "@/lib/activity";
|
||||
import { fetchListenBrainzData } from "@/lib/listenbrainz";
|
||||
|
||||
const [user, repos, contributions, wakatime, allPosts] = await Promise.all([
|
||||
const [user, repos, contributions, wakatime, allPosts, listenBrainz] = await Promise.all([
|
||||
fetchGitHubUser(),
|
||||
fetchGitHubRepos(),
|
||||
fetchContributions(),
|
||||
fetchWakaTimeData(),
|
||||
getCollection("posts", ({ data }) => !data.draft),
|
||||
fetchListenBrainzData(),
|
||||
]);
|
||||
|
||||
const activity = mergeActivity(contributions, wakatime);
|
||||
@@ -28,7 +30,7 @@ const recentPosts = allPosts
|
||||
|
||||
<BaseLayout title="Home">
|
||||
<div class="bento">
|
||||
<!-- Row 1: Hero (profile+about+skills+links) | Game of Life widget -->
|
||||
<!-- Row 1: Hero (profile+about+skills+links) | Now Playing widget -->
|
||||
<div class="bento-8">
|
||||
<HeroCard
|
||||
name="Avinal Kumar"
|
||||
@@ -39,7 +41,7 @@ const recentPosts = allPosts
|
||||
</div>
|
||||
|
||||
<div class="bento-4">
|
||||
<GameOfLife />
|
||||
<MusicPlayer lb={listenBrainz} />
|
||||
</div>
|
||||
|
||||
<!-- Row 2: Activity graph + stats (side by side in one card) -->
|
||||
|
||||
@@ -11,7 +11,7 @@ export async function getStaticPaths() {
|
||||
}
|
||||
|
||||
const { post } = Astro.props;
|
||||
const { Content, headings } = await render(post);
|
||||
const { Content } = await render(post);
|
||||
|
||||
const wordCount = post.body?.split(/\s+/).length ?? 0;
|
||||
const minutes = Math.max(1, Math.round(wordCount / 220));
|
||||
@@ -27,7 +27,6 @@ const readingTime = `${minutes} min read`;
|
||||
tags={post.data.tags}
|
||||
image={post.data.image}
|
||||
readingTime={readingTime}
|
||||
headings={headings}
|
||||
>
|
||||
<Content />
|
||||
</PostLayout>
|
||||
|
||||
+264
-46
@@ -2,13 +2,21 @@
|
||||
import BaseLayout from "@/layouts/BaseLayout.astro";
|
||||
import resume from "@/data/resume.json";
|
||||
|
||||
const { basics, work, volunteer, education, skills, projects, languages, certificates } = resume as any;
|
||||
const { basics, work, volunteer, education, skills, projects } = resume as any;
|
||||
|
||||
function fmtDate(iso: string) {
|
||||
const d = new Date(iso);
|
||||
return d.toLocaleDateString("en-US", { month: "short", year: "numeric" });
|
||||
}
|
||||
|
||||
type Role = {
|
||||
title: string;
|
||||
startDate: string;
|
||||
endDate?: string;
|
||||
summary?: string;
|
||||
highlights?: string[];
|
||||
};
|
||||
|
||||
type TimelineEntry = {
|
||||
type: "work" | "education" | "volunteer";
|
||||
title: string;
|
||||
@@ -19,20 +27,105 @@ type TimelineEntry = {
|
||||
endDate?: string;
|
||||
summary?: string;
|
||||
highlights?: string[];
|
||||
roles?: Role[];
|
||||
};
|
||||
|
||||
type FlatEntry = {
|
||||
key: string;
|
||||
type: TimelineEntry["type"];
|
||||
title: string;
|
||||
subtitle: string;
|
||||
url?: string;
|
||||
location?: string;
|
||||
startDate: string;
|
||||
endDate?: string;
|
||||
summary?: string;
|
||||
highlights?: string[];
|
||||
};
|
||||
|
||||
/**
|
||||
* Groups flat entries by their `key` (organization/company name).
|
||||
* Single-entry orgs stay flat; multi-entry orgs become grouped cards
|
||||
* with nested roles sorted reverse-chronologically.
|
||||
*/
|
||||
function groupToTimeline(entries: FlatEntry[]): TimelineEntry[] {
|
||||
const byKey = new Map<string, FlatEntry[]>();
|
||||
for (const e of entries) {
|
||||
if (!byKey.has(e.key)) byKey.set(e.key, []);
|
||||
byKey.get(e.key)!.push(e);
|
||||
}
|
||||
|
||||
const result: TimelineEntry[] = [];
|
||||
for (const [, items] of byKey) {
|
||||
const sorted = [...items].sort(
|
||||
(a, b) => new Date(b.startDate).getTime() - new Date(a.startDate).getTime(),
|
||||
);
|
||||
const latest = sorted[0];
|
||||
|
||||
if (sorted.length === 1) {
|
||||
result.push({
|
||||
type: latest.type,
|
||||
title: latest.title,
|
||||
subtitle: latest.subtitle,
|
||||
url: latest.url,
|
||||
location: latest.location,
|
||||
startDate: latest.startDate,
|
||||
endDate: latest.endDate,
|
||||
summary: latest.summary,
|
||||
highlights: latest.highlights,
|
||||
});
|
||||
} else {
|
||||
const earliest = sorted[sorted.length - 1];
|
||||
result.push({
|
||||
type: latest.type,
|
||||
title: latest.subtitle,
|
||||
subtitle: latest.subtitle,
|
||||
url: latest.url,
|
||||
location: latest.location,
|
||||
startDate: latest.startDate,
|
||||
endDate: latest.endDate,
|
||||
roles: sorted.map((e) => ({
|
||||
title: e.title,
|
||||
startDate: e.startDate,
|
||||
endDate: e.endDate,
|
||||
summary: e.summary,
|
||||
highlights: e.highlights,
|
||||
})),
|
||||
});
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
const workFlat: FlatEntry[] = work.map((w: any) => ({
|
||||
key: w.name,
|
||||
type: "work" as const,
|
||||
title: w.position,
|
||||
subtitle: w.name,
|
||||
url: w.url || undefined,
|
||||
location: w.location,
|
||||
startDate: w.startDate,
|
||||
endDate: w.endDate,
|
||||
summary: w.summary,
|
||||
highlights: w.highlights,
|
||||
}));
|
||||
|
||||
const volunteerFlat: FlatEntry[] = volunteer.map((v: any) => ({
|
||||
key: v.organization,
|
||||
type: "volunteer" as const,
|
||||
title: v.position,
|
||||
subtitle: v.organization,
|
||||
url: v.url || undefined,
|
||||
location: undefined,
|
||||
startDate: v.startDate,
|
||||
endDate: v.endDate,
|
||||
summary: v.summary,
|
||||
highlights: undefined as string[] | undefined,
|
||||
}));
|
||||
|
||||
const timeline: TimelineEntry[] = [
|
||||
...work.map((w) => ({
|
||||
type: "work" as const,
|
||||
title: w.position,
|
||||
subtitle: w.name,
|
||||
url: w.url || undefined,
|
||||
location: (w as any).location,
|
||||
startDate: w.startDate,
|
||||
endDate: w.endDate,
|
||||
summary: w.summary,
|
||||
highlights: w.highlights,
|
||||
})),
|
||||
...groupToTimeline(workFlat),
|
||||
...groupToTimeline(volunteerFlat),
|
||||
...education.map((e: any) => ({
|
||||
type: "education" as const,
|
||||
title: e.area ? `${e.studyType} in ${e.area}` : e.studyType,
|
||||
@@ -44,24 +137,8 @@ const timeline: TimelineEntry[] = [
|
||||
summary: e.score ? `CGPA: ${e.score}` : undefined,
|
||||
highlights: undefined as string[] | undefined,
|
||||
})),
|
||||
...volunteer.map((v) => ({
|
||||
type: "volunteer" as const,
|
||||
title: v.position,
|
||||
subtitle: v.organization,
|
||||
url: v.url || undefined,
|
||||
startDate: v.startDate || "2022-01-01",
|
||||
endDate: v.endDate,
|
||||
summary: v.summary,
|
||||
highlights: undefined as string[] | undefined,
|
||||
})),
|
||||
].sort((a, b) => new Date(b.startDate).getTime() - new Date(a.startDate).getTime());
|
||||
|
||||
const typeIcons: Record<string, string> = {
|
||||
work: "briefcase",
|
||||
education: "graduation",
|
||||
volunteer: "heart",
|
||||
};
|
||||
|
||||
const typeLabels: Record<string, string> = {
|
||||
work: "Work",
|
||||
education: "Education",
|
||||
@@ -101,34 +178,72 @@ const typeLabels: Record<string, string> = {
|
||||
<section class="timeline-section">
|
||||
<h2>Experience & Education</h2>
|
||||
<div class="timeline">
|
||||
{timeline.map((entry) => (
|
||||
{timeline.map((entry) => {
|
||||
const isActive = !entry.endDate;
|
||||
return (
|
||||
<div class={`tl-entry tl-${entry.type}`}>
|
||||
<div class="tl-label-cell">
|
||||
<span class="tl-type-label">{typeLabels[entry.type]}</span>
|
||||
</div>
|
||||
<div class="tl-rail-cell">
|
||||
<div class="tl-dot" />
|
||||
<div class:list={["tl-dot", { "tl-dot-active": isActive }]} />
|
||||
</div>
|
||||
<div class="tl-card">
|
||||
<div class="tl-card-header">
|
||||
<div class="tl-dates">
|
||||
{fmtDate(entry.startDate)} — {entry.endDate ? fmtDate(entry.endDate) : "Present"}
|
||||
</div>
|
||||
<h3 class="tl-title">{entry.title}</h3>
|
||||
<p class="tl-subtitle">
|
||||
{entry.url ? <a href={entry.url}>{entry.subtitle}</a> : entry.subtitle}
|
||||
{entry.location && <span class="tl-location"> · {entry.location}</span>}
|
||||
</p>
|
||||
</div>
|
||||
{entry.summary && <p class="tl-summary">{entry.summary}</p>}
|
||||
{entry.highlights && entry.highlights.length > 0 && (
|
||||
<ul class="tl-highlights">
|
||||
{entry.highlights.map((h) => <li>{h}</li>)}
|
||||
</ul>
|
||||
{entry.roles ? (
|
||||
/* Grouped card: multiple roles at the same org */
|
||||
<Fragment>
|
||||
<div class="tl-card-header">
|
||||
<div class="tl-dates">
|
||||
{fmtDate(entry.roles[entry.roles.length - 1].startDate)} — {entry.endDate ? fmtDate(entry.endDate) : "Present"}
|
||||
</div>
|
||||
<h3 class="tl-title tl-org-title">
|
||||
{entry.url ? <a href={entry.url}>{entry.subtitle}</a> : entry.subtitle}
|
||||
</h3>
|
||||
{entry.location && <p class="tl-subtitle"><span class="tl-location">{entry.location}</span></p>}
|
||||
</div>
|
||||
<div class="tl-roles">
|
||||
{entry.roles.map((role, i) => (
|
||||
<div class:list={["tl-role", { "tl-role-current": i === 0 }]}>
|
||||
<div class="tl-role-header">
|
||||
<h4 class="tl-role-title">{role.title}</h4>
|
||||
<span class="tl-role-dates">
|
||||
{fmtDate(role.startDate)} — {role.endDate ? fmtDate(role.endDate) : "Present"}
|
||||
</span>
|
||||
</div>
|
||||
{role.summary && <p class="tl-summary">{role.summary}</p>}
|
||||
{role.highlights && role.highlights.length > 0 && (
|
||||
<ul class="tl-highlights">
|
||||
{role.highlights.map((h) => <li>{h}</li>)}
|
||||
</ul>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</Fragment>
|
||||
) : (
|
||||
/* Single card */
|
||||
<Fragment>
|
||||
<div class="tl-card-header">
|
||||
<div class="tl-dates">
|
||||
{fmtDate(entry.startDate)} — {entry.endDate ? fmtDate(entry.endDate) : "Present"}
|
||||
</div>
|
||||
<h3 class="tl-title">{entry.title}</h3>
|
||||
<p class="tl-subtitle">
|
||||
{entry.url ? <a href={entry.url}>{entry.subtitle}</a> : entry.subtitle}
|
||||
{entry.location && <span class="tl-location"> · {entry.location}</span>}
|
||||
</p>
|
||||
</div>
|
||||
{entry.summary && <p class="tl-summary">{entry.summary}</p>}
|
||||
{entry.highlights && entry.highlights.length > 0 && (
|
||||
<ul class="tl-highlights">
|
||||
{entry.highlights.map((h) => <li>{h}</li>)}
|
||||
</ul>
|
||||
)}
|
||||
</Fragment>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
)})}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -349,6 +464,40 @@ const typeLabels: Record<string, string> = {
|
||||
.tl-education .tl-dot { border-color: #10b981; background: #10b981; }
|
||||
.tl-volunteer .tl-dot { border-color: #f59e0b; }
|
||||
|
||||
.tl-dot-active {
|
||||
animation: pulse-dot 2s ease-out infinite;
|
||||
}
|
||||
|
||||
.tl-work .tl-dot-active {
|
||||
background: var(--accent);
|
||||
border-color: var(--accent);
|
||||
--pulse-color: var(--accent);
|
||||
}
|
||||
|
||||
.tl-education .tl-dot-active {
|
||||
background: #10b981;
|
||||
border-color: #10b981;
|
||||
--pulse-color: #10b981;
|
||||
}
|
||||
|
||||
.tl-volunteer .tl-dot-active {
|
||||
background: #f59e0b;
|
||||
border-color: #f59e0b;
|
||||
--pulse-color: #f59e0b;
|
||||
}
|
||||
|
||||
@keyframes pulse-dot {
|
||||
0% {
|
||||
box-shadow: 0 0 0 0 color-mix(in srgb, var(--pulse-color) 50%, transparent);
|
||||
}
|
||||
70% {
|
||||
box-shadow: 0 0 0 8px color-mix(in srgb, var(--pulse-color) 0%, transparent);
|
||||
}
|
||||
100% {
|
||||
box-shadow: 0 0 0 0 color-mix(in srgb, var(--pulse-color) 0%, transparent);
|
||||
}
|
||||
}
|
||||
|
||||
.tl-card {
|
||||
padding: var(--space-4) var(--space-5);
|
||||
border: 1px solid var(--border);
|
||||
@@ -426,6 +575,75 @@ const typeLabels: Record<string, string> = {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* ---- Grouped roles ---- */
|
||||
.tl-org-title {
|
||||
font-size: var(--text-lg);
|
||||
}
|
||||
|
||||
.tl-org-title a {
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.tl-org-title a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.tl-roles {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0;
|
||||
margin-top: var(--space-4);
|
||||
}
|
||||
|
||||
.tl-role {
|
||||
padding: var(--space-3) 0 var(--space-3) var(--space-4);
|
||||
border-left: 2px solid var(--border);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tl-role::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: -5px;
|
||||
top: calc(var(--space-3) + 6px);
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: var(--border);
|
||||
}
|
||||
|
||||
.tl-role-current::before {
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
.tl-role-current {
|
||||
border-left-color: var(--accent);
|
||||
}
|
||||
|
||||
.tl-role-header {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: var(--space-3);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.tl-role-title {
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.tl-role-current .tl-role-title {
|
||||
font-size: var(--text-base);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.tl-role-dates {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--text-muted);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
/* ---- Two column: Skills + Projects ---- */
|
||||
.two-col {
|
||||
display: grid;
|
||||
|
||||
Reference in New Issue
Block a user