-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refeito a tela de um partido #82
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
html { | ||
height: 100%; | ||
} | ||
|
||
body { | ||
font-family: 'Roboto Slab', serif; | ||
font-family: 'Montserrat'; | ||
font-style: normal; | ||
font-weight: 500; | ||
line-height: 37px; | ||
background-color: #e5e5e5; | ||
color: #2f2f2f; | ||
min-height: 100%; | ||
min-width: fit-content; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/* eslint-disable jsx-a11y/alt-text */ | ||
import React, { useState, useEffect } from 'react'; | ||
import axios from 'axios'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import noImage from '../../assets/placeholder-user.png'; | ||
import './styles.scss'; | ||
|
||
const PartidoInfo = ({ match }) => { | ||
|
@@ -27,65 +27,63 @@ const PartidoInfo = ({ match }) => { | |
}, [id]); | ||
|
||
return ( | ||
<div> | ||
<section className="hero is-dark"> | ||
<div className="hero-body"> | ||
<div className="container"> | ||
<h1 className="title is-4"> | ||
{partido.nome} - {partido.sigla} | ||
<div className="columns divPartido"> | ||
<div className="column is-two-fifths"> | ||
<div className="partido"> | ||
<div> | ||
<h1> | ||
{partido.sigla} - {partido.nome} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no css desse h1 coloca um text-align: center pra no mobile ele centralizar tbm |
||
</h1> | ||
<h2 className="subtitle"> | ||
<img src={partido.urlLogo} /> | ||
</h2> | ||
<img | ||
className="deputado-img" | ||
src={partido.urlLogo} | ||
onError={(e) => { | ||
e.currentTarget.src = noImage; | ||
}} | ||
alt="Logo do partido" | ||
/> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
<div className="container partido-single"> | ||
<div className="columns is-centered columns-fix"> | ||
<div className="column"> | ||
<div className="card"> | ||
<div className="card-content"> | ||
<div className="media"> | ||
<div className="media-content"> | ||
<p className="title is-4">Status</p> | ||
</div> | ||
</div> | ||
<div className="content"> | ||
<strong>Situação: </strong> {status.situacao} | ||
<br /> | ||
<strong>Total de posse: </strong> {status.totalPosse} | ||
<br /> | ||
<strong>Total de membros: </strong> {status.totalMembros} | ||
</div> | ||
</div> | ||
</div> | ||
<div className="status"> | ||
<div> | ||
<h1>Informações</h1> | ||
</div> | ||
<div className="informations"> | ||
<div> | ||
<label>Situação: </label> | ||
<label className="backgroundYellow">{status.situacao}</label> | ||
</div> | ||
<div> | ||
<label>Total de posse: </label> | ||
<label className="backgroundYellow">{status.totalPosse}</label> | ||
</div> | ||
<div> | ||
<label>Total de membros: </label> | ||
<label className="backgroundYellow">{status.totalMembros}</label> | ||
</div> | ||
|
||
<div className="column"> | ||
<div className="card"> | ||
<div className="card-image"> | ||
<figure className="image"> | ||
<div | ||
style={{ backgroundImage: `url(${lider.urlFoto})` }} | ||
className="image-lider" | ||
/> | ||
</figure> | ||
</div> | ||
<div className="card-content"> | ||
<div className="media"> | ||
<div className="media-content"> | ||
<p className="title is-6">Nome: {lider.nome}</p> | ||
<p className="subtitle is-8"> | ||
Sigla Partido: {lider.siglaPartido} | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div> | ||
<label>Total de membros: </label> | ||
<label className="backgroundYellow">{status.totalMembros}</label> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div className="column"> | ||
<div className="infoPresidente"> | ||
<h1 className="">Presidente</h1> | ||
<img | ||
className="image-lider" | ||
src={lider.urlFoto} | ||
onError={(e) => { | ||
e.currentTarget.src = noImage; | ||
}} | ||
alt="Foto do líder" | ||
/> | ||
<p>{lider.nome}</p> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,106 @@ | ||
.titulo { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
.divPartido { | ||
margin-top: 60px; | ||
margin-left: 66px; | ||
margin-right: 66px; | ||
|
||
h1 { | ||
font-size: 30px; | ||
} | ||
} | ||
|
||
.titulo-img { | ||
.partido { | ||
display: flex; | ||
justify-content: center; | ||
flex-direction: column; | ||
align-items: center; | ||
background: #ffffff; | ||
border: 1px solid #adadad; | ||
box-sizing: border-box; | ||
padding: 10px; | ||
margin-bottom: 25px; | ||
|
||
div { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
margin-top: 61px; | ||
margin-bottom: 58px; | ||
} | ||
|
||
img { | ||
height: 60%; | ||
width: 60%; | ||
margin-top: 10px; | ||
} | ||
} | ||
|
||
.status { | ||
max-width: 300px; | ||
margin: 20px 0px 0px; | ||
padding: 20px; | ||
display: flex; | ||
flex-direction: column; | ||
background: #ffffff; | ||
border: 1px solid #adadad; | ||
box-sizing: border-box; | ||
padding: 10px; | ||
// height: 100%; | ||
|
||
h1 { | ||
color: #da552f; | ||
> div:first-child { | ||
text-align: center; | ||
} | ||
|
||
article { | ||
margin-left: 15px; | ||
border: 1px solid #ddd; | ||
border-radius: 10px; | ||
padding: 10px; | ||
div { | ||
margin-bottom: 15px; | ||
} | ||
|
||
strong { | ||
font-weight: bold; | ||
font-size: 16px; | ||
color: darkblue; | ||
.informations { | ||
display: flex; | ||
flex-direction: row; | ||
flex-wrap: wrap; | ||
|
||
div { | ||
display: flex; | ||
height: fit-content; | ||
} | ||
} | ||
} | ||
|
||
.lider { | ||
max-width: 300px; | ||
padding-left: 20px; | ||
label { | ||
margin-top: 10px; | ||
font-size: 12px; | ||
line-height: 14px; | ||
padding: 5px 0px 5px 10px; | ||
|
||
h1 { | ||
color: #da552f; | ||
background: #e7e7e7; | ||
border-radius: 6px 0px 0px 6px; | ||
} | ||
|
||
article { | ||
margin-left: 15px; | ||
border: 1px solid #ddd; | ||
border-radius: 10px; | ||
padding: 10px; | ||
|
||
strong { | ||
font-weight: bold; | ||
font-size: 16px; | ||
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', | ||
'Lucida Sans Unicode', Geneva, Verdana, sans-serif; | ||
color: darkblue; | ||
} | ||
.backgroundYellow { | ||
padding: 5px 10px 5px 10px; | ||
background: #f3a62d; | ||
border-radius: 0px 6px 6px 0px; | ||
margin-right: 10px; | ||
} | ||
} | ||
|
||
.partidos-lista { | ||
.title { | ||
font-size: 14px; | ||
line-height: 20px; | ||
} | ||
.infoPresidente { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
background: #ffffff; | ||
border: 1px solid #adadad; | ||
box-sizing: border-box; | ||
padding: 10px; | ||
|
||
.subtitle { | ||
text-align: center; | ||
font-size: 14px; | ||
margin-top: 0px !important; | ||
> div { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
margin-bottom: 100px; | ||
} | ||
} | ||
|
||
.partido-single { | ||
height: 400px; | ||
.image-lider { | ||
background-size: contain; | ||
height: 400px; | ||
background-position: center; | ||
background-repeat: no-repeat; | ||
width: 250px; | ||
} | ||
|
||
p { | ||
font-size: 24px; | ||
text-align: center; | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coloca esse color no svg dos icones no componente também (ou remove a prop color de lá)