init basic folders/components to work on
This commit is contained in:
parent
6b267c7ed5
commit
f5788251fa
40
src/App.css
40
src/App.css
|
|
@ -1,38 +1,4 @@
|
|||
.App {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.App-logo {
|
||||
height: 40vmin;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
.App-logo {
|
||||
animation: App-logo-spin infinite 20s linear;
|
||||
}
|
||||
}
|
||||
|
||||
.App-header {
|
||||
background-color: #282c34;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: calc(10px + 2vmin);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.App-link {
|
||||
color: #61dafb;
|
||||
}
|
||||
|
||||
@keyframes App-logo-spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
:root {
|
||||
--color-primary: black;
|
||||
--color-secondary: #d9d9d9;
|
||||
}
|
||||
|
|
@ -1,9 +1,12 @@
|
|||
import logo from './logo.svg';
|
||||
import './App.css';
|
||||
import "./App.css";
|
||||
|
||||
import Header from "./layouts/Header";
|
||||
import logo from "../src/assets/svg/logo.svg";
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<div className="App">
|
||||
<Header />
|
||||
<header className="App-header">
|
||||
<img src={logo} className="App-logo" alt="logo" />
|
||||
<p>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
15
src/layouts/Container/index.js
Normal file
15
src/layouts/Container/index.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import "./styles.css";
|
||||
|
||||
const Container = ({ grow, children, full }) => {
|
||||
return (
|
||||
<div
|
||||
className={`container${grow ? " --grow" : ""}${
|
||||
full ? " --fullwidth" : ""
|
||||
}`}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Container;
|
||||
64
src/layouts/Container/styles.css
Normal file
64
src/layouts/Container/styles.css
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
.container {
|
||||
width: 100%;
|
||||
max-width: 30rem;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.container.--grow {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.container.--fullwidth {
|
||||
max-width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 36em) {
|
||||
|
||||
/* 36em * 16 = 576px */
|
||||
.container {
|
||||
max-width: 50rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 48em) {
|
||||
|
||||
/* 48em * 16 = 768px */
|
||||
.container {
|
||||
max-width: 69rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 62em) {
|
||||
|
||||
/* 62em * 16 = 992px */
|
||||
.container {
|
||||
max-width: 96rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 75em) {
|
||||
|
||||
/* 75em * 16 = 1200px */
|
||||
.container {
|
||||
max-width: 111rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 90em) {
|
||||
|
||||
/* 90em * 16 = 1440px */
|
||||
.container {
|
||||
max-width: 120rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 120em) {
|
||||
|
||||
/* 90em * 16 = 1920px */
|
||||
.container {
|
||||
max-width: 168rem;
|
||||
}
|
||||
}
|
||||
24
src/layouts/Header/index.js
Normal file
24
src/layouts/Header/index.js
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import "./styles.css";
|
||||
|
||||
import React from "react";
|
||||
|
||||
import Container from "../Container";
|
||||
|
||||
const Header = () => {
|
||||
return (
|
||||
<header className="header">
|
||||
<Container>
|
||||
<h1>My Website</h1>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>Home</li>
|
||||
<li>About</li>
|
||||
<li>Contact</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</Container>
|
||||
</header>
|
||||
);
|
||||
};
|
||||
|
||||
export default Header;
|
||||
0
src/layouts/Header/styles.css
Normal file
0
src/layouts/Header/styles.css
Normal file
Loading…
Reference in New Issue
Block a user