Skip to content

Commit 89302f1

Browse files
committed
homepage + sidebar + footer
1 parent 6d62e7a commit 89302f1

File tree

9 files changed

+153
-77
lines changed

9 files changed

+153
-77
lines changed

docusaurus/docusaurus.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const config: Config = {
4848
'classic',
4949
{
5050
docs: {
51-
routeBasePath: '/',
51+
routeBasePath: '/docs',
5252
sidebarPath: './sidebars.ts',
5353
breadcrumbs: false,
5454
},
@@ -115,13 +115,13 @@ const config: Config = {
115115
darkTheme: prismThemes.dracula,
116116
},
117117
footer: {
118-
style: 'dark',
118+
style: 'light',
119119
links: [
120120
{
121121
title: 'Docs',
122122
items: [
123-
{label: 'Documentation', to: '/'},
124-
{label: 'Release notes', to: '/release-notes/'},
123+
{label: 'Documentation', to: '/docs/'},
124+
{label: 'Release notes', to: '/docs/release-notes/'},
125125
],
126126
},
127127
{

docusaurus/src/components/ContentFooter/index.tsx

Lines changed: 0 additions & 15 deletions
This file was deleted.

docusaurus/src/components/ContentFooter/styles.module.css

Lines changed: 0 additions & 34 deletions
This file was deleted.

docusaurus/src/css/custom.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
@import './imports/components/navbar.css';
1515
@import './imports/components/nav-multistep.css';
1616
@import './imports/components/main-section.css';
17-
18-
@layer docusaurus.infima, docusaurus.custom;
17+
@import './imports/components/footer.css';
1918

2019
.table-of-contents__left-border {
2120
border: none;
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.theme-layout-footer.footer {
2+
margin: 1rem;
3+
border-radius: 1rem;
4+
--ifm-footer-background-color: var(--ifm-color-emphasis-300)
5+
}
6+
7+
[data-theme='dark'] {
8+
.theme-layout-footer.footer {
9+
--ifm-footer-background-color: var(--ifm-color-emphasis-100)
10+
}
11+
12+
}
13+
14+
@media (min-width: 997px) {
15+
.theme-layout-footer.footer {
16+
margin: 2rem;
17+
}
18+
}

docusaurus/src/css/imports/components/main-section.css

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@
4848
@layer docusaurus.infima {
4949
@media (min-width: 997px) {
5050
.theme-layout-main .container {
51-
padding-top: 4rem !important;
52-
padding-left: 4rem;
53-
padding-right: 4rem;
51+
padding: 4rem;
5452
}
5553
}
5654
}
Lines changed: 80 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,87 @@
1-
/**
2-
* CSS files with the .module.css suffix will be treated as CSS modules
3-
* and scoped locally.
4-
*/
1+
.homepage {
2+
padding-bottom: 6rem;
3+
}
54

6-
.heroBanner {
7-
padding: 4rem 0;
8-
text-align: center;
9-
position: relative;
10-
overflow: hidden;
5+
.hero {
6+
padding: 5rem 0 4rem;
7+
background: linear-gradient(140deg, #f6f7fb 0%, #f0f6f3 60%, #e9f2ef 100%);
118
}
129

13-
@media screen and (max-width: 996px) {
14-
.heroBanner {
15-
padding: 2rem;
16-
}
10+
.heroInner {
11+
margin: 0 auto;
12+
max-width: 960px;
13+
padding: 0 1.5rem;
14+
text-align: left;
15+
}
16+
17+
.kicker {
18+
text-transform: uppercase;
19+
letter-spacing: 0.18em;
20+
font-size: 0.75rem;
21+
margin: 0 0 0.75rem;
22+
color: #5b6775;
23+
}
24+
25+
.title {
26+
font-size: clamp(2.2rem, 2.8vw + 1.5rem, 3.6rem);
27+
line-height: 1.05;
28+
margin: 0 0 1rem;
1729
}
1830

19-
.buttons {
31+
.subtitle {
32+
font-size: 1.125rem;
33+
max-width: 40rem;
34+
margin: 0 0 2rem;
35+
color: #3b4654;
36+
}
37+
38+
.ctaRow {
2039
display: flex;
21-
align-items: center;
22-
justify-content: center;
40+
flex-wrap: wrap;
41+
gap: 0.75rem;
42+
}
43+
44+
.primaryCta,
45+
.secondaryCta {
46+
border-radius: 999px;
47+
padding: 0.75rem 1.6rem;
48+
font-weight: 600;
49+
text-decoration: none;
50+
}
51+
52+
.primaryCta {
53+
background: #0d1726;
54+
color: #ffffff;
55+
}
56+
57+
.secondaryCta {
58+
border: 1px solid #0d1726;
59+
color: #0d1726;
60+
}
61+
62+
.grid {
63+
display: grid;
64+
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
65+
gap: 1.5rem;
66+
margin: 3.5rem auto 0;
67+
max-width: 1000px;
68+
padding: 0 1.5rem;
69+
}
70+
71+
.card {
72+
background: #ffffff;
73+
border: 1px solid #e1e5ea;
74+
border-radius: 1.25rem;
75+
padding: 1.75rem;
76+
box-shadow: 0 10px 30px rgba(13, 23, 38, 0.08);
77+
}
78+
79+
.card h2 {
80+
margin-top: 0;
81+
}
82+
83+
@media (max-width: 700px) {
84+
.hero {
85+
padding: 3rem 0 2.5rem;
86+
}
2387
}

docusaurus/src/pages/index.tsx

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import React from 'react';
2+
import Layout from '@theme/Layout';
3+
import Link from '@docusaurus/Link';
4+
5+
import styles from './index.module.css';
6+
7+
export default function Home(): React.JSX.Element {
8+
return (
9+
<Layout title="Home" description="Codacy Docs homepage">
10+
<main className={styles.homepage}>
11+
<section className={styles.hero}>
12+
<div className={styles.heroInner}>
13+
<p className={styles.kicker}>Codacy Docs</p>
14+
<h1 className={styles.title}>Documentation that ships fast</h1>
15+
<p className={styles.subtitle}>
16+
Practical guides, API references, and release notes for Codacy.
17+
</p>
18+
<div className={styles.ctaRow}>
19+
<Link className={styles.primaryCta} to="/docs/">
20+
Explore docs
21+
</Link>
22+
<Link className={styles.secondaryCta} to="/docs/release-notes/">
23+
Release notes
24+
</Link>
25+
</div>
26+
</div>
27+
</section>
28+
29+
<section className={styles.grid}>
30+
<article className={styles.card}>
31+
<h2>Get started</h2>
32+
<p>Install, configure, and ship with confidence.</p>
33+
<Link to="/docs/getting-started/">Start here</Link>
34+
</article>
35+
<article className={styles.card}>
36+
<h2>API guides</h2>
37+
<p>Automate workflows with Codacy APIs.</p>
38+
<Link to="/docs/codacy-api/">Browse API docs</Link>
39+
</article>
40+
<article className={styles.card}>
41+
<h2>Integrations</h2>
42+
<p>Connect Codacy with your CI and SCM tools.</p>
43+
<Link to="/docs/repositories-configure/">See integrations</Link>
44+
</article>
45+
</section>
46+
</main>
47+
</Layout>
48+
);
49+
}

docusaurus/src/theme/DocItem/Layout/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@ import React from 'react';
22
import DocItemLayout from '@theme-original/DocItem/Layout';
33
import type {Props} from '@theme/DocItem/Layout';
44

5-
import ContentFooter from '@site/src/components/ContentFooter';
6-
75
export default function DocItemLayoutWrapper(
86
props: Props,
97
): React.JSX.Element {
108
return (
119
<>
1210
<DocItemLayout {...props} />
13-
<ContentFooter />
1411
</>
1512
);
1613
}

0 commit comments

Comments
 (0)