Skip to content

Update project cards style and layout #5098

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Aug 27, 2021
Merged
Changes from 3 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
49 changes: 34 additions & 15 deletions components/dashboard/src/projects/Projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ export default function () {
<button className="ml-2" onClick={() => onNewProject()}>New Project</button>
</div>
<div className="mt-4 grid grid-cols-3 gap-4">
{projects.map(p => (<div key={`project-${p.id}`} className="h-48">
<div className="h-5/6 border border-gray-200 dark:border-gray-800 rounded-t-xl">
<div className="h-3/4 p-6">
<div className="flex self-center text-base text-gray-900 dark:text-gray-50 font-medium">
{projects.map(p => (<div key={`project-${p.id}`} className="h-52">
<div className="h-42 border border-gray-100 dark:border-gray-800 rounded-t-xl">
<div className="h-32 p-6">
<div className="flex text-xl font-semibold text-gray-700 dark:text-gray-200 font-medium">
<Link to={`/${!!team ? team.slug : 'projects'}/${p.name}`}>
{p.name}
</Link>
Expand All @@ -122,27 +122,46 @@ export default function () {
}]} />
</div>
</div>
<p>{toRemoteURL(p.cloneUrl)}</p>
<Link to={`/`}>
<p className="hover:text-gray-600 dark:hover:text-gray-400 dark:text-gray-500">{toRemoteURL(p.cloneUrl)}</p>
</Link>
</div>
<div className="h-10 px-6 py-1 text-gray-400 text-sm">
<span className="hover:text-gray-600 dark:hover:text-gray-300">
<Link to={`/`}>
Branches
</Link>
</span>
<span className="mx-2 my-auto">·</span>
<span className="hover:text-gray-600 dark:hover:text-gray-300">
<Link to={`/`}>
Prebuilds
</Link>
</span>
</div>
<div className="h-1/4 px-6 py-1"><p>__ Active Branches</p></div>
</div>
<div className="h-1/6 px-6 border rounded-b-xl dark:border-gray-800 bg-gray-200 cursor-pointer" onClick={() => viewAllPrebuilds(p)}>
<div className="h-10 px-4 border rounded-b-xl dark:border-gray-800 bg-gray-100 border-gray-100 dark:bg-gray-800" onClick={() => viewAllPrebuilds(p)}>
{lastPrebuilds.get(p.id)
? (<div className="flex flex-row space-x-3 h-full text-sm">
<div className={"my-auto rounded-full w-3 h-3 text-sm align-middle " + (true ? "bg-green-500" : "bg-gray-400")}>
&nbsp;
</div>
<div className="my-auto">{lastPrebuilds.get(p.id)!.branch}</div>
<div className="my-auto text-gray-400">{moment(lastPrebuilds.get(p.id)!.startedAt, "YYYYMMDD").fromNow()}</div>
<div className="my-auto text-gray-400 flex-grow text-right">View All ⟶</div>
? (<div className="flex flex-row h-full text-sm justify-between">
<Link to={`/`} className="flex my-auto group space-x-2">
<div className={"my-auto rounded-full w-3 h-3 text-sm align-middle " + (true ? "bg-green-500" : "bg-gray-400")}>
&nbsp;
</div>
<div className="my-auto font-semibold text-gray-500">{lastPrebuilds.get(p.id)!.branch}</div>
<span className="mx-1 my-auto text-gray-600">·</span>
<div className="my-auto text-gray-400 flex-grow hover:text-gray-800 dark:hover:text-gray-300">{moment(lastPrebuilds.get(p.id)!.startedAt, "YYYYMMDD").fromNow()}</div>
</Link>
<Link to={`/`} className="my-auto group">
<div className="flex my-auto text-gray-400 flex-grow text-right group-hover:text-gray-600 dark:hover:text-gray-300">View All &rarr;</div>
</Link>
</div>)
: (<div className="flex h-full text-md">
<p className="my-auto ">No recent prebuilds</p>
</div>)}
</div>
</div>))}
<div key="new-project"
className="h-48 border-dashed border-2 border-gray-200 dark:border-gray-800 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-xl focus:bg-gitpod-kumquat-light transition ease-in-out group">
className="h-52 border-dashed border-2 border-gray-200 dark:border-gray-800 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-xl focus:bg-gitpod-kumquat-light transition ease-in-out group">
<Link to={newProjectUrl}>
<div className="flex h-full">
<div className="m-auto">New Project</div>
Expand Down