rearchitecture
This commit is contained in:
34
src/App.scss
34
src/App.scss
@@ -1,34 +0,0 @@
|
||||
$padding: 15px;
|
||||
|
||||
.header {
|
||||
background-color: #282c34;
|
||||
padding: $padding;
|
||||
display: flex;
|
||||
justify-items: center;
|
||||
font-size: calc(10px + 2vmin);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.menu {
|
||||
position: absolute;
|
||||
|
||||
background: none;
|
||||
border: none;
|
||||
color: white;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button {
|
||||
|
||||
}
|
||||
|
||||
.name {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
15
src/App.tsx
15
src/App.tsx
@@ -1,15 +0,0 @@
|
||||
import React from 'react';
|
||||
import './App.scss';
|
||||
import {Canvas} from "./index/Canvas";
|
||||
import {Nav} from "./Nav";
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<div className="App">
|
||||
<Nav/>
|
||||
<Canvas/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
13
src/Nav.tsx
13
src/Nav.tsx
@@ -1,13 +0,0 @@
|
||||
import React from "react";
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
import {faBars} from "@fortawesome/free-solid-svg-icons/faBars";
|
||||
|
||||
export function Nav() {
|
||||
return <nav className="header">
|
||||
|
||||
<button className="menu">
|
||||
<FontAwesomeIcon icon={faBars}/>
|
||||
</button>
|
||||
<div className="name">Tymur Arsentiev</div>
|
||||
</nav>;
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
body {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
||||
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
||||
sans-serif;
|
||||
@@ -11,3 +14,10 @@ code {
|
||||
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
||||
monospace;
|
||||
}
|
||||
|
||||
button {
|
||||
background: none;
|
||||
border: none;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -1,15 +1,18 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import './index.css';
|
||||
import App from './App';
|
||||
import reportWebVitals from './reportWebVitals';
|
||||
import {Canvas} from "./index/Canvas";
|
||||
import {Nav} from "./nav/Nav";
|
||||
|
||||
const root = ReactDOM.createRoot(
|
||||
document.getElementById('root') as HTMLElement
|
||||
);
|
||||
|
||||
root.render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
<Nav/>
|
||||
<Canvas/>
|
||||
</React.StrictMode>
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user