Skip to content
Open
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
68 changes: 64 additions & 4 deletions src/components/Button.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Icon } from 'astro-icon/components';

export interface Props {
colorScheme:
colorScheme?:
| 'whiteAlpha'
| 'blackAlpha'
| 'gray'
Expand All @@ -24,7 +24,7 @@ export interface Props {
style?: string;
href?: string;
icon?: string;
variant?: 'ghost' | 'solid';
variant?: 'ghost' | 'solid' | 'primary' | 'secondary';
target?: string;
}
const {
Expand All @@ -35,9 +35,17 @@ const {
variant = 'solid',
target = '_blank',
} = Astro.props as Props;

const isPrimary = variant === 'primary';
const isSecondary = variant === 'secondary';
const classes = [
'button',
isPrimary ? 'button-primary' : isSecondary ? 'button-secondary' : `button-${colorScheme}`,
isPrimary || isSecondary ? '' : variant,
].filter(Boolean);
---

<div role="presentation" class:list={['button', `button-${colorScheme}`, variant]} {style}>
<div role="presentation" class:list={classes} {style}>
<a href={href} target={target}>
{icon && <Icon name={icon} />}
<slot />
Expand All @@ -54,13 +62,65 @@ const {
cursor: pointer;
width: fit-content;
}
.button a {
.button a,
.button a:hover,
.button a:focus-visible {
display: flex;
align-items: center;
color: inherit;
text-decoration: none;
}

/* Primary button — matches mergify.com */
.button.button-primary {
background-color: #000;
color: #fff;
border-radius: 12px;
padding: 10px 16px;
font-size: 0.875rem;
font-weight: 600;
line-height: 20px;
transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);

&:hover {
background-color: #3e434c;
}
}

/* Secondary button — matches mergify.com */
.button.button-secondary {
background-color: rgba(255, 255, 255, 0.6);
color: #000;
border-radius: 12px;
padding: 10px 16px;
font-size: 0.875rem;
font-weight: 500;
line-height: 20px;
transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);

&:hover {
background-color: rgba(255, 255, 255, 0.8);
}
}

.theme-dark .button.button-primary {
background-color: #fff;
color: #000;

&:hover {
background-color: #d1d5db;
}
}

.theme-dark .button.button-secondary {
background-color: rgba(255, 255, 255, 0.1);
color: #fff;

&:hover {
background-color: rgba(255, 255, 255, 0.2);
}
}

@mixin generate-button-styles($colorSchemes) {
@each $colorScheme in $colorSchemes {
.button-#{$colorScheme}.solid {
Expand Down
4 changes: 2 additions & 2 deletions src/components/PageContent/PageContent.astro
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const suppressTitle = content.suppressTitle;
border-style: solid;
border-bottom-width: 1px;
width: 100%;
margin-top: 16px !important;
margin-top: 28px !important;
margin-bottom: 32px;
}

Expand Down Expand Up @@ -100,7 +100,7 @@ const suppressTitle = content.suppressTitle;
grid-template-columns: minmax(0, 1fr) auto;
gap: 0.75rem;
align-items: center;
margin-bottom: 0.75rem;
margin-bottom: 2rem;
}
:global(.page-heading-bar__breadcrumbs) {
min-width: 0;
Expand Down
11 changes: 4 additions & 7 deletions src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
<div class="home-hero">
<div class="hero-inner">
<h1 class="content-title">Ship Code Faster, Break Less</h1>
<p class="tagline content-subtitle">
Mergify eliminates broken builds, tames flaky tests, and cuts CI waste—so
your team ships with confidence.
</p>
<div class="tagline content-subtitle">Mergify eliminates broken builds, tames flaky tests, and cuts CI waste—so your team ships with confidence.</div>

Check failure on line 18 in src/content/docs/index.mdx

View workflow job for this annotation

GitHub Actions / lint

Unexpected `156` character line, expected at most `120` characters, remove `36` characters
</div>
</div>

Expand Down Expand Up @@ -88,9 +85,9 @@
<h2 class="home-title">Get Started</h2>

<div class="home-get-started">
<Button colorScheme="teal" href="/merge-queue/setup" target="_self">Set up Merge Queue</Button>
<Button colorScheme="gray" href="/ci-insights" target="_self">Enable CI Insights</Button>
<Button colorScheme="gray" href="/monorepo-ci/github-actions" target="_self">Configure Monorepo CI</Button>
<Button variant="primary" href="/merge-queue/setup" target="_self">Set up Merge Queue</Button>
<Button variant="primary" href="/ci-insights" target="_self">Enable CI Insights</Button>
<Button variant="primary" href="/monorepo-ci/github-actions" target="_self">Configure Monorepo CI</Button>
</div>

<a href="https://mergify.com/discovery" class="home-discovery">
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/merge-queue.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Stop wasting engineering time on merge conflicts and broken main branches.
Mergify's merge queue tests every PR against the latest code before merging,
while parallel execution and smart batching keep your team shipping fast.

<Button colorScheme="teal" href="/merge-queue/setup" target="_self">
<Button variant="primary" href="/merge-queue/setup" target="_self">
Get Started →
</Button>

Expand Down
100 changes: 58 additions & 42 deletions src/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -591,20 +591,27 @@ a.current-header-link {
/* Home page specific styles moved from inline MDX */
.home-hero {
padding: 2.5rem 0 1rem;
text-align: center;
text-align: left;
}
.hero-inner {
max-width: 60rem;
margin: 0 auto;
}
.hero-inner h1 {
font-size: clamp(2.2rem, 4.5vw, 3.2rem);
margin: 0 0 0.75rem;
letter-spacing: -0.02em;
font-size: clamp(var(--text-4xl), 4.5vw, 2.5rem);
margin: 0;
font-weight: 500;
letter-spacing: -0.03em;
}
.home-hero .content-title {
margin-bottom: 0;
}
#home .home-hero .tagline {
margin-top: 0.65rem;
}
.tagline {
font-size: 1.15rem;
margin: 0 auto 1.25rem;
font-size: var(--text-lg);
margin: 0 0 2rem;
max-width: 46rem;
font-weight: 400;
}
Expand Down Expand Up @@ -807,41 +814,46 @@ pre {
}

.content-title {
font-family: var(--font-brand);
font-size: 2rem;
font-weight: 700;
font-size: var(--text-4xl);
font-weight: 500;
line-height: 1.2;
margin-bottom: 0.5em;
letter-spacing: -0.025em;
margin-bottom: 0.25em;
}

.content-subtitle {
font-family: var(--font-brand);
font-size: 1.1rem;
font-size: var(--text-lg);
font-weight: 400;
line-height: 1.4;
line-height: 1.5;
text-wrap: balance;
}

.main-content h2 {
font-family: var(--font-body);
font-weight: 600;
font-size: 1.5rem;
letter-spacing: 0;
#main-content .content-subtitle {
font-size: var(--text-lg);
color: var(--theme-text-lighter);
}

.main-content h3 {
font-family: var(--font-body);
font-weight: 600;
font-size: 1.25rem;
letter-spacing: 0;
#main-content h2 {
font-weight: 500;
font-size: var(--text-2xl);
letter-spacing: -0.025em;
}

.main-content h4,
.main-content h5,
.main-content h6 {
font-family: var(--font-body);
font-weight: 600;
font-size: 1rem;
letter-spacing: 0;
#main-content h3 {
font-weight: 500;
font-size: var(--text-xl);
letter-spacing: -0.01em;
}

#main-content h4 {
font-weight: 500;
font-size: var(--text-lg);
}

#main-content h5,
#main-content h6 {
font-weight: 500;
font-size: var(--text-base);
}

header .nav-wrapper {
Expand Down Expand Up @@ -882,13 +894,13 @@ article.content {
}

.home-metric-value {
font-size: 1.5rem;
font-weight: bold;
font-size: var(--text-2xl);
font-weight: 500;
color: var(--theme-accent);
}

.home-metric-label {
font-size: 0.9rem;
font-size: var(--text-sm);
color: var(--theme-text-light);
}

Expand All @@ -914,31 +926,34 @@ article.content {
}

.home-problem-title {
font-size: 1.1rem;
font-size: var(--text-lg);
font-weight: 600;
color: var(--theme-text);
margin-bottom: 0.5rem;
}

.home-problem-desc {
font-size: 0.9rem;
font-size: var(--text-sm);
color: var(--theme-text-light);
margin-bottom: 1rem;
line-height: 1.5;
}

.home-problem-cta {
font-size: 0.875rem;
font-size: var(--text-sm);
font-weight: 600;
color: var(--theme-accent);
}

/* Home page: Get started buttons */
.home-get-started {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
margin: 1rem 0 2rem 0;
margin-bottom: 2rem;
}
.home-get-started .button {
flex: 1;
justify-content: center;
}

/* Home page: Discovery callout */
Expand All @@ -956,21 +971,22 @@ article.content {
}

.home-discovery-title {
font-size: 1.1rem;
font-size: var(--text-lg);
font-weight: 600;
color: white;
margin-bottom: 0.25rem;
}

.home-discovery-desc {
font-size: 0.9rem;
font-size: var(--text-sm);
color: rgba(255, 255, 255, 0.9);
}

/* Home page: Section title */
.home-title {
font-size: 1.5rem;
font-weight: 700;
font-size: var(--text-2xl);
font-weight: 500;
letter-spacing: -0.025em;
margin-top: 2rem;
margin-bottom: 1rem;
}
13 changes: 11 additions & 2 deletions src/styles/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,25 @@
*/
:root,
::backdrop {
--font-brand: "Poppins";
--font-fallback:
-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji,
Segoe UI Emoji;
--font-body: "Inter", sans-serif, var(--font-fallback);
--font-body: "Inter", var(--font-fallback);
--font-mono:
"IBM Plex Mono", Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console",
"Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono",
"Nimbus Mono L", Monaco, "Courier New", Courier, monospace;

/* Typescale — Major Third (1.25) */
--text-xs: 0.75rem;
--text-sm: 0.875rem;
--text-base: 1rem;
--text-lg: 1.125rem;
--text-xl: 1.25rem;
--text-2xl: 1.5rem;
--text-3xl: 1.875rem;
--text-4xl: 2rem;

/*
Variables with --color-base prefix define
the hue, and saturation values to be used for
Expand Down
Loading