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> </div>
<div className="save-container"> <div className="save-container">
<span>Export as</span> <span>Export</span>
<div> <div>
{!disablePNG && ( {!disablePNG && (
<Button <Button

@ -174,6 +174,22 @@ export default () => (
color: #121212; 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 { .link {
color: #fff; color: #fff;
text-decoration: none; text-decoration: none;

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

Loading…
Cancel
Save