Skip to content
Closed
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
2 changes: 1 addition & 1 deletion src/components/Header/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ const primaryLink = isEnterpriseSection
margin: 0;
}

@media (max-width: 87em) {
@media (max-width: 68em) {
.nav-buttons {
display: none !important;
}
Expand Down
10 changes: 8 additions & 2 deletions src/components/PageContent/PageContent.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import { CollectionEntry } from 'astro:content';
import type { CollectionEntry } from 'astro:content';
export interface Props {
content: CollectionEntry<'docs'>['data'];
}
Expand All @@ -18,7 +18,13 @@ const suppressTitle = content.suppressTitle;
<section class="main-section">
<header>
<slot name="before-title" />
{!suppressTitle && <h1 class="content-title" id="overview" set:html={title} />}
{!suppressTitle && (
<h1
class:list={['content-title', content.hubAccent && 'hero-accent']}
id="overview"
set:html={title}
/>
)}
{!suppressTitle && (
<h2 class="content-subtitle" data-toc-ignore set:html={description} />
)}
Expand Down
42 changes: 33 additions & 9 deletions src/components/RightSidebar/RightSidebar.astro
Original file line number Diff line number Diff line change
@@ -1,30 +1,54 @@
---
import generateToc from '../../util/generateToc';
import PageFeedback from '../PageFeedback.astro';
import TableOfContents from './TableOfContents';

const { headings } = Astro.props;
---

<nav aria-label={'Secondary'}>
{
headings && (
{
headings && (
<nav aria-label={'Secondary'}>
<TableOfContents
client:media="(min-width: 50em)"
toc={generateToc(headings)}
labels={{ onThisPage: 'On this page' }}
isMobile={false}
/>
)
}
</nav>
</nav>
)
}

<div class="page-actions">
<PageFeedback />
</div>

<style>
nav {
nav,
.page-actions {
width: 100%;
padding-block: var(--doc-padding-block);
padding-inline-end: var(--min-spacing-inline);
padding-inline-start: 0;
overflow: auto;
font-size: var(--theme-text-md);
}
nav {
padding-block: var(--doc-padding-block);
overflow: auto;
}
.page-actions {
margin-top: 2rem;
margin-bottom: 2rem;
padding-top: 1.25rem;
border-top: 1px solid var(--theme-divider);
display: flex;
flex-direction: column;
gap: 1rem;
}
/* PageFeedback was designed for the article footer with its own
margin-top + padding-top. Inside .page-actions those are redundant
(the wrapper already separates from the ToC), so zero them out. */
.page-actions :global(.page-feedback) {
margin-top: 0;
padding-top: 0;
}
</style>
1 change: 1 addition & 0 deletions src/content.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const docs = defineCollection({
title: z.string(),
description: z.string(),
suppressTitle: z.boolean().optional(),
hubAccent: z.boolean().optional(),
}),
});

Expand Down
1 change: 1 addition & 0 deletions src/content/docs/ci-insights.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: CI Insights
description: Optimize your CI run time, catch flaky tests, and give developers actionable insights so your team ships code faster.
hubAccent: true
---

import Docset from '../../components/DocsetGrid/Docset.astro';
Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import mergeQueueHero from './images/merge-queue-hero.jpg';
{/* -------------- PROBLEM CARDS -------------- */}

<section class="home-problems">
<h2 class="no-counter">What problem are you solving?</h2>
<h2>What problem are you solving?</h2>
<div class="home-problems-grid">
<a href="/merge-queue" class="home-problem-card" data-product="merge-queue">
<div class="home-problem-title">Broken main, slow merges</div>
Expand Down Expand Up @@ -91,7 +91,7 @@ import mergeQueueHero from './images/merge-queue-hero.jpg';
{/* -------------- PRODUCTS -------------- */}

<section id="products" class="home-products">
<h2 class="no-counter">Products</h2>
<h2>Products</h2>
<div class="home-products-grid">
<DocsetGrid>
<Docset title="Merge Queue" path="/merge-queue" icon="mergify:merge-queue">
Expand Down Expand Up @@ -141,7 +141,7 @@ import mergeQueueHero from './images/merge-queue-hero.jpg';
{/* -------------- COMMUNITY -------------- */}

<section class="community">
<h2 class="no-counter">Community</h2>
<h2>Community</h2>
<p>Share feedback, ask questions, and see what other teams build with Mergify.</p>
<div class="community-buttons">
<CommunityButton href="https://github.com/Mergifyio/mergify/discussions" icon="simple-icons:github" />
Expand Down
1 change: 1 addition & 0 deletions src/content/docs/merge-queue.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Merge Queue
description: Ship faster with zero broken builds. Parallel testing, smart batching, and CI cost optimization.
hubAccent: true
---

import Button from '~/components/Button.astro';
Expand Down
1 change: 1 addition & 0 deletions src/content/docs/test-insights.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Test Insights
description: Monitor, detect, and manage unreliable tests across your repositories.
hubAccent: true
---

Test Insights helps you manage test reliability across the full lifecycle.
Expand Down
1 change: 1 addition & 0 deletions src/layouts/BaseLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const canonicalURL = new URL(Astro.url.pathname.replace(/([^/])$/, '$1/'), Astro
}
#right-sidebar {
display: flex;
flex-direction: column;
}
}
</style>
Expand Down
18 changes: 16 additions & 2 deletions src/layouts/MainLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const { content, headings, breadcrumbTitle, showMarkdownActions = true } = Astro
---

<BaseLayout {...Astro.props}>
<RightSidebar slot="secondary-sidebar" {...{ content, headings }} />
<RightSidebar slot="secondary-sidebar" headings={headings} />
<PageContent {...{ content }}>
{
Astro.url.pathname !== '/' && (
Expand Down Expand Up @@ -63,10 +63,24 @@ const { content, headings, breadcrumbTitle, showMarkdownActions = true } = Astro
{
Astro.url.pathname !== '/' && (
<Fragment slot="after-content">
<PageFeedback />
{/* PageFeedback also lives in the right sidebar (visible ≥82em).
Hide this footer copy on wide viewports so it doesn't double up. */}
<div class="article-page-feedback">
<PageFeedback />
</div>
{showMarkdownActions && <PageMeta pathname={Astro.url.pathname} />}
</Fragment>
)
}
</PageContent>
</BaseLayout>

<style>
/* The right sidebar (≥82em) hosts a PageFeedback widget. To avoid showing
the same widget twice on wide viewports, hide the article-footer copy. */
@media (min-width: 82em) {
.article-page-feedback {
display: none;
}
}
</style>
15 changes: 0 additions & 15 deletions src/pages/changelog/[slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,6 @@ const accent = getProductAccent(primaryTag);
font-size: 1.75rem;
}
}
/* Disable global heading auto-numbering */
.changelog-detail .detail-title {
counter-increment: none !important;
}
.changelog-detail .detail-title::before {
content: none !important;
}

.detail-date {
font-size: 0.8125rem;
color: var(--theme-text-muted);
Expand Down Expand Up @@ -300,13 +292,6 @@ const accent = getProductAccent(primaryTag);
font-weight: 700;
margin: 0 0 14px;
}
/* Disable global heading auto-numbering on related-heading */
.changelog-detail .related-heading {
counter-increment: none !important;
}
.changelog-detail .related-heading::before {
content: none !important;
}
.related-grid {
display: grid;
grid-template-columns: 1fr 1fr;
Expand Down
7 changes: 0 additions & 7 deletions src/pages/changelog/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,6 @@ const description = 'Latest product updates from Mergify.';
background: var(--theme-text);
}

/* Year / month headings — disable global numbering */
.changelog-page .cl-year > .cl-year-heading {
counter-increment: none !important;
}
.changelog-page .cl-year > .cl-year-heading::before {
content: none !important;
}
.cl-year {
margin-bottom: 0;
}
Expand Down
5 changes: 0 additions & 5 deletions src/styles/api-reference.css
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,6 @@
margin: 0 0 0.5rem !important;
color: var(--theme-text);
scroll-margin-top: calc(var(--theme-navbar-height) + 1rem);
counter-increment: none;
}

.endpoint-heading::before {
content: none !important;
}

.endpoint-head {
Expand Down
21 changes: 4 additions & 17 deletions src/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,10 @@ pre {
margin-bottom: 0.25em;
}

.content-title.hero-accent {
color: var(--section-accent);
}

#main-content h2.content-subtitle,
.content-subtitle {
font-size: 1.125rem;
Expand Down Expand Up @@ -866,20 +870,3 @@ pre {
header .nav-wrapper {
height: 100%;
}

article.content {
counter-reset: h2-section;
}

.content h2:not(.content-subtitle):not(.no-counter) {
counter-increment: h2-section;
position: relative;
}

.content h2:not(.content-subtitle):not(.no-counter)::before {
content: counter(h2-section);
font-weight: 500;
margin-right: 0.55rem;
color: var(--theme-text-muted);
opacity: 0.6;
}