2020-09-13 08:21:52 +03:00
|
|
|
import * as React from "react";
|
2020-09-10 13:59:43 +03:00
|
|
|
import * as Constants from "~/common/constants";
|
|
|
|
|
2020-11-04 20:55:48 +03:00
|
|
|
import { css, keyframes } from "@emotion/core";
|
2020-09-10 13:59:43 +03:00
|
|
|
|
2020-09-11 06:25:22 +03:00
|
|
|
const typewriter = keyframes`
|
2020-09-13 08:21:52 +03:00
|
|
|
0% {
|
2020-09-13 06:52:06 +03:00
|
|
|
width: 0;
|
|
|
|
}
|
2020-09-13 08:21:52 +03:00
|
|
|
50% {
|
2020-09-13 06:52:06 +03:00
|
|
|
width: 10.2em;
|
|
|
|
}
|
2020-09-13 08:21:52 +03:00
|
|
|
100% {
|
|
|
|
width: 0;
|
|
|
|
}
|
2020-09-11 06:25:22 +03:00
|
|
|
`;
|
2020-09-13 08:21:52 +03:00
|
|
|
|
2020-09-10 13:59:43 +03:00
|
|
|
const STYLES_ROOT = css`
|
|
|
|
height: 300px;
|
|
|
|
width: 500px;
|
2020-09-12 20:17:23 +03:00
|
|
|
background-color: ${Constants.system.black};
|
|
|
|
border-radius: 5px;
|
2020-09-13 08:21:52 +03:00
|
|
|
|
2020-09-12 20:17:23 +03:00
|
|
|
@media (${Constants.sizes.tablet}px) {
|
2020-09-10 13:59:43 +03:00
|
|
|
height: 230px;
|
|
|
|
width: 345px;
|
|
|
|
}
|
2020-09-13 08:21:52 +03:00
|
|
|
|
2020-09-12 20:17:23 +03:00
|
|
|
@media (${Constants.sizes.mobile}px) {
|
2020-09-10 13:59:43 +03:00
|
|
|
height: 200px;
|
|
|
|
width: 300px;
|
|
|
|
}
|
|
|
|
`;
|
2020-09-13 08:21:52 +03:00
|
|
|
|
2020-09-12 20:17:23 +03:00
|
|
|
const STYLES_WINDOW_HEADER = css`
|
|
|
|
height: 34px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
text-align: center;
|
2020-09-13 08:21:52 +03:00
|
|
|
|
2020-09-12 20:17:23 +03:00
|
|
|
@media (${Constants.sizes.mobile}px) {
|
|
|
|
height: 28px;
|
|
|
|
}
|
|
|
|
`;
|
2020-09-13 08:21:52 +03:00
|
|
|
|
2020-09-12 20:17:23 +03:00
|
|
|
const STYLES_ICON = css`
|
|
|
|
border-radius: 50%;
|
|
|
|
display: inline-block;
|
|
|
|
width: 12px;
|
|
|
|
height: 12px;
|
|
|
|
margin-left: 8px;
|
2020-11-08 05:32:17 +03:00
|
|
|
|
2020-09-12 20:17:23 +03:00
|
|
|
:nth-of-type(1) {
|
|
|
|
background: rgb(255, 95, 86);
|
|
|
|
margin-left: 12px;
|
|
|
|
}
|
|
|
|
:nth-of-type(2) {
|
|
|
|
background: rgb(255, 189, 46);
|
|
|
|
}
|
|
|
|
:nth-of-type(3) {
|
|
|
|
background: rgb(39, 201, 63);
|
|
|
|
}
|
2020-09-10 13:59:43 +03:00
|
|
|
`;
|
2020-09-13 08:21:52 +03:00
|
|
|
|
2020-09-11 06:25:22 +03:00
|
|
|
const STYLES_WINDOW_BODY = css`
|
2020-09-13 08:21:52 +03:00
|
|
|
padding: 24px;
|
2020-09-11 06:25:22 +03:00
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
2020-09-12 20:17:23 +03:00
|
|
|
color: ${Constants.system.white};
|
2020-09-11 06:25:22 +03:00
|
|
|
animation: ${typewriter};
|
|
|
|
display: inline-block;
|
|
|
|
position: relative;
|
|
|
|
animation-duration: 10s;
|
|
|
|
animation-timing-function: steps(45, end);
|
|
|
|
animation-iteration-count: infinite;
|
|
|
|
`;
|
2020-09-13 08:21:52 +03:00
|
|
|
|
2020-09-10 13:59:43 +03:00
|
|
|
const CodeTerminal = () => {
|
|
|
|
return (
|
|
|
|
<div css={STYLES_ROOT}>
|
2020-09-12 20:17:23 +03:00
|
|
|
<div css={STYLES_WINDOW_HEADER}>
|
|
|
|
<span css={STYLES_ICON} />
|
|
|
|
<span css={STYLES_ICON} />
|
|
|
|
<span css={STYLES_ICON} />
|
2020-09-10 13:59:43 +03:00
|
|
|
</div>
|
2020-09-12 20:17:23 +03:00
|
|
|
<div css={STYLES_WINDOW_BODY}>npm install --save slate-react-system</div>
|
2020-09-10 13:59:43 +03:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
2020-09-13 08:21:52 +03:00
|
|
|
|
2020-09-10 13:59:43 +03:00
|
|
|
export default CodeTerminal;
|