Skip to content

Commit e7aa3aa

Browse files
committed
Link images on Learn page and fix dark mode
1 parent d12b8bd commit e7aa3aa

File tree

2 files changed

+27
-28
lines changed

2 files changed

+27
-28
lines changed

assets/sass/layout.scss

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -84,35 +84,38 @@ aside {
8484

8585
.callout.icon {
8686
position: relative;
87-
padding: 20px 30px 20px 100px !important;
87+
padding: 20px 20px 20px 90px !important;
8888
border: 2px solid var(--callout-color);
8989
background: transparent;
9090

9191
&.book {
9292
background: var(--callout-color);
9393
}
9494

95-
h3 {
95+
a h3 {
9696
font-size: 18px;
97+
color: var(--link-color);
9798
}
9899

99100
p {
100101
font-size: 15px;
101102
line-height: 1.3em;
102103
}
103104

104-
&::before {
105-
content: "";
105+
img {
106106
position: absolute;
107107
top: 20px;
108-
left: 24px;
108+
left: 17px;
109109
width: 54px;
110110
height: 54px;
111-
background-repeat: no-repeat;
112-
background-size: contain;
113111
opacity: 0.4;
112+
113+
:root[data-theme="dark"] & {
114+
filter: invert(1);
115+
}
114116
}
115117

118+
116119
&.video ul {
117120
list-style-type: none;
118121
margin-left: 1rem;
@@ -126,23 +129,6 @@ aside {
126129
margin: .25rem 0;
127130
}
128131
}
129-
130-
&.book::before {
131-
background-image: url($baseurl + "images/icons/fa-book.svg");
132-
}
133-
134-
&.video::before {
135-
background-image: url($baseurl + "images/icons/fa-video.svg");
136-
}
137-
138-
&.cheat-sheet::before {
139-
background-image: url($baseurl + "images/icons/fa-note-sticky.svg");
140-
}
141-
142-
&.external-links::before {
143-
background-image: url($baseurl + "images/icons/fa-arrow-up-right-from-square.svg");
144-
top: 24px;
145-
}
146132
}
147133

148134
.callout {

content/learn/_index.html

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99
<h1> Learn </h1>
1010

1111
<div class="callout icon book">
12-
<h3> <a href="{{< relurl "book">}}"> Pro Git Book </a></h3>
12+
13+
<a href="{{< relurl "book">}}">
14+
<img alt="" aria-hidden="true" src="{{< relurl "images/icons/fa-book.svg">}}" >
15+
<h3> Pro Git Book </h3>
16+
</a>
1317

1418
<p>The entire Pro Git book written
1519
by Scott Chacon and Ben Straub is available to read online for free.
@@ -23,7 +27,10 @@ <h3> <a href="{{< relurl "book">}}"> Pro Git Book </a></h3>
2327
</div>
2428

2529
<div class="callout icon video">
26-
<h3> <a href="{{< relurl "videos">}}"> Videos </a></h3>
30+
<a href="{{< relurl "videos">}}">
31+
<img alt="" aria-hidden="true" src="{{< relurl "images/icons/fa-video.svg">}}" >
32+
<h3> Videos </h3>
33+
</a>
2734

2835
<p>
2936
Short videos introducing Git for total beginners.
@@ -32,15 +39,21 @@ <h3> <a href="{{< relurl "videos">}}"> Videos </a></h3>
3239
</div>
3340

3441
<div class="callout icon cheat-sheet">
35-
<h3> <a href="{{< relurl "cheat-sheet">}}">Cheat Sheet</a> </h3>
42+
<a href="{{< relurl "cheat-sheet">}}">
43+
<img alt="" aria-hidden="true" src="{{< relurl "images/icons/fa-note-sticky.svg">}}" >
44+
<h3>Cheat Sheet</h3>
45+
</a>
3646
<p>
3747
The most common Git commands, with diagrams illustrating the difference
3848
between merge and rebase.
3949
</p>
4050
</div>
4151

4252
<div class="callout icon external-links">
43-
<h3> <a href="{{< relurl "doc/ext">}}">External Links</a> </h3>
53+
<a href="{{< relurl "doc/ext">}}">
54+
<img alt="" aria-hidden="true" src="{{< relurl "images/icons/fa-arrow-up-right-from-square.svg">}}" >
55+
<h3>External Links</h3>
56+
</a>
4457
<p>
4558
Ever-evolving collection of tutorials, books, videos, and other Git resources from the community.
4659
</p>

0 commit comments

Comments
 (0)