Skip to content

Commit 779b49d

Browse files
Merge pull request #3 from refactorfirst/clean-up-layout
Clean up layout and center hero search bar on landing page
2 parents 8a4ac6e + 508cce8 commit 779b49d

19 files changed

Lines changed: 235 additions & 15 deletions

File tree

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,4 @@ tests/ # unit/ (Bun), integration/ (Bun + RTL/jsdom), e2e/
111111

112112
## Current Test Count
113113

114-
~271 unit/integration + 81 E2E (three browsers + basePath leg).
114+
~294 unit/integration + 112 E2E (three browsers + basePath leg).

‎app/about/page.jsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export default function AboutPage() {
22
return (
3-
<section>
3+
<section className="content-page">
44
<h1>About RefactorFirst</h1>
55
<p>RefactorFirst is a static analysis tool that identifies which classes in your Java
66
codebase you should refactor first, ranked by cost-benefit. It is based on the paper

‎app/api/page.jsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export default function ApiPage() {
22
return (
3-
<section>
3+
<section className="content-page">
44
<h1>API for Tool Integrations</h1>
55

66
<h2>Fetching reports programmatically</h2>

‎app/documentation/page.jsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Link from 'next/link';
22

33
export default function DocumentationPage() {
44
return (
5-
<section>
5+
<section className="content-page">
66
<h1>Documentation</h1>
77

88
<h2>Generating Reports</h2>

‎app/examples/page.jsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Link from 'next/link';
22

33
export default function ExamplesPage() {
44
return (
5-
<section>
5+
<section className="content-page">
66
<h1>Example Reports</h1>
77
<p>See RefactorFirst reports for real projects. Each link opens the live report
88
rendered from that repository.</p>

‎app/faq/page.jsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Link from 'next/link';
22

33
export default function FaqPage() {
44
return (
5-
<section>
5+
<section className="content-page">
66
<h1>Frequently Asked Questions</h1>
77

88
<h2>What do the different priority colors mean?</h2>

‎app/feedback/page.jsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export default function FeedbackPage() {
22
return (
3-
<section>
3+
<section className="content-page">
44
<h1>Feedback</h1>
55
<p>We welcome your feedback! The best place to share ideas, report bugs or request
66
features is the RefactorFirst project on GitHub.</p>

‎app/getting-started/page.jsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import WorkflowSample from '../../components/workflow-sample';
33

44
export default function GettingStartedPage() {
55
return (
6-
<section>
6+
<section className="content-page">
77
<h1>Getting Started</h1>
88

99
<h2>1. Configure the RefactorFirst Maven plugin</h2>

‎app/globals.css‎

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,30 @@ main:focus {
5353
outline: none;
5454
}
5555

56+
/* mvp.css makes every `section` a wrapping flex row with no gap and center
57+
justification (`section { display: flex; flex-wrap: wrap; justify-content:
58+
var(--justify-important) }`). It targets the mvp `section > aside` card
59+
pattern, but our pages use sections as plain prose containers — so headings,
60+
paragraphs, lists and code blocks were laid out side by side as flex items
61+
and smashed together. mvp.css is loaded after this bundle, so the reset must
62+
win on specificity: `main section` (0-0-2) beats the bare `section`
63+
selector (0-0-1) regardless of cascade order. */
64+
main section {
65+
display: block;
66+
}
67+
68+
/* Prose pages: roughly 75ch measure, centered in the wide main column. */
69+
.content-page {
70+
max-width: 48rem;
71+
margin: 0 auto;
72+
}
73+
74+
/* Landing sections (CTA, featured repos) that keep centered text now that
75+
sections no longer flex-center their children. */
76+
.section-center {
77+
text-align: center;
78+
}
79+
5680
.hero {
5781
text-align: center;
5882
padding: 2.5rem 1rem;
@@ -225,11 +249,22 @@ pre {
225249

226250
.hero-search {
227251
position: relative;
228-
max-width: 480px;
252+
/* Exactly half the rendered width of the top menu (#top-menu is capped by
253+
mvp.css at --width-content = 1080px, full width below that) and centered
254+
under it. */
255+
width: min(540px, 50vw);
229256
margin: 1rem auto;
230257
text-align: left;
231258
}
232259

260+
.hero-search input {
261+
width: 100%;
262+
box-sizing: border-box;
263+
padding: 0.35rem 0.6rem;
264+
border: 1px solid #c6d2dc;
265+
border-radius: var(--radius);
266+
}
267+
233268
/* ---- Repository grid ---- */
234269
.repo-grid,
235270
.featured-repos ul {
@@ -281,6 +316,17 @@ pre {
281316
color: #fff;
282317
}
283318

319+
/* ---- User listing (/user) ---- */
320+
.repo-listing h1,
321+
.repo-listing .listing-subtitle {
322+
text-align: center;
323+
}
324+
325+
.listing-subtitle {
326+
margin-top: 0.25rem;
327+
color: var(--muted-color);
328+
}
329+
284330
/* ---- Forms / add-repo ---- */
285331
.user-info {
286332
display: flex;
@@ -297,6 +343,7 @@ pre {
297343
display: grid;
298344
gap: 0.5rem;
299345
max-width: 420px;
346+
margin: 0 auto;
300347
}
301348

302349
.form-status.error {

‎app/privacy-policy/page.jsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export default function PrivacyPolicyPage() {
22
return (
3-
<section>
3+
<section className="content-page">
44
<h1>Privacy Policy</h1>
55

66
<h2>Data Collected</h2>

0 commit comments

Comments
 (0)