Kbd elements in about (#871)

* WIP

* improve /about with keyboard shortcuts

* clean up about styles
main
Michael Fix 5 years ago committed by repo-ranger[bot]
parent d4870c10d1
commit 31b5b99598

@ -141,7 +141,7 @@ function ExportMenu({
</div>
</div>
<div className="save-container">
<span>Export as</span>
<span>Export</span>
<div>
{!disablePNG && (
<Button

@ -174,6 +174,22 @@ export default () => (
color: #121212;
}
kbd {
display: inline-block;
padding: 3px 5px; /* padding: 2px 4px; */
font-size: 9px;
font-weight: 700;
line-height: 1.2;
color: ${COLORS.DARK_GRAY};
vertical-align: middle;
background-color: #fafbfc; /* ${COLORS.SECONDARY}; */
border: 1px solid #c6cbd1;
border-bottom-color: #959da5;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #959da5;
white-space: nowrap;
}
.link {
color: #fff;
text-decoration: none;

@ -21,13 +21,12 @@ export default () => (
<h2>Who uses it?</h2>
<p>
Carbon is used by thousands of developers daily, including experts at:
<div className="mt2">
<img
width="508px"
src="/static/svg/open-source-companies-2.svg"
alt="Companies that trust Carbon: Google, Airbnb, GitHub, Coinbase, and Microsoft"
/>
</div>
<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">
@ -79,6 +78,25 @@ export default () => (
</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>
@ -93,28 +111,37 @@ export default () => (
{`
.about {
font-size: 16px;
max-width: 632px;
}
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;
}
ul {
list-style-position: inside;
list-style-type: circle;
td {
padding: 0.25rem 0;
}
.about {
max-width: 632px;
kbd {
margin-left: var(--x3);
}
`}
</style>

Loading…
Cancel
Save