Skip to content

Commit 6b75d0a

Browse files
committed
Add hero links
1 parent 348ae6b commit 6b75d0a

File tree

2 files changed

+50
-43
lines changed

2 files changed

+50
-43
lines changed

_theme/hero.html

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,8 @@
22
<div class="content-container">
33
<p class="hero-small-title">Welcome</p>
44
<h1 class="main-title">Information you need to understand Bitcoin and start building Bitcoin-based applications.</h1>
5-
<ul class="hero-list">
6-
<li class="hero-item">
7-
<a href="#" class="hero-link">
8-
Developer Guides
9-
<span>Learn more</span>
10-
</a>
11-
</li>
12-
<li class="hero-item">
13-
<a href="#" class="hero-link">
14-
Reference
15-
<span>Learn more</span>
16-
</a>
17-
</li>
18-
<li class="hero-item">
19-
<a href="#" class="hero-link">
20-
Examples
21-
<span>Learn more</span>
22-
</a>
23-
</li>
24-
<li class="hero-item">
25-
<a href="#" class="hero-link">
26-
Glossary
27-
<span>Learn more</span>
28-
</a>
29-
</li>
30-
</ul>
5+
<div class="hero-nav">
6+
{{ toctree(maxdepth=1, collapse=False, includehidden=False) }}
7+
</div>
318
</div>
32-
</div>
9+
</div>

_theme/static/css/main.css

Lines changed: 46 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,65 +21,74 @@
2121
line-height: 65px;
2222
color: #FFFFFF;
2323
}
24-
.hero-list {
24+
.hero-nav {
25+
margin: 60px 0 0;
26+
}
27+
.hero-nav ul.current {
2528
display: flex;
2629
justify-content: space-between;
27-
margin: 60px 0 0;
30+
flex-wrap: wrap;
31+
margin: 0;
2832
padding: 0;
2933
list-style: none;
3034
}
31-
.hero-item {
32-
width: 20%;
35+
.hero-nav .toctree-l1 {
36+
width: 22.9%;
3337
}
34-
.hero-item + .hero-item {
35-
margin-left: 3%;
38+
.hero-nav .toctree-l1 + .toctree-l1 {
39+
margin-left: 2.7%;
3640
}
37-
.hero-link {
41+
.hero-nav .reference {
3842
position: relative;
3943
display: block;
40-
padding: 100px 20px 38px;
44+
height: 100%;
45+
padding: 100px 20px 57px;
4146
background: #090C14;
4247
border-radius: 1px;
4348
font-size: 22px;
4449
line-height: 42px;
4550
text-align: center;
4651
color: #FFFFFF;
4752
}
48-
.hero-link span {
49-
display: block;
53+
.hero-nav .reference::after {
54+
content: 'Learn more';
55+
position: absolute;
56+
bottom: 38px;
57+
left: 50%;
58+
transform: translate(-50%, 0%);
5059
font-size: 16px;
5160
line-height: 24px;
5261
color: #9D9D9D;
5362
}
54-
.hero-link:hover {
63+
.hero-nav .reference:hover {
5564
text-decoration: none;
5665
}
57-
.hero-link::before {
66+
.reference::before {
5867
content: '';
5968
position: absolute;
6069
top: 47px;
6170
left: 50%;
6271
transform: translateX(-50%);
6372
}
64-
.hero-item:nth-child(1) .hero-link::before {
73+
.hero-nav .toctree-l1:nth-child(1) .reference::before {
6574
width: 43px;
6675
height: 34px;
6776
background: url('../img/notebook.svg') center no-repeat;
6877
background-size: contain;
6978
}
70-
.hero-item:nth-child(2) .hero-link::before {
79+
.hero-nav .toctree-l1:nth-child(2) .reference::before {
7180
width: 46px;
7281
height: 40px;
7382
background: url('../img/search.svg') center no-repeat;
7483
background-size: contain;
7584
}
76-
.hero-item:nth-child(3) .hero-link::before {
85+
.hero-nav .toctree-l1:nth-child(3) .reference::before {
7786
width: 36px;
7887
height: 42px;
7988
background: url('../img/docs.svg') center no-repeat;
8089
background-size: contain;
8190
}
82-
.hero-item:nth-child(4) .hero-link::before {
91+
.hero-nav .toctree-l1:nth-child(4) .reference::before {
8392
width: 36px;
8493
height: 43px;
8594
background: url('../img/dictionary.svg') center no-repeat;
@@ -119,4 +128,25 @@
119128
.btn-group .btn:hover {
120129
background: #F7931A;
121130
border-color: #F7931A;
131+
}
132+
133+
@media handheld, only screen and ( max-width: 990px ), only screen and ( max-device-width: 990px ) {
134+
.hero-nav .toctree-l1 {
135+
width: 48.3%;
136+
margin-bottom: 30px;
137+
}
138+
.hero-nav .toctree-l1 + .toctree-l1 {
139+
margin-left: 3.3%;
140+
}
141+
.hero-nav .toctree-l1:nth-child(odd) {
142+
margin-left: 0;
143+
}
144+
}
145+
@media handheld, only screen and ( max-width: 500px ), only screen and ( max-device-width: 500px ) {
146+
.hero-nav .toctree-l1 {
147+
width: 100%;
148+
}
149+
.hero-nav .toctree-l1 + .toctree-l1 {
150+
margin-left: 0;
151+
}
122152
}

0 commit comments

Comments
 (0)