2022-12-08 12:14:18 +08:00
|
|
|
import { css, Global } from '@emotion/react';
|
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
export default () => (
|
|
|
|
<Global
|
|
|
|
styles={css`
|
2022-12-19 13:23:28 +08:00
|
|
|
/* Browser mockup code
|
2022-12-08 12:14:18 +08:00
|
|
|
* Contribute: https://gist.github.com/jarthod/8719db9fef8deb937f4f
|
|
|
|
* Live example: https://updown.io
|
|
|
|
*/
|
|
|
|
|
2022-12-19 13:23:28 +08:00
|
|
|
.browser-mockup {
|
|
|
|
position: relative;
|
|
|
|
border-top: 2em solid rgba(230, 230, 230, 0.7);
|
|
|
|
border-radius: 3px 3px 0 0;
|
|
|
|
box-shadow: 0 0.1em 0.5em 0 rgba(0, 0, 0, 0.28);
|
|
|
|
}
|
2022-12-08 12:14:18 +08:00
|
|
|
|
2022-12-19 13:23:28 +08:00
|
|
|
.browser-mockup::before {
|
|
|
|
position: absolute;
|
|
|
|
top: -1.25em;
|
|
|
|
left: 1em;
|
|
|
|
display: block;
|
|
|
|
width: 0.5em;
|
|
|
|
height: 0.5em;
|
|
|
|
background-color: #f44;
|
|
|
|
border-radius: 50%;
|
|
|
|
box-shadow: 0 0 0 2px #f44, 1.5em 0 0 2px #9b3, 3em 0 0 2px #fb5;
|
|
|
|
content: '';
|
|
|
|
}
|
2022-12-08 12:14:18 +08:00
|
|
|
|
2022-12-19 13:23:28 +08:00
|
|
|
.browser-mockup.with-tab::after {
|
|
|
|
position: absolute;
|
|
|
|
top: -2em;
|
|
|
|
left: 5.5em;
|
|
|
|
display: block;
|
|
|
|
width: 20%;
|
|
|
|
height: 0;
|
|
|
|
border-right: 0.8em solid transparent;
|
|
|
|
border-bottom: 2em solid white;
|
|
|
|
border-left: 0.8em solid transparent;
|
|
|
|
content: '';
|
|
|
|
}
|
2022-12-08 12:14:18 +08:00
|
|
|
|
2022-12-19 13:23:28 +08:00
|
|
|
.browser-mockup.with-url::after {
|
|
|
|
position: absolute;
|
|
|
|
top: -1.6em;
|
|
|
|
left: 5.5em;
|
|
|
|
display: block;
|
2023-06-13 15:45:34 +08:00
|
|
|
width: calc(100% - 6em);
|
2022-12-19 13:23:28 +08:00
|
|
|
height: 1.2em;
|
|
|
|
background-color: white;
|
|
|
|
border-radius: 2px;
|
|
|
|
content: '';
|
|
|
|
}
|
2022-12-08 12:14:18 +08:00
|
|
|
|
2022-12-19 13:23:28 +08:00
|
|
|
.browser-mockup > * {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
`}
|
2022-12-08 12:14:18 +08:00
|
|
|
/>
|
|
|
|
);
|