forked from carbon-app/carbon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
about.js
160 lines (151 loc) · 4.68 KB
/
about.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
import React from 'react'
import Page from '../components/Page'
export default () => (
<Page>
<div className="about">
<div className="mb4">
<h2>What does this do?</h2>
<p>Carbon lets you create and share beautiful images of your source code</p>
<p>
You know all of those code screenshots you see on Twitter? Although the code's
usually impressive, we thought there was room for improvement in the aesthetic department.
So what are you waiting for? Go try it out and impress all your developer and designer
friends.{' '}
<span role="img" aria-label="Palette">
🎨
</span>
</p>
</div>
<div className="mb4">
<h2>Who uses it?</h2>
<p>
Carbon is used by thousands of developers daily, including experts at:
<img
className="mt2"
width="508px"
src="/static/svg/open-source-companies-2.svg"
alt="Companies that trust Carbon: Google, Airbnb, GitHub, Coinbase, and Microsoft"
/>
</p>
</div>
<div className="mb4">
<h2>How do I use it?</h2>
<h4 className="mb0 mt3">Import</h4>
<p className="mb1 mt2">There are a few different ways to import code into Carbon:</p>
<ul className="mt0 mb3">
<li>Drop a file into the editor</li>
<li>
Append a GitHub gist id to the url (
<a className="link" href="/0db00e81d5416c339181e59481c74b59">
example
</a>
)
</li>
<li>Paste your code directly</li>
</ul>
<h4 className="mb0 mt4">Customization</h4>
<p className="mt2 mb3">
Once you've got all of your code into Carbon, you can customize your image by
changing the syntax theme, background color/image, window theme, or padding.
</p>
<p className="mt2 mb3">
You can even drop an image file onto the editor to set the background to that image. Give
it a try!
</p>
<h4 className="mb0 mt4">Export/Sharing</h4>
<p className="mt2 mb3">
After you've customized your image you can Tweet a link to the image, or save it
directly.
</p>
<p className="mt2 mb3">
If you use the 'Tweet' button, Carbon will automatically make your image
accessible. However, if you want to manually tweet your carbon image, please check out (
<a className="link" href="https://help.twitter.com/en/using-twitter/picture-descriptions">
how to make your Twitter images accessible
</a>
).
</p>
<p className="mt2 mb3">
If you include a Carbon image in a post, the source code will be invisible to assistive
technology — it will not be possible to enlarge or copy it, etc. Please, think about
adding another element with the source code as text, like (
<a
className="link"
href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details"
>
an HTML Details Element
</a>
) below the image.
</p>
<h4 className="mb0 mt4" id="shortcuts">
Keyboard Shortcuts
</h4>
<table className="mt2 mb3">
<tbody>
<tr>
<td>Open settings menu</td>
<td>
<kbd>⌘-/</kbd>
</td>
</tr>
<tr>
<td>Export as PNG</td>
<td>
<kbd>⌘-Shift-E</kbd>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h2>I want to make this better.</h2>
<p>
<a className="link" href="https://github.com/carbon-app/carbon#contribute">
Contributors welcome!
</a>
</p>
</div>
</div>
<style jsx>
{`
.about {
font-size: 16px;
max-width: 632px;
margin: 0 auto var(--x4);
}
@media (max-width: 768px) {
.about {
max-width: 90vw;
}
}
img {
max-width: 100%;
}
h2 {
font-weight: bold;
font-size: 32px;
}
h4 {
font-weight: bold;
}
p,
li {
color: #fff;
}
ul {
list-style-position: inside;
list-style-type: circle;
}
span {
color: #fff;
}
td {
padding: 0.25rem 0;
}
kbd {
margin-left: var(--x3);
}
`}
</style>
</Page>
)