Skip to content

Commit 008916c

Browse files
committed
Add a Git cheat sheet
1 parent 0b34d58 commit 008916c

File tree

4 files changed

+861
-0
lines changed

4 files changed

+861
-0
lines changed

assets/sass/application.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ $baseurl: "{{ .Site.BaseURL }}{{ if (and (ne .Site.BaseURL "/") (ne .Site.BaseUR
2727
@import 'book2';
2828
@import 'lists';
2929
@import 'about';
30+
@import 'cheat-sheet';
3031
@import 'dark-mode';
3132
@import 'git-turns-20';
3233

assets/sass/cheat-sheet.scss

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
@import "variables";
2+
3+
.cheat-sheet {
4+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
5+
6+
.item {
7+
background: #f0efe7;
8+
padding: 10px;
9+
border-radius: 10px;
10+
border: 1px solid #e0ddd0;
11+
display: flex;
12+
font-size: 1rem;
13+
flex-direction: column;
14+
gap: 5px;
15+
16+
p {
17+
font-size: 1rem;
18+
margin: 0 8px;
19+
}
20+
21+
svg {
22+
height: auto;
23+
width: 100%;
24+
}
25+
26+
h3 {
27+
color: var(--font-color);
28+
line-height: 1em;
29+
font-size: 1.1rem;
30+
margin-bottom: 8px;
31+
font-weight: 500;
32+
}
33+
34+
label {
35+
display: block;
36+
margin-top: 10px;
37+
}
38+
39+
code {
40+
background: #e8e6db;
41+
color: var(--font-color);
42+
border-radius: 3px;
43+
padding: 4px 8px;
44+
font-family: Courier, monospace;
45+
margin-bottom: 0;
46+
}
47+
48+
h3 code {
49+
padding: 0;
50+
background: transparent;
51+
}
52+
53+
.or {
54+
font-weight: 700;
55+
font-size: 0.8em;
56+
display: block;
57+
margin-left: 30px;
58+
font-family: sans-serif;
59+
}
60+
}
61+
62+
section {
63+
margin-bottom: 20px;
64+
display: grid;
65+
gap: 10px;
66+
grid-template-columns: 1fr 1fr;
67+
68+
@media (max-width: $mobile-m) {
69+
& {
70+
display: flex;
71+
flex-direction: column;
72+
}
73+
}
74+
75+
h2 {
76+
grid-column: 1/3;
77+
78+
margin-top: 0;
79+
font-size: 1.2rem;
80+
font-weight: 700;
81+
line-height: 1.2;
82+
color: var(--orange);
83+
}
84+
}
85+
86+
.commit-reference {
87+
background-color: var(--callout-color);
88+
border-left: 4px solid var(--orange);
89+
display: block;
90+
padding: 10px;
91+
border-radius: 10px;
92+
93+
.intro {
94+
margin: 16px 0;
95+
}
96+
97+
dl {
98+
display: grid;
99+
grid-template-columns: auto 1fr;
100+
gap: 8px 16px;
101+
margin: 0;
102+
103+
dt {
104+
&::before {
105+
content: "";
106+
font-size: 18px;
107+
color: #666;
108+
}
109+
}
110+
111+
dd {
112+
font-family: monospace;
113+
padding: 4px 8px;
114+
}
115+
}
116+
}
117+
}

0 commit comments

Comments
 (0)