Skip to content

Commit 1d4639d

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

File tree

4 files changed

+862
-0
lines changed

4 files changed

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

0 commit comments

Comments
 (0)