Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,627 changes: 440 additions & 3,187 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"tailwindcss": "^3.4.0"
},
"scripts": {
"tailwind:css": "tailwind build src/css/tailwind.src.css -c tailwind.js -o src/css/tailwind.css",
"tailwind:css": "tailwindcss -i src/css/tailwind.src.css -o src/css/tailwind.css --watch",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
Expand All @@ -32,5 +32,11 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"overrides": {
"nth-check": ">=2.0.1",
"postcss": ">=8.4.31",
"webpack-dev-server": ">=5.2.1",
"resolve-url-loader": ">=5.0.0"
}
}
22 changes: 11 additions & 11 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import lobo4 from "./img/lobo4.jpg"

const Header = props => {
return (
<header class="header">
<header className="header">
<a href="/">
<img className="logo" alt="logo" src={logo} width="100" height="100"></img>
</a>
<nav>
<ul class="menu">
<ul className="menu">
<li><a href="/">Sobre</a></li>
<li><a href="/">Produtos</a></li>
<li><a href="/">Contato</a></li>
Expand All @@ -34,9 +34,9 @@ const Imagem = props => {
const [curtidas, setCurtidas] = React.useState(0);

return (
<div class={props.classe}>
<div className={props.classe}>
<img src={props.img} alt=""></img>
<div class="legenda">
<div className="legenda">
<p>{props.legenda}</p>
{!props.esconderCurtidas
&& <span onClick={() => setCurtidas(curtidas + 1)} >{curtidas} curtidas </span>}
Expand All @@ -47,7 +47,7 @@ const Imagem = props => {

const Video = props => {
return (
<div class={props.classe}>
<div className={props.classe}>
<video width="100%" controls>
<source src={`${props.video}.mp4`} type="video/mp4"></source>
<source src={`${props.video}.ogg`} type="video/ogg"></source>
Expand All @@ -60,7 +60,7 @@ const Video = props => {

const Noticia = props => {
return (
<div class={props.classe}>
<div className={props.classe}>
<img src={props.img} alt=""></img>
<p>{props.titulo}</p>
</div>
Expand All @@ -71,7 +71,7 @@ const SectionFlex = props => {
return (
<div>
<Titulo conteudo="Section Flexbox"></Titulo>
<section class="flex">
<section className="flex">
<Imagem img={lobo1} legenda="foto 1"></Imagem>
<Imagem img={lobo3} legenda="foto 2"></Imagem>
<Imagem img={lobo2} legenda="foto 3"></Imagem>
Expand All @@ -87,7 +87,7 @@ const SectionGrid1 = props => {
return (
<div>
<Titulo conteudo="Section Grid 1"></Titulo>
<section class="grid1">
<section className="grid1">
<Imagem img={lobo2} legenda="foto 1"></Imagem>
<Imagem img={lobo3} legenda="foto 2"></Imagem>
<Imagem img={lobo1} legenda="foto 3"></Imagem>
Expand All @@ -107,9 +107,9 @@ const SectionGrid2 = props => {
return (
<div>
<Titulo conteudo="Section Grid 2"></Titulo>
<section class="grid2">
<section className="grid2">
<Video video="/" legenda="Como criar sites" classe="video"></Video>
<div class="sidebar">
<div className="sidebar">
<Imagem img={lobo2} legenda="Legenda 1" esconderCurtidas="true"></Imagem>
<Imagem img={lobo3} legenda="Legenda 2" esconderCurtidas="true"> </Imagem>
<Imagem img={lobo1} legenda="Legenda 3" esconderCurtidas="true"></Imagem>
Expand All @@ -124,7 +124,7 @@ const SectionGrid3 = props => {
return (
<div>
<Titulo conteudo="Section Grid 3"></Titulo>
<section class="grid3">
<section className="grid3">
<Noticia img={lobo4} titulo="Legenda 1" classe="grid3-item"></Noticia>
<Noticia img={lobo1} titulo="Legenda 2" classe="grid3-item"></Noticia>
<Noticia img={lobo2} titulo="Legenda 3" classe="grid3-item"></Noticia>
Expand Down
15 changes: 12 additions & 3 deletions src/App.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@ import React from 'react';
import { render } from '@testing-library/react';
import App from './App';

test('renders learn react link', () => {
test('renders app components correctly', () => {
const { getByText } = render(<App />);
const linkElement = getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();

// Verifica se os títulos das seções estão sendo renderizados
const flexboxTitle = getByText(/section flexbox/i);
const grid1Title = getByText(/section grid 1/i);
const grid2Title = getByText(/section grid 2/i);
const grid3Title = getByText(/section grid 3/i);

expect(flexboxTitle).toBeInTheDocument();
expect(grid1Title).toBeInTheDocument();
expect(grid2Title).toBeInTheDocument();
expect(grid3Title).toBeInTheDocument();
});
Loading