init basic folders/components to work on

This commit is contained in:
Krosmez 2024-04-06 16:40:38 -04:00
parent 6b267c7ed5
commit f5788251fa
7 changed files with 112 additions and 40 deletions

View File

@ -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;
}

View File

@ -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>

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View 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;

View 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;
}
}

View 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;

View File