Skip to content

Commit bcff0e8

Browse files
committed
Add a Git cheat sheet
1 parent 992366e commit bcff0e8

File tree

4 files changed

+505
-0
lines changed

4 files changed

+505
-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: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
.cheat-sheet {
2+
.command {
3+
background: #f0efe7;
4+
padding: 10px;
5+
border-radius: 10px;
6+
border: 1px solid #e0ddd0;
7+
display: flex;
8+
flex-direction: column;
9+
gap: 5px;
10+
11+
.command-desc {
12+
color: var(--font-color);
13+
margin-bottom: 8px;
14+
font-weight: 500;
15+
font-family: sans-serif;
16+
}
17+
18+
code {
19+
background: #e8e6db;
20+
border-radius: 3px;
21+
display: inline-block;
22+
padding: 4px 8px;
23+
font-family: Courier, monospace;
24+
line-height: 18px;
25+
font-variant-ligatures: none;
26+
/* color: var(--orange);*/
27+
}
28+
}
29+
30+
h1 {
31+
text-align: center;
32+
color: var(--font-color);
33+
margin-bottom: 30px;
34+
font-size: 36px;
35+
line-height: 44px;
36+
font-weight: 400;
37+
}
38+
39+
section {
40+
border-radius: 5px;
41+
padding: 15px;
42+
margin-bottom: 10px;
43+
display: grid;
44+
gap: 10px;
45+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
46+
47+
@media (max-width: 940px) {
48+
& {
49+
grid-template-columns: 1fr;
50+
}
51+
}
52+
53+
54+
h2 {
55+
grid-column: 1/3;
56+
57+
margin-top: 0;
58+
font-size: 1.2rem;
59+
font-weight: 700;
60+
line-height: 1.2;
61+
color: var(--orange);
62+
}
63+
}
64+
65+
66+
67+
68+
.commit-ref {
69+
background-color: var(--callout-color);
70+
border-left: 4px solid var(--orange);
71+
display: block;
72+
73+
.intro {
74+
margin: 16px 0;
75+
}
76+
77+
dl {
78+
display: grid;
79+
grid-template-columns: auto 1fr;
80+
gap: 8px 16px;
81+
margin: 0;
82+
83+
dt {
84+
&::before {
85+
content: "";
86+
font-size: 18px;
87+
color: #666;
88+
}
89+
}
90+
91+
dd {
92+
font-family: monospace;
93+
padding: 4px 8px;
94+
}
95+
}
96+
}
97+
98+
.or {
99+
font-weight: 700;
100+
font-size: 0.8em;
101+
display: block;
102+
margin: 4px 0;
103+
margin-left: 30px;
104+
font-family: sans-serif;
105+
}
106+
107+
}

0 commit comments

Comments
 (0)