Skip to content

Commit 90157cc

Browse files
committed
override hero block in theme template
1 parent bfc7a47 commit 90157cc

File tree

4 files changed

+32
-31
lines changed

4 files changed

+32
-31
lines changed

docs/index.md

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,11 @@
22
hide:
33
- navigation
44
- toc
5+
template: home.html
56
---
67

78
<!-- markdownlint-disable MD041 MD033 MD036 -->
89

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>
22-
<div class="hero" markdown>
23-
24-
# C/C++ linting that simply works
25-
26-
**Lint your C/C++ code in workflow** - automated, configurable, and reliable. Integrate seamlessly into any workflow in minutes.
27-
28-
[Get started :material-rocket-launch:](getting-started.md){ .md-button .md-button--primary }
29-
30-
</div>
31-
32-
<div class="grid cards" markdown>
33-
34-
</div>
35-
3610
## Everything you need for linting C/C++ code
3711

3812
<div class="grid cards" markdown>

docs/overrides/home.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{% extends "main.html" %}
2+
3+
{% block hero %}
4+
<div class="hero">
5+
<h1 id="cc-linting-that-simply-works">C/C++ linting that simply works</h1>
6+
<p>
7+
<strong>Lint your C/C++ code in your development workflow</strong>
8+
- automated, configurable, and reliable.
9+
Integrate seamlessly into any development workflow in minutes.
10+
</p>
11+
<p>
12+
<a class="md-button md-button--primary" href="getting-started/">
13+
Get started
14+
<span class="twemoji">
15+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m13.13 22.19-1.63-3.83c1.57-.58 3.04-1.36 4.4-2.27zM5.64 12.5l-3.83-1.63 6.1-2.77C7 9.46 6.22 10.93 5.64 12.5M21.61 2.39S16.66.269 11 5.93c-2.19 2.19-3.5 4.6-4.35 6.71-.28.75-.09 1.57.46 2.13l2.13 2.12c.55.56 1.37.74 2.12.46A19.1 19.1 0 0 0 18.07 13c5.66-5.66 3.54-10.61 3.54-10.61m-7.07 7.07c-.78-.78-.78-2.05 0-2.83s2.05-.78 2.83 0c.77.78.78 2.05 0 2.83s-2.05.78-2.83 0m-5.66 7.07-1.41-1.41zM6.24 22l3.64-3.64c-.34-.09-.67-.24-.97-.45L4.83 22zM2 22h1.41l4.77-4.76-1.42-1.41L2 20.59zm0-2.83 4.09-4.08c-.21-.3-.36-.62-.45-.97L2 17.76z"></path></svg>
16+
</span>
17+
</a>
18+
</p>
19+
</div>
20+
{% endblock %}

docs/stylesheets/extra.css

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ th {
55
:root > * {
66
--cpp-linter-logo-color-green: #40b385;
77
--cpp-linter-logo-color-yellow: #ffc20a;
8+
--rocket: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m13.13 22.19-1.63-3.83c1.57-.58 3.04-1.36 4.4-2.27zM5.64 12.5l-3.83-1.63 6.1-2.77C7 9.46 6.22 10.93 5.64 12.5M21.61 2.39S16.66.269 11 5.93c-2.19 2.19-3.5 4.6-4.35 6.71-.28.75-.09 1.57.46 2.13l2.13 2.12c.55.56 1.37.74 2.12.46A19.1 19.1 0 0 0 18.07 13c5.66-5.66 3.54-10.61 3.54-10.61m-7.07 7.07c-.78-.78-.78-2.05 0-2.83s2.05-.78 2.83 0c.77.78.78 2.05 0 2.83s-2.05.78-2.83 0m-5.66 7.07-1.41-1.41zM6.24 22l3.64-3.64c-.34-.09-.67-.24-.97-.45L4.83 22zM2 22h1.41l4.77-4.76-1.42-1.41L2 20.59zm0-2.83 4.09-4.08c-.21-.3-.36-.62-.45-.97L2 17.76z"></path></svg>' )
89
}
910

1011
/* Hero section styling */
@@ -16,8 +17,8 @@ th {
1617
/* animation: gradientShift 8s ease infinite; */
1718
background: var(--md-primary-fg-color);
1819
color: var(--md-primary-bg-color);
19-
margin: 0 -1em 3rem -1em;
20-
border-radius: 0 0 1rem 1rem;
20+
/* margin: 0 -1em 3rem -1em; */
21+
/* border-radius: 0 0 1rem 1rem; */
2122
}
2223

2324
.hero h1 {
@@ -38,14 +39,18 @@ th {
3839
margin-right: auto;
3940
}
4041

41-
.hero .md-button:hover {
42-
border: 2px solid black;
42+
.hero .twemoji {
43+
--md-icon-size: 1.125em;
44+
display: inline-flex;
45+
height: var(--md-icon-size);
46+
vertical-align: text-top;
4347
}
4448

4549
.hero .md-button {
4650
background: var(--cpp-linter-logo-color-green);
4751
color: black;
4852
border: none;
53+
border-radius: unset;
4954
}
5055

5156
.hero .md-button:hover {

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ exclude_docs: |
1616
1717
theme:
1818
name: material
19+
custom_dir: docs/overrides
1920
features:
2021
- navigation.tabs
22+
- navigation.tabs.sticky
2123
- toc.integrate
2224
- navigation.top
2325
- navigation.sections

0 commit comments

Comments
 (0)