Skip to content

Commit

Permalink
Finalizando a página principal
Browse files Browse the repository at this point in the history
  • Loading branch information
Falconxtr committed Dec 18, 2023
1 parent 12f9440 commit cec7235
Show file tree
Hide file tree
Showing 11 changed files with 167 additions and 78 deletions.
25 changes: 2 additions & 23 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,13 @@
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<link href='https://fonts.googleapis.com/css?family=Poppins' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Great Vibes' rel='stylesheet'>
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
44 changes: 8 additions & 36 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,38 +1,10 @@
.App {
text-align: center;
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins';
}

.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);
}
}
.limita-secao {
max-width: 1024px;
}
29 changes: 10 additions & 19 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
import logo from './logo.svg';
import React from "react";
import './App.css';

import Topo from './componentes/topo';
import Conteudo from "./componentes/conteudo";

function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
return(
<section>
<Topo />
<Conteudo />
</section>
);
}

export default App;
export default App;
Binary file added src/assets/banner-barbearia.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/barbearia-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/moon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/sun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions src/componentes/conteudo/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from "react";
import "./style.css";

export default function Conteudo() {
return(
<section>
<div className="banner">

</div>
<div className="limita-secao secao-conteudo">
<h1>Bem-vindo a Barber Shop</h1>
<p className="paragrafo1"><spam>Nossa barbearia sempre oferece profissionais de qualidade e estamos prontos para lidar com suas maiores expectativas.</spam></p>
<p>Nossos serviços são dedicados ao seu sucesso pessoal. Aqui temos uma equipe premiada que demonstrou o talento de mestres barbeiros em vários concursos de estilo. Deixe nosso barbeiro ser seu estilista pessoal e você nunca ficará desapontado.</p>
<p className="assinatura">S. Kelly</p>
</div>
</section>
);
}
52 changes: 52 additions & 0 deletions src/componentes/conteudo/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
.banner {
height: 35vh;
background-image: url('../../assets/banner-barbearia.jpg');
background-repeat: no-repeat;
background-size: cover;
background-position: 0% 45%;
margin-bottom: 85px;
}

.secao-conteudo {
margin: 0 auto;
text-align: center;
padding: 0 20px;
}

.secao-conteudo h1 {
font-size: 38px;
margin-bottom: 25px;
}

.paragrafo1 {
margin: auto;
max-width: 800px;
font-weight: bold;
padding-bottom: 15px;
}

.assinatura {
color: #B2987D;
font-family: 'Great Vibes';
font-size: 48px;
padding-top: 65px;
padding-bottom: 45px;
}

@media screen and (max-width: 375px){
.banner {
background-position: 50%;
background-size: cover;
}

.paragrafo1 {
max-width: 300px;
}
}


@media screen and (min-width: 376px) and (max-width: 768px){
.paragrafo1 {
max-width: 650px;
}
}
32 changes: 32 additions & 0 deletions src/componentes/topo/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React, { useState } from "react";
import './style.css';

import Logo from "../../assets/barbearia-logo.png";
import Lua from "../../assets/moon.png";

export default function Topo() {
const corDeFundoBranco = 'modoclaro';
const corDefundoPreto = 'modoescuro';

const [novaCor, setNovaCor] = useState(corDeFundoBranco);

const alterarCor = () => {
if (novaCor === corDeFundoBranco) {
setNovaCor(corDefundoPreto)
} else {
setNovaCor(corDeFundoBranco)
}
};

return(
<section className={novaCor}>
<div className="limita-secao secao-topo">
<img className="logo" src={ Logo } alt="Barbearia Logo" />
<button onClick={alterarCor} className={novaCor}>
<img src={ Lua } alt="Dark Mode" />
<p>Dark</p>
</button>
</div>
</section>
);
}
45 changes: 45 additions & 0 deletions src/componentes/topo/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
.modoclaro {
background-color: #fff;
color: #000;
}

.modoescuro {
background-color: #252323;
color: #fff;
}

.secao-topo {
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 auto;
}

.logo {
width: 95px;
}

button {
border: 2px solid #B2987D;
border-radius: 35px;
padding: 8px 15px;
background-color: #fff;
display: flex;
align-items: center;
justify-content: space-evenly;
margin-right: 15px;
}

button:hover {
cursor: pointer;
}

button img {
width: 25px;
}

button p {
font-weight: bold;
padding-left: 10px;
}

0 comments on commit cec7235

Please sign in to comment.