Skip to content

Commit f653996

Browse files
authored
Merge pull request #16 from diffplug/fix/tables
Fix tables
2 parents 3d373b3 + 7b5a1ab commit f653996

File tree

10 files changed

+438
-33
lines changed

10 files changed

+438
-33
lines changed

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.mdx
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
import Image from 'next/image'
2+
3+
export function BranchCasesTable() {
4+
return (
5+
<table>
6+
<thead>
7+
<tr>
8+
<th className="w-[25%]">Situation</th>
9+
<th className="w-[50%]">Description</th>
10+
<th className="w-[25%]">Available actions</th>
11+
</tr>
12+
</thead>
13+
<tbody>
14+
<tr>
15+
<td className="align-top">
16+
<Image
17+
src="/share/branches/case-synced.png"
18+
alt="Synced"
19+
width={180}
20+
height={18}
21+
className="m-0"
22+
/>
23+
</td>
24+
<td className="align-top">
25+
The local and remote branches are synchronized.
26+
</td>
27+
<td className="align-top">
28+
<Image
29+
src="/share/branches/case-synced-actions.png"
30+
alt="Synced actions"
31+
width={485}
32+
height={28}
33+
className="m-0"
34+
/>
35+
</td>
36+
</tr>
37+
<tr>
38+
<td className="align-top">
39+
<Image
40+
src="/share/branches/case-local-only.png"
41+
alt="Local only"
42+
width={82}
43+
height={18}
44+
className="m-0"
45+
/>
46+
</td>
47+
<td className="align-top">
48+
You have a branch that the server doesn't have.
49+
</td>
50+
<td className="align-top">
51+
<Image
52+
src="/share/branches/case-local-only-actions.png"
53+
alt="Local only actions"
54+
width={485}
55+
height={28}
56+
className="m-0"
57+
/>
58+
</td>
59+
</tr>
60+
<tr>
61+
<td className="align-top">
62+
<Image
63+
src="/share/branches/case-remote-only.png"
64+
alt="Remote only"
65+
width={116}
66+
height={18}
67+
className="m-0"
68+
/>
69+
</td>
70+
<td className="align-top">
71+
The server has a branch that you don't have.
72+
</td>
73+
<td className="align-top">
74+
<Image
75+
src="/share/branches/case-remote-only-actions.png"
76+
alt="Remote only actions"
77+
width={485}
78+
height={72}
79+
className="m-0"
80+
/>
81+
</td>
82+
</tr>
83+
<tr>
84+
<td className="align-top">
85+
<Image
86+
src="/share/branches/case-local-new.png"
87+
alt="Local has new"
88+
width={116}
89+
height={56}
90+
className="m-0"
91+
/>
92+
</td>
93+
<td className="align-top">
94+
You made some commits and haven't uploaded them yet.
95+
</td>
96+
<td className="align-top">
97+
<Image
98+
src="/share/branches/case-local-new-actions.png"
99+
alt="Local has new actions"
100+
width={485}
101+
height={50}
102+
className="m-0"
103+
/>
104+
</td>
105+
</tr>
106+
<tr>
107+
<td className="align-top">
108+
<Image
109+
src="/share/branches/case-remote-new.png"
110+
alt="Remote has new"
111+
width={135}
112+
height={56}
113+
className="m-0"
114+
/>
115+
</td>
116+
<td className="align-top">
117+
The server has some new commits which you haven't accepted yet.
118+
</td>
119+
<td className="align-top">
120+
<Image
121+
src="/share/branches/case-remote-new-actions.png"
122+
alt="Remote has new actions"
123+
width={485}
124+
height={72}
125+
className="m-0"
126+
/>
127+
</td>
128+
</tr>
129+
<tr>
130+
<td className="align-top">
131+
<Image
132+
src="/share/branches/case-both.png"
133+
alt="Both have new"
134+
width={135}
135+
height={56}
136+
className="m-0"
137+
/>
138+
</td>
139+
<td className="align-top">
140+
Both you and the server have some new commits. Congratulations!
141+
You're going to have to redo your work on top of the new latest
142+
version from the team. Git has a smorgasbord of options available to
143+
you, which we cover in the <a href="/time-travel">time travel</a>{' '}
144+
section.
145+
</td>
146+
<td className="align-top">
147+
<Image
148+
src="/share/branches/case-both-actions.png"
149+
alt="Both have new actions"
150+
width={485}
151+
height={94}
152+
className="m-0"
153+
/>
154+
</td>
155+
</tr>
156+
</tbody>
157+
</table>
158+
)
159+
}
+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import Image from 'next/image'
2+
3+
export function BranchTable() {
4+
return (
5+
<table>
6+
<thead>
7+
<tr>
8+
<th className="w-[25%]">Kind</th>
9+
<th className="w-[75%]">What does it do?</th>
10+
</tr>
11+
</thead>
12+
<tbody>
13+
<tr>
14+
<td>
15+
<Image
16+
alt="Branch"
17+
width="16"
18+
height="16"
19+
className="m-0 inline"
20+
src="/branches/sticky-notes-and-paintbrushes/local-branch.png"
21+
/>{' '}
22+
Local branch
23+
</td>
24+
<td>
25+
Marks a moveable spot in history and makes new commits. There are
26+
lots of ways to use a branch, and we'll show you all of them.
27+
</td>
28+
</tr>
29+
<tr>
30+
<td>
31+
<Image
32+
alt="Remote Branch"
33+
width="16"
34+
height="16"
35+
className="m-0 inline"
36+
src="/branches/sticky-notes-and-paintbrushes/remote-branch.png"
37+
/>{' '}
38+
Remote branch
39+
</td>
40+
<td>
41+
Keeps track of where a friend's branch is. You can't move it
42+
directly - it gets moved automatically when you download or upload
43+
from your friend's repository.
44+
</td>
45+
</tr>
46+
<tr>
47+
<td>
48+
<Image
49+
alt="Tag"
50+
width="16"
51+
height="16"
52+
className="m-0 inline"
53+
src="/branches/sticky-notes-and-paintbrushes/tag.png"
54+
/>{' '}
55+
Tag
56+
</td>
57+
<td>
58+
Marks a permanent spot in history. Really just a "permanent branch".
59+
</td>
60+
</tr>
61+
</tbody>
62+
</table>
63+
)
64+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
import Image from 'next/image'
2+
3+
export function RecipeFollowTable() {
4+
return (
5+
<table>
6+
<thead>
7+
<tr>
8+
<th className="w-[50%]">Before</th>
9+
<th className="w-[50%]">
10+
After <code>Add 'whale.jpg'</code>
11+
</th>
12+
</tr>
13+
</thead>
14+
<tbody>
15+
<tr>
16+
<td>
17+
<Image
18+
alt="Docs before"
19+
src="/time-travel/patch/patch-docs-before.png"
20+
width={136}
21+
height={78}
22+
className="m-0"
23+
/>
24+
</td>
25+
<td>
26+
<Image
27+
alt="Docs after"
28+
src="/time-travel/patch/patch-docs-after.png"
29+
width={136}
30+
height={78}
31+
className="m-0"
32+
/>
33+
</td>
34+
</tr>
35+
<tr>
36+
<td>
37+
<Image
38+
alt="C before"
39+
src="/time-travel/patch/patch-c-before.png"
40+
width={136}
41+
height={78}
42+
className="m-0"
43+
/>
44+
</td>
45+
<td>
46+
<Image
47+
alt="C after"
48+
src="/time-travel/patch/patch-c-after.png"
49+
width={136}
50+
height={78}
51+
className="m-0"
52+
/>
53+
</td>
54+
</tr>
55+
<tr>
56+
<td>
57+
<Image
58+
alt="Conflict before"
59+
src="/time-travel/patch/patch-conflict-before.png"
60+
width={136}
61+
height={78}
62+
className="m-0"
63+
/>
64+
</td>
65+
<td className="align-top">Unclear</td>
66+
</tr>
67+
</tbody>
68+
</table>
69+
)
70+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
import Image from 'next/image'
2+
3+
export function RecipeInferTable() {
4+
return (
5+
<table>
6+
<thead>
7+
<tr>
8+
<th className="w-[33%]">Before</th>
9+
<th className="w-[33%]">After</th>
10+
<th className="w-[33%]">Diff</th>
11+
</tr>
12+
</thead>
13+
<tbody>
14+
<tr>
15+
<td>
16+
<Image
17+
alt="Docs before"
18+
src="/time-travel/patch/patch-docs-before.png"
19+
width={136}
20+
height={78}
21+
className="m-0"
22+
/>
23+
</td>
24+
<td>
25+
<Image
26+
alt="Docs after"
27+
src="/time-travel/patch/patch-docs-after.png"
28+
width={136}
29+
height={78}
30+
className="m-0"
31+
/>
32+
</td>
33+
<td>
34+
<Image
35+
alt="Docs diff"
36+
src="/time-travel/patch/patch-docs-diff.png"
37+
width={136}
38+
height={78}
39+
className="m-0"
40+
/>
41+
</td>
42+
</tr>
43+
<tr>
44+
<td>
45+
<Image
46+
alt="C before"
47+
src="/time-travel/patch/patch-c-before.png"
48+
width={136}
49+
height={78}
50+
className="m-0"
51+
/>
52+
</td>
53+
<td>
54+
<Image
55+
alt="C after"
56+
src="/time-travel/patch/patch-c-after.png"
57+
width={136}
58+
height={78}
59+
className="m-0"
60+
/>
61+
</td>
62+
<td>
63+
<Image
64+
alt="C diff"
65+
src="/time-travel/patch/patch-c-diff.png"
66+
width={136}
67+
height={78}
68+
className="m-0"
69+
/>
70+
</td>
71+
</tr>
72+
</tbody>
73+
</table>
74+
)
75+
}

0 commit comments

Comments
 (0)