Skip to content

Commit e7f4349

Browse files
authored
style: bring the homepage sections into the new hero's style (#98)
Follows #97. That PR redid the hero, and this one carries the same style through the rest of the homepage, in both the light and the dark scheme. No copy changes. ## What changes - **Section labels and headings**: the labels above headings drop the spaced mono capitals (`WHERE IT RUNS`) for a small sans label with a square mark. The second half of each two-part heading steps back in grey on its own line, as the hero headline does. - **Where it runs**: the five cards lose their hover lift and solid Ink icon tiles and get outlined icons instead. The suggested card (GitHub App) gets a Signal Blue hairline and a faint wash instead of a 2px frame with a glow. - **Action demo**: the selected tab is lit like the primary button (near-white) instead of Signal Blue. The `main` and `feature/add-login` chips in the PR window were turning dark in the dark scheme, so they now stay light. - **Rules**: the ✖/✔ examples sit on faint tints instead of solid pink and green blocks, which glared in the dark scheme. - **Pricing**: the Team card drops its dashed frame. - **FAQ**: a plain list between hairlines instead of a stack of boxes. - **Accessibility** (carried from CodeRabbit's review of #97): each row in the hero's PR panel now tells screen readers whether it passed or failed, and the project names under the stage meet contrast on white. ## Before / after Light: ![sections 1, light](https://github.com/commit-check/commit-check.com/raw/c5b5cc7feac9e1ca5b2e664443a80e521c367c2b/.pr/sections-1-light-before-after.png) ![sections 2, light](https://github.com/commit-check/commit-check.com/raw/c5b5cc7feac9e1ca5b2e664443a80e521c367c2b/.pr/sections-2-light-before-after.png) Dark: ![sections 1, dark](https://github.com/commit-check/commit-check.com/raw/c5b5cc7feac9e1ca5b2e664443a80e521c367c2b/.pr/sections-1-dark-before-after.png) ![sections 2, dark](https://github.com/commit-check/commit-check.com/raw/c5b5cc7feac9e1ca5b2e664443a80e521c367c2b/.pr/sections-2-dark-before-after.png) `mkdocs build --strict` passes. Checked on a 390px phone in both schemes. The screenshots were added in one commit and removed in the next.
1 parent fb4ee56 commit e7f4349

2 files changed

Lines changed: 86 additions & 51 deletions

File tree

‎docs/index.md‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ description: Commit policy as code for teams and AI agents. Messages, branches,
6666
<div class="cc-term__bar" aria-hidden="true"><span>acme/widgets · pull request #128</span></div>
6767
<p class="cc-prcheck__head"><span>Commit Check</span><span class="cc-prcheck__sum">1 failing</span></p>
6868
<ul>
69-
<li class="cc-prcheck__row is-fail"><i class="cc-st cc-st--fail" aria-hidden="true"></i><span>Branch name</span><code>CC201</code></li>
69+
<li class="cc-prcheck__row is-fail"><i class="cc-st cc-st--fail" aria-hidden="true"></i><span class="cc-sr">Failed: </span><span>Branch name</span><code>CC201</code></li>
7070
<li class="cc-prcheck__fix"><code><span class="cc-t-fail">− Feature/Add-Login</span><span class="cc-t-pass">+ feature/Add-Login</span></code></li>
71-
<li class="cc-prcheck__row"><i class="cc-st cc-st--pass" aria-hidden="true"></i><span>Commit messages</span><code>CC001</code></li>
72-
<li class="cc-prcheck__row"><i class="cc-st cc-st--pass" aria-hidden="true"></i><span>Author email</span><code>CC102</code></li>
73-
<li class="cc-prcheck__row"><i class="cc-st cc-st--pass" aria-hidden="true"></i><span>Signed-off-by</span><code>CC012</code></li>
74-
<li class="cc-prcheck__row"><i class="cc-st cc-st--pass" aria-hidden="true"></i><span>AI attribution</span><code>CC013</code></li>
71+
<li class="cc-prcheck__row"><i class="cc-st cc-st--pass" aria-hidden="true"></i><span class="cc-sr">Passed: </span><span>Commit messages</span><code>CC001</code></li>
72+
<li class="cc-prcheck__row"><i class="cc-st cc-st--pass" aria-hidden="true"></i><span class="cc-sr">Passed: </span><span>Author email</span><code>CC102</code></li>
73+
<li class="cc-prcheck__row"><i class="cc-st cc-st--pass" aria-hidden="true"></i><span class="cc-sr">Passed: </span><span>Signed-off-by</span><code>CC012</code></li>
74+
<li class="cc-prcheck__row"><i class="cc-st cc-st--pass" aria-hidden="true"></i><span class="cc-sr">Passed: </span><span>AI attribution</span><code>CC013</code></li>
7575
</ul>
7676
</figure>
7777
</div>
@@ -82,7 +82,7 @@ description: Commit policy as code for teams and AI agents. Messages, branches,
8282
<div class="cc-wrap">
8383
<header class="cc-head cc-head--center">
8484
<p class="cc-eyebrow">Where it runs</p>
85-
<h2 id="cc-paths-title" class="cc-h2">One config file. Five places to enforce it.</h2>
85+
<h2 id="cc-paths-title" class="cc-h2">One config file. <span class="cc-soft">Five places to enforce it.</span></h2>
8686
<p class="cc-sub">Pick the entry point that matches how your team works. Every one reads the same <code>cchk.toml</code> and reports the same rule IDs — start with one, add the rest later.</p>
8787
</header>
8888
<div class="cc-config">
@@ -146,7 +146,7 @@ conventional_branch = <span class="cc-t-pass">true</span></div>
146146
<div class="cc-wrap">
147147
<header class="cc-head cc-head--center">
148148
<p class="cc-eyebrow">commit-check-action</p>
149-
<h2 id="cc-action-title" class="cc-h2">Every pull request, checked and explained.</h2>
149+
<h2 id="cc-action-title" class="cc-h2">Every pull request, <span class="cc-soft">checked and explained.</span></h2>
150150
<p class="cc-sub">The Action reports where your reviewers already look — a PR comment, the job summary, annotations on the run — and exposes a JSON result the next step can gate on.</p>
151151
</header>
152152
<!--
@@ -373,7 +373,7 @@ conventional_branch = <span class="cc-t-pass">true</span></div>
373373
<header class="cc-head cc-head--split">
374374
<div>
375375
<p class="cc-eyebrow">What it checks</p>
376-
<h2 id="cc-rules-title" class="cc-h2">Rules grouped by what they protect.</h2>
376+
<h2 id="cc-rules-title" class="cc-h2">Rules grouped <span class="cc-soft">by what they protect.</span></h2>
377377
<p class="cc-sub">A few are on by default. Turn on what your project needs, rule by rule, or set any rule to warn instead of fail.</p>
378378
</div>
379379
<a class="cc-btn cc-btn--quiet" href="rules/#rule-index">Browse all rules →</a>
@@ -423,7 +423,7 @@ conventional_branch = <span class="cc-t-pass">true</span></div>
423423
<div class="cc-wrap cc-anatomy__grid">
424424
<div>
425425
<p class="cc-eyebrow">Every finding</p>
426-
<h2 id="cc-anatomy-title" class="cc-h2">Not just “failed”. What failed, and the fix.</h2>
426+
<h2 id="cc-anatomy-title" class="cc-h2">Not just “failed”. <span class="cc-soft">What failed, and the fix.</span></h2>
427427
<ol class="cc-steps">
428428
<li><span><b>A stable rule ID</b> that links to its documentation.</span></li>
429429
<li><span><b>The exact value</b> that was checked.</span></li>
@@ -456,7 +456,7 @@ conventional_branch = <span class="cc-t-pass">true</span></div>
456456
<div class="cc-wrap">
457457
<header class="cc-head">
458458
<p class="cc-eyebrow">Pricing</p>
459-
<h2 id="cc-pricing-title" class="cc-h2">Free for open source. Team plan, soon.</h2>
459+
<h2 id="cc-pricing-title" class="cc-h2">Free for open source. <span class="cc-soft">Team plan, soon.</span></h2>
460460
<p class="cc-sub">The CLI, the hook, the Action and the MCP server are MIT licensed — nothing to buy. Plans only cover the hosted GitHub App, the one surface we run for you.</p>
461461
</header>
462462
<ul class="cc-plans">

‎docs/stylesheets/landing.css‎

Lines changed: 76 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -216,14 +216,33 @@
216216
}
217217

218218
.md-typeset .cc-eyebrow {
219-
font-family: var(--cc-mono);
220-
font-size: 13px;
219+
display: inline-flex;
220+
align-items: center;
221+
gap: 9px;
222+
font-size: 14px;
221223
font-weight: 500;
222-
letter-spacing: 0.06em;
223-
text-transform: uppercase;
224224
color: var(--cc-blue-deep);
225225
}
226226

227+
.md-typeset .cc-eyebrow::before {
228+
content: "";
229+
width: 6px;
230+
height: 6px;
231+
border-radius: 2px;
232+
background: currentColor;
233+
}
234+
235+
/* The second half of a section heading steps back, as in the hero. */
236+
.md-typeset .cc-h2 .cc-soft {
237+
display: block;
238+
color: #8396a3;
239+
}
240+
241+
[data-theme="dark"] .md-typeset .cc-h2 .cc-soft,
242+
.md-typeset .cc-band--ink .cc-h2 .cc-soft {
243+
color: #6f8494;
244+
}
245+
227246
.md-typeset .cc-band--ink .cc-eyebrow {
228247
color: var(--cc-blue-soft);
229248
}
@@ -891,41 +910,41 @@
891910
border-radius: 14px;
892911
background: var(--cc-card);
893912
color: var(--cc-text);
894-
transition: border-color 150ms, box-shadow 150ms, transform 150ms;
913+
transition: border-color 150ms;
895914
}
896915

897916
.md-typeset .cc-surface:hover,
898917
.md-typeset .cc-surface:focus-visible {
899918
border-color: var(--cc-blue);
900919
color: var(--cc-text);
901-
transform: translateY(-2px);
902920
}
903921

922+
/* The suggested start: a Signal Blue hairline and a faint wash from the top,
923+
no heavier frame. */
904924
.md-typeset .cc-surface--main {
905-
padding: 19px;
906-
border: 2px solid var(--cc-blue);
907-
box-shadow: 0 12px 30px rgba(44, 156, 205, 0.16);
925+
border-color: var(--cc-blue);
926+
background: linear-gradient(180deg, rgba(44, 156, 205, 0.07), transparent 55%), var(--cc-card);
908927
}
909928

910929
.cc-surface__icon {
911930
display: flex;
912931
align-items: center;
913932
justify-content: center;
914-
width: 42px;
915-
height: 42px;
916-
border-radius: 11px;
917-
background: var(--cc-ink);
918-
color: var(--cc-blue);
933+
width: 40px;
934+
height: 40px;
935+
box-sizing: border-box;
936+
border: 1px solid var(--cc-line);
937+
border-radius: 10px;
938+
color: var(--cc-blue-deep);
919939
}
920940

921941
.cc-surface--main .cc-surface__icon {
922-
background: var(--cc-blue);
923-
color: #06131b;
942+
border-color: rgba(44, 156, 205, 0.45);
924943
}
925944

926945
.cc-surface__icon svg {
927-
width: 22px;
928-
height: 22px;
946+
width: 20px;
947+
height: 20px;
929948
}
930949

931950
/* Sits on the card's top edge, like a tab, so it never crowds the icon. */
@@ -1070,14 +1089,15 @@
10701089
}
10711090

10721091
.md-typeset .cc-tab:hover {
1073-
border-color: var(--cc-blue);
1092+
border-color: #4a5d6b;
10741093
color: #ffffff;
10751094
}
10761095

1096+
/* The chosen tab is lit the way the primary button is. */
10771097
.md-typeset .cc-tab[aria-selected="true"] {
1078-
border-color: var(--cc-blue);
1079-
background: var(--cc-blue);
1080-
color: #06131b;
1098+
border-color: #f1f5f7;
1099+
background: #f1f5f7;
1100+
color: var(--cc-ink);
10811101
}
10821102

10831103
.cc-tab__bar {
@@ -1272,7 +1292,8 @@
12721292
.md-typeset .cc-window .cc-ref {
12731293
padding: 2px 6px;
12741294
border-radius: 5px;
1275-
background: var(--cc-tint);
1295+
/* The window is drawn light in both schemes, so not var(--cc-tint). */
1296+
background: #e3f2f9;
12761297
color: #135a74;
12771298
font-family: var(--cc-mono);
12781299
font-size: 12.5px;
@@ -2092,15 +2113,25 @@
20922113
}
20932114

20942115
.md-typeset .cc-ex--bad {
2095-
background: #fcefed;
2096-
color: #8e231e;
2116+
background: rgba(200, 50, 43, 0.06);
2117+
color: #a62a24;
20972118
}
20982119

20992120
.md-typeset .cc-ex--ok {
2100-
background: #e6f4ec;
2121+
background: rgba(26, 127, 75, 0.07);
21012122
color: #146b3e;
21022123
}
21032124

2125+
[data-theme="dark"] .md-typeset .cc-ex--bad {
2126+
background: rgba(255, 122, 110, 0.09);
2127+
color: #ff8f85;
2128+
}
2129+
2130+
[data-theme="dark"] .md-typeset .cc-ex--ok {
2131+
background: rgba(79, 201, 139, 0.09);
2132+
color: #62d29b;
2133+
}
2134+
21042135
.md-typeset .cc-ex > span:first-child {
21052136
font-weight: 700;
21062137
}
@@ -2299,14 +2330,11 @@
22992330
}
23002331

23012332
.md-typeset .cc-plan--soon {
2302-
padding: 27px;
2303-
border: 2px dashed #9fc9dc;
2304-
background: #f5fafd;
2333+
background: var(--cc-paper);
23052334
}
23062335

23072336
[data-theme="dark"] .md-typeset .cc-plan--soon {
2308-
border-color: #2e5467;
2309-
background: #10222d;
2337+
background: rgba(255, 255, 255, 0.025);
23102338
}
23112339

23122340
.md-typeset .cc-plan__name {
@@ -2361,23 +2389,29 @@
23612389
border-top: 0;
23622390
}
23632391

2392+
/* A plain list of questions between hairlines, not a stack of boxes. */
23642393
.md-typeset .cc-faq details {
2365-
margin: 0 0 10px;
2366-
border: 1px solid var(--cc-line);
2367-
border-radius: 12px;
2394+
margin: 0;
2395+
border: 0;
2396+
border-bottom: 1px solid var(--cc-hair);
2397+
border-radius: 0;
23682398
padding: 0;
2369-
background: var(--cc-card);
2399+
background: none;
23702400
box-shadow: none;
2371-
font-size: 15px;
2401+
font-size: 15.5px;
2402+
}
2403+
2404+
.md-typeset .cc-faq h2 + details {
2405+
border-top: 1px solid var(--cc-hair);
23722406
}
23732407

23742408
.md-typeset .cc-faq details > summary {
23752409
margin: 0;
2376-
padding: 14px 18px;
2410+
padding: 20px 32px 20px 0;
23772411
background: none;
23782412
color: var(--cc-text);
2379-
font-size: 16px;
2380-
font-weight: 600;
2413+
font-size: 17px;
2414+
font-weight: 500;
23812415
}
23822416

23832417
.md-typeset .cc-faq details > summary::before {
@@ -2391,7 +2425,8 @@
23912425
}
23922426

23932427
.md-typeset .cc-faq details > p {
2394-
margin: 0 18px 14px;
2428+
margin: 0 32px 20px 0;
2429+
color: var(--cc-muted);
23952430
}
23962431

23972432
/* ------------------------------------------------------------------ CTA -- */
@@ -2787,7 +2822,7 @@
27872822
}
27882823

27892824
[data-theme="light"] .md-typeset .cc-trust a {
2790-
color: #8395a2;
2825+
color: var(--cc-muted);
27912826
}
27922827

27932828
[data-theme="light"] .md-typeset .cc-trust a:hover {

0 commit comments

Comments
 (0)