mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-20 12:37:01 +02:00
refactor(v2): move source files to be under website/src directory (#1609)
* refactor(v2): move source files to be under website/src directory * misc: rename src constant
This commit is contained in:
parent
da3c91373e
commit
ffbc7a37f8
29 changed files with 56 additions and 37 deletions
38
website/src/components/BrowserWindow/index.js
Normal file
38
website/src/components/BrowserWindow/index.js
Normal file
|
@ -0,0 +1,38 @@
|
|||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import styles from './styles.module.css';
|
||||
|
||||
function BrowserWindow({children, minHeight, url}) {
|
||||
return (
|
||||
<div className={styles.browserWindow} style={{minHeight}}>
|
||||
<div className={styles.browserWindowHeader}>
|
||||
<div className={styles.buttons}>
|
||||
<span className={styles.dot} style={{background: '#f25f58'}} />
|
||||
<span className={styles.dot} style={{background: '#fbbe3c'}} />
|
||||
<span className={styles.dot} style={{background: '#58cb42'}} />
|
||||
</div>
|
||||
<div className={styles.browserWindowAddressBar}>
|
||||
<input disabled type="text" value={url} readOnly />
|
||||
</div>
|
||||
<div className={styles.browserWindowMenuIcon}>
|
||||
<div>
|
||||
<span className={styles.bar} />
|
||||
<span className={styles.bar} />
|
||||
<span className={styles.bar} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className={styles.browserWindowBody}>{children}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default BrowserWindow;
|
70
website/src/components/BrowserWindow/styles.module.css
Normal file
70
website/src/components/BrowserWindow/styles.module.css
Normal file
|
@ -0,0 +1,70 @@
|
|||
.browserWindow {
|
||||
border: 3px solid var(--ifm-color-emphasis-alpha-10);
|
||||
border-top-left-radius: var(--ifm-global-radius);
|
||||
border-top-right-radius: var(--ifm-global-radius);
|
||||
}
|
||||
|
||||
.browserWindowHeader {
|
||||
align-items: center;
|
||||
background: var(--ifm-color-emphasis-alpha-10);
|
||||
display: flex;
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
|
||||
.row:after {
|
||||
content: '';
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.right {
|
||||
align-self: center;
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.browserWindowAddressBar {
|
||||
flex: 1 0 auto;
|
||||
margin-left: 0.5rem;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.dot {
|
||||
margin-right: 6px;
|
||||
margin-top: 4px;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
background-color: #bbb;
|
||||
border-radius: 50%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
input[type='text'] {
|
||||
width: 100%;
|
||||
border-radius: 12.5px;
|
||||
border: none;
|
||||
background-color: white;
|
||||
margin-top: -8px;
|
||||
height: 25px;
|
||||
color: #666;
|
||||
padding: 5px 15px;
|
||||
}
|
||||
|
||||
.browserWindowMenuIcon {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.bar {
|
||||
width: 17px;
|
||||
height: 3px;
|
||||
background-color: #aaa;
|
||||
margin: 3px 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.browserWindowBody {
|
||||
padding: 1rem;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue