Skip to content

Commit bfc7a47

Browse files
committed
fix: hero rendering
* Better color choice for anti-aliasing. * Better size and positioning for mobile and desktop. * Update mkdocs.yml config to silence warnings about unused documents (`blog/**`) * Update `repo_name` in mkdocs.yml to display GitHub org name instead of the generic default ("Github") * Disable markdownlint warnings as needed.
1 parent ef897bd commit bfc7a47

File tree

4 files changed

+77
-41
lines changed

4 files changed

+77
-41
lines changed

docs/getting-started.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ Welcome to cpp-linter! This guide will help you integrate C/C++ linting into you
44

55
## Choose Your Integration
66

7+
<!-- markdownlint-disable MD033 -->
8+
79
Select the method that best fits your development workflow:
810

911
<div class="grid cards" markdown>
1012

11-
- :material-github: **GitHub Actions**
13+
- :material-github: **GitHub Actions**
1214

1315
---
1416

@@ -18,8 +20,7 @@ Select the method that best fits your development workflow:
1820

1921
[Get started with GitHub Actions →](https://cpp-linter.github.io/cpp-linter-action/){ .md-button .md-button--primary }
2022

21-
22-
- :material-git: **Pre-commit Hooks**
23+
- :material-git: **Pre-commit Hooks**
2324

2425
---
2526

@@ -28,9 +29,8 @@ Select the method that best fits your development workflow:
2829
**Perfect for:** Catching issues before commits, local enforcement
2930

3031
[Get started with pre-commit →](https://github.com/cpp-linter/cpp-linter-hooks){ .md-button .md-button--primary }
31-
3232

33-
- :fontawesome-brands-python: **Command Line**
33+
- :fontawesome-brands-python: **Command Line**
3434

3535
---
3636

@@ -40,7 +40,7 @@ Select the method that best fits your development workflow:
4040

4141
[Get started with cpp-linter package →](https://cpp-linter.github.io/cpp-linter/){ .md-button .md-button--primary }
4242

43-
- :simple-rust: **Command Line (Rust)**
43+
- :simple-rust: **Command Line (Rust)**
4444

4545
---
4646

@@ -56,25 +56,23 @@ Select the method that best fits your development workflow:
5656

5757
<div class="grid cards" markdown>
5858

59-
- :fontawesome-brands-github: **clang-tools-static-binaries**
59+
- :fontawesome-brands-github: **clang-tools-static-binaries**
6060

6161
---
6262

6363
Distribution clang tools static binaries for various platforms
6464

6565
[Download from →](https://github.com/cpp-linter/clang-tools-static-binaries){ .md-button .md-button--primary }
6666

67-
68-
- :fontawesome-brands-docker: **clang-tools-docker**
67+
- :fontawesome-brands-docker: **clang-tools-docker**
6968

7069
---
7170

7271
Distribution clang tools Docker images for various platforms
7372

7473
[Download from →](https://github.com/cpp-linter/clang-tools-docker){ .md-button .md-button--primary }
7574

76-
77-
- :fontawesome-brands-python: **clang-tools-wheels**
75+
- :fontawesome-brands-python: **clang-tools-wheels**
7876

7977
---
8078

@@ -84,21 +82,19 @@ Select the method that best fits your development workflow:
8482

8583
</div>
8684

87-
88-
8985
## Easy Installation
9086

9187
<div class="grid cards" markdown>
9288

93-
- :fontawesome-brands-python: **clang-tools-pip**
89+
- :fontawesome-brands-python: **clang-tools-pip**
9490

9591
---
9692

9793
Easy installation of clang tools static binaries via pip
9894

9995
[Get started with clang-tools CLI →](https://cpp-linter.github.io/clang-tools-pip/){ .md-button .md-button--primary }
10096

101-
- :fontawesome-brands-python: **clang-tools-asdf**
97+
- :fontawesome-brands-python: **clang-tools-asdf**
10298

10399
---
104100

docs/index.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ hide:
44
- toc
55
---
66

7+
<!-- markdownlint-disable MD041 MD033 MD036 -->
8+
9+
<style>
10+
/* this must be embedded in the page because
11+
it removes the gap between header and hero */
12+
.md-main__inner {
13+
margin-top: 0;
14+
}
15+
.md-content__inner {
16+
padding-top: 0;
17+
}
18+
.md-content__inner::before {
19+
height: 0;
20+
}
21+
</style>
722
<div class="hero" markdown>
823

924
# C/C++ linting that simply works
@@ -22,19 +37,19 @@ hide:
2237

2338
<div class="grid cards" markdown>
2439

25-
- :material-chart-line: **Built in Open Source**
40+
- :material-chart-line: **Built in Open Source**
2641

2742
---
2843

2944
Open-source and MIT-licensed. Bringing contributors together to empower impactful C/C++ lint projects in open source and beyond.
3045

31-
- :material-cog: **Zero Configuration**
46+
- :material-cog: **Zero Configuration**
3247

3348
---
3449

3550
Works out of the box with sensible defaults. Advanced users can customize every aspect to match their coding standards.
3651

37-
- :material-devices: **Works Everywhere**
52+
- :material-devices: **Works Everywhere**
3853

3954
---
4055

@@ -138,7 +153,15 @@ hide:
138153
- id: clang-format
139154
args: [--style=Google] # Other coding style: LLVM, GNU, Chromium, Microsoft, Mozilla, WebKit.
140155
- id: clang-tidy
141-
args: [--checks='boost-*,bugprone-*,performance-*,readability-*,portability-*,modernize-*,clang-analyzer-*,cppcoreguidelines-*']
156+
args:
157+
- --checks='boost-*
158+
- bugprone-*
159+
- performance-*
160+
- readability-*
161+
- portability-*
162+
- modernize-*
163+
- clang-analyzer-*
164+
- cppcoreguidelines-*'
142165
```
143166

144167
=== "Command Line"

docs/stylesheets/extra.css

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,21 @@ th {
22
background-color: var(--md-default-fg-color--lightest);
33
}
44

5+
:root > * {
6+
--cpp-linter-logo-color-green: #40b385;
7+
--cpp-linter-logo-color-yellow: #ffc20a;
8+
}
9+
510
/* Hero section styling */
611
.hero {
712
text-align: center;
813
padding: 4rem 0;
9-
background: linear-gradient(135deg, var(--md-primary-fg-color) 0%, var(--md-accent-fg-color) 100%);
10-
background-size: 200% 200%;
11-
animation: gradientShift 8s ease infinite;
12-
color: white;
13-
margin: -1.5rem -1.5rem 3rem -1.5rem;
14+
/* background: linear-gradient(135deg, var(--md-primary-fg-color) 0%, var(--cpp-linter-logo-color-green) 100%); */
15+
/* background-size: 200% 200%; */
16+
/* animation: gradientShift 8s ease infinite; */
17+
background: var(--md-primary-fg-color);
18+
color: var(--md-primary-bg-color);
19+
margin: 0 -1em 3rem -1em;
1420
border-radius: 0 0 1rem 1rem;
1521
}
1622

@@ -19,17 +25,39 @@ th {
1925
font-weight: 700;
2026
margin-bottom: 1rem;
2127
text-shadow: 0 2px 4px rgba(0,0,0,0.3);
28+
text-align: center;
29+
color: unset;
2230
}
2331

2432
.hero p {
2533
font-size: 1.2rem;
2634
margin-bottom: 2rem;
2735
opacity: 0.9;
28-
max-width: 600px;
36+
width: 65%;
2937
margin-left: auto;
3038
margin-right: auto;
3139
}
3240

41+
.hero .md-button:hover {
42+
border: 2px solid black;
43+
}
44+
45+
.hero .md-button {
46+
background: var(--cpp-linter-logo-color-green);
47+
color: black;
48+
border: none;
49+
}
50+
51+
.hero .md-button:hover {
52+
background: var(--cpp-linter-logo-color-yellow);
53+
color: black;
54+
border: none;
55+
}
56+
57+
.md-typeset .md-button:hover {
58+
color: black;
59+
}
60+
3361
@keyframes gradientShift {
3462
0% { background-position: 0% 50%; }
3563
50% { background-position: 100% 50%; }
@@ -184,19 +212,6 @@ th {
184212
}
185213
}
186214

187-
.md-header {
188-
background-color: #4051b5;
189-
}
190-
191-
/* Make navigation tabs match header color */
192-
.md-tabs {
193-
background-color: #4051b5;
194-
}
195-
196-
.md-tabs__list {
197-
background-color: #4051b5;
198-
}
199-
200215
/* Ensure tab items have proper contrast */
201216
.md-tabs__item {
202217
background-color: transparent;

mkdocs.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ site_name: "cpp-linter"
22
site_description: "Documentation for the cpp-linter organization."
33
site_url: "https://cpp-linter.github.io/"
44
repo_url: https://github.com/cpp-linter
5-
5+
repo_name: "cpp-linter"
66
copyright: "© 2021-2025, cpp-linter"
77

88
nav:
@@ -11,6 +11,8 @@ nav:
1111
- Discussion: discussion.md
1212
# - Blog:
1313
# - blog/index.md
14+
exclude_docs: |
15+
blog/**
1416
1517
theme:
1618
name: material
@@ -35,7 +37,7 @@ theme:
3537
# Palette toggle for light mode
3638
- media: "(prefers-color-scheme: light)"
3739
scheme: default
38-
primary: blue
40+
primary: indigo
3941
accent: cyan
4042
toggle:
4143
icon: material/lightbulb-outline
@@ -44,7 +46,7 @@ theme:
4446
# Palette toggle for dark mode
4547
- media: "(prefers-color-scheme: dark)"
4648
scheme: slate
47-
primary: blue
49+
primary: indigo
4850
accent: cyan
4951
toggle:
5052
icon: material/lightbulb

0 commit comments

Comments
 (0)