Skip to content
Merged
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
13 changes: 8 additions & 5 deletions src/components/NodeCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ export function NodeCard({ node }: { node: Node }) {
const logo = distroLogo(node)
const virt = virtLabel(node)
const cpu = cpuLabel(node)
const Wrapper = node.online ? 'a' : 'div'
const wrapperProps = node.online ? { href: `#${encodeURIComponent(node.uuid)}` } : {}

return (
<a href={`#${encodeURIComponent(node.uuid)}`} className="block">
<Wrapper {...wrapperProps} className={cn('block', !node.online && 'cursor-default')}>
<Card
className={cn(
'p-4 transition duration-300 hover:border-primary/60 hover:-translate-y-1 hover:scale-[1.01] flex flex-col gap-2.5 cyber-card',
node.online && 'cyber-card-active',
!node.online && 'opacity-60',
'p-4 transition duration-300 flex flex-col gap-2.5 cyber-card',
node.online && 'hover:border-primary/60 hover:-translate-y-1 hover:scale-[1.01] cyber-card-active',
!node.online && 'opacity-60 pointer-events-none select-none cyber-card-offline',
)}
>
<div className="cyber-orb" aria-hidden />
Expand Down Expand Up @@ -61,7 +64,7 @@ export function NodeCard({ node }: { node: Node }) {
</div>
)}
</Card>
</a>
</Wrapper>
)
}
function Metric({
Expand Down
20 changes: 20 additions & 0 deletions src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
0 20px 36px -20px rgba(30, 41, 59, 0.72),
0 0 0 1px rgba(56, 189, 248, 0.25),
0 0 32px -18px rgba(99, 102, 241, 0.65);
isolation: isolate;
}

.progress-glow {
Expand Down Expand Up @@ -186,6 +187,25 @@
transform: translateX(130%);
}

.cyber-card::selection {
background: transparent;
}

.cyber-card-active::before {
opacity: 0.56;
}

.cyber-card-active::after {
background:
linear-gradient(110deg, transparent 20%, rgba(125, 211, 252, 0.26) 44%, rgba(244, 114, 182, 0.24) 58%, transparent 78%),
linear-gradient(165deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.02) 46%, transparent 72%);
}

.cyber-card-offline::before,
.cyber-card-offline::after {
display: none;
}

.cyber-card-active {
animation: card-breathe 3.8s ease-in-out infinite;
}
Expand Down