Skip to content

Commit a514d6e

Browse files
committed
Add Learn page
- Add a new videos summary shortcode to make the videos more compact - Add a new `.callout.icon` class to give the page a more unified look - Add font awesome icons
1 parent ae2ab8f commit a514d6e

File tree

7 files changed

+134
-0
lines changed

7 files changed

+134
-0
lines changed

assets/sass/layout.scss

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,69 @@ aside {
8282
}
8383
}
8484

85+
.callout.icon {
86+
position: relative;
87+
padding: 20px 30px 20px 100px !important;
88+
border: 2px solid var(--callout-color);
89+
background: transparent;
90+
91+
&.book {
92+
background: var(--callout-color);
93+
}
94+
95+
h3 {
96+
font-size: 18px;
97+
}
98+
99+
p {
100+
font-size: 15px;
101+
line-height: 1.3em;
102+
}
103+
104+
&::before {
105+
content: "";
106+
position: absolute;
107+
top: 20px;
108+
left: 24px;
109+
width: 54px;
110+
height: 54px;
111+
background-repeat: no-repeat;
112+
background-size: contain;
113+
opacity: 0.4;
114+
}
115+
116+
&.video ul {
117+
list-style-type: none;
118+
margin-left: 1rem;
119+
120+
::marker {
121+
content: "";
122+
margin-right: .5rem;
123+
}
124+
125+
li {
126+
margin: .25rem 0;
127+
}
128+
}
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+
}
146+
}
147+
85148
.callout {
86149
background-color: var(--callout-color);
87150
@include border-radius(3px);
@@ -91,6 +154,16 @@ aside {
91154
p {
92155
margin-bottom: 0;
93156
}
157+
158+
a.button {
159+
padding: .5rem;
160+
background: var(--orange);
161+
color: white;
162+
display: inline-block;
163+
margin-top: .5rem;
164+
border-radius: .5rem;
165+
}
166+
94167
}
95168

96169
img {

content/learn/_index.html

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
section: "learn"
3+
title: "Git - Learn"
4+
url: /learn.html
5+
---
6+
7+
<div id="main">
8+
9+
<h1> Learn </h1>
10+
11+
<div class="callout icon book">
12+
<h3> <a href="{{< relurl "book">}}"> Pro Git Book </a></h3>
13+
14+
<p>The entire Pro Git book written
15+
by Scott Chacon and Ben Straub is available to read online for free.
16+
Print copies are available on <a
17+
href="https://www.amazon.com/Pro-Git-Scott-Chacon/dp/1484200772?ie=UTF8&camp=1789&creative=9325&creativeASIN=1430218339&linkCode=as2&tag=git-sfconservancy-20">Amazon.com</a>.
18+
</p>
19+
20+
<p>
21+
<a class="button" href="{{< relurl "book">}}">Read the book! </a>
22+
</p>
23+
</div>
24+
25+
<div class="callout icon video">
26+
<h3> <a href="{{< relurl "videos">}}"> Videos </a></h3>
27+
28+
<p>
29+
Short videos introducing Git for total beginners.
30+
</p>
31+
{{< videos-summary >}}
32+
</div>
33+
34+
<div class="callout icon cheat-sheet">
35+
<h3> <a href="{{< relurl "cheat-sheet">}}">Cheat Sheet</a> </h3>
36+
<p>
37+
The most common Git commands, with diagrams illustrating the difference
38+
between merge and rebase.
39+
</p>
40+
</div>
41+
42+
<div class="callout icon external-links">
43+
<h3> <a href="{{< relurl "doc/ext">}}">External Links</a> </h3>
44+
<p>
45+
Ever-evolving collection of tutorials, books, videos, and other Git resources from the community.
46+
</p>
47+
</div>
48+
</div>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{{ $videos := sort (where .Site.RegularPages "Params.episode" "ne" nil) "Params.episode" }}
2+
3+
<ul>
4+
{{ range $i, $video := $videos }}
5+
<li>
6+
<a href="{{ relURL "video" }}/{{ $video.Params.link }}">{{ $video.Params.video_title }}</a> ({{ $video.Params.length }})
7+
</li>
8+
{{ end }}
9+
</ul>
Lines changed: 1 addition & 0 deletions
Loading

static/images/icons/fa-book.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

static/images/icons/fa-video.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)