defuss-shadcn / Website / Resume & Portfolio / availability
AvailabilityBLK
Says whether someone can be hired and on what terms - the status, a sentence, start, capacity, engagement and rate, and the ways to get in touch; a card or a banner across the page. Part of the Resume & Portfolio blocks.
On this page (5)
§Default
A card: the status (a pinging success dot - still under reduced motion), the heading, a sentence, the terms as a dl between two rules, the actions. The actions leave a printed page.
§Banner
data-variant='banner': one row across the page - status, heading and actions; it wraps when narrow.
§Spotlight
data-variant='spotlight': the closing call on the primary colour, the heading headline-sized; pattern-dots (shapes.css) adds texture in the text colour. Secondary buttons stand on it.
§CSS view file
/* -- Availability (website · Resume & Portfolio) -------------------------- Says whether someone can be hired and on what terms: the status (an Indicator dot and a word), a sentence, the facts (start, capacity, engagement, rate) as a <dl> and the ways to get in touch. A card (default) or one row across the page (banner). The dot's variant carries the status colour - no script. */@layer components { /* every box in the block measures border-box - the same on any page */ :where(.mk-availability, .mk-availability *, .mk-availability ::before, .mk-availability ::after) { box-sizing: border-box; } .mk-availability { container: mk-availability / inline-size; display: flex; flex-direction: column; align-items: flex-start; gap: 0.875rem; width: 100%; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--card); color: var(--card-foreground); box-shadow: var(--shadow-sm); } /* the status: an Indicator dot and a word */ .mk-availability-status { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; color: var(--muted-foreground); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; } .mk-availability-title { margin: 0; font-size: 1.25rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; text-wrap: balance; } .mk-availability-text { max-width: 40rem; margin: 0; color: var(--muted-foreground); font-size: 0.9375rem; line-height: 1.6; text-wrap: pretty; } /* start, capacity, engagement, rate: label over value, as many columns as fit */ .mk-availability-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 0.875rem 1.5rem; width: 100%; margin: 0.25rem 0; padding-block: 1rem; border-block: 1px solid var(--border); & div { display: grid; gap: 0.125rem; } & dt { color: var(--muted-foreground); font-size: 0.75rem; } & dd { margin: 0; font-size: 0.9375rem; font-weight: 500; } } .mk-availability-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; } /* banner: one row - status, the sentence, the actions; anything else on a row of its own */ .mk-availability[data-variant="banner"] { flex-flow: row wrap; align-items: center; gap: 0.75rem 1.25rem; padding: 0.875rem 1.25rem; box-shadow: none; & .mk-availability-title { flex: 1 1 16rem; font-size: 1rem; } & .mk-availability-text, & .mk-availability-facts { flex-basis: 100%; } } /* spotlight: the closing call - centered on the primary colour, the heading as large as a headline */ .mk-availability[data-variant="spotlight"] { align-items: center; gap: 1.25rem; padding: clamp(2rem, 7cqi, 4.5rem) clamp(1.25rem, 5cqi, 3rem); border-color: transparent; background: var(--primary); color: var(--primary-foreground); text-align: center; & .mk-availability-status { color: var(--primary-foreground); } & .mk-availability-title { max-width: 22ch; font-size: clamp(2rem, 1rem + 5cqi, 4.25rem); line-height: 1.02; letter-spacing: -0.035em; } & .mk-availability-text { color: color-mix(in oklch, var(--primary-foreground) 78%, transparent); } & .mk-availability-facts { border-color: color-mix(in oklch, var(--primary-foreground) 22%, transparent); & dt { color: color-mix(in oklch, var(--primary-foreground) 70%, transparent); } } & .mk-availability-actions { justify-content: center; } } /* -- Print ------------------------------------------------------ */ @media print { .mk-availability { break-inside: avoid; box-shadow: none; } .mk-availability-actions { display: none; } } /* -- Accessibility ------------------------------------------- */ @media (prefers-contrast: more) { .mk-availability { border-color: var(--foreground); } .mk-availability-status, .mk-availability-text, .mk-availability-facts dt { color: var(--foreground); } } @media (forced-colors: active) { .mk-availability[data-variant="spotlight"] { border-color: CanvasText; } .mk-availability, .mk-availability-facts { border-color: CanvasText; } }}Comments, ideas or improvements? Edit this page's source on GitHub