-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exercicios 34 e 35: Componentes Gestor e Footer
1 parent
f3143c9
commit 80a6a8c
Showing
7 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
frontend/packages/volto-portal-governo/src/components/Footer/Footer.jsx
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import { Container } from '@plone/components'; | ||
import Info from './Info'; | ||
|
||
/** | ||
* Component to display the footer. | ||
* @function Footer | ||
* @returns {string} Markup of the component | ||
*/ | ||
const Footer = () => { | ||
return ( | ||
<footer id="footer"> | ||
<Container className="footer"> | ||
<Info /> | ||
<Container className="dados">Olá, pessoal!!</Container> | ||
</Container> | ||
</footer> | ||
); | ||
}; | ||
|
||
export default Footer; |
21 changes: 21 additions & 0 deletions
21
frontend/packages/volto-portal-governo/src/components/Footer/Info.jsx
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import { useSelector } from 'react-redux'; | ||
import { Container } from '@plone/components'; | ||
import Contato from '../Contato/Contato'; | ||
import Endereco from '../Endereco/Endereco'; | ||
|
||
const Info = (props) => { | ||
const navRoot = useSelector((state) => state.navroot?.data?.navroot); | ||
return ( | ||
<Container className={'footer-info'}> | ||
{navRoot && ( | ||
<> | ||
<Endereco content={navRoot} /> | ||
<Contato content={navRoot} /> | ||
</> | ||
)} | ||
</Container> | ||
); | ||
}; | ||
|
||
export default Info; |
41 changes: 41 additions & 0 deletions
41
frontend/packages/volto-portal-governo/src/components/Gestor/Gestor.jsx
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { Container } from '@plone/components'; | ||
|
||
const Gestor = (props) => { | ||
const gestor = props.content.gestor; | ||
return ( | ||
<Container narrow className={'gestor-wrapper'}> | ||
<h2>GESTOR</h2> | ||
{gestor && ( | ||
<> | ||
{gestor.image_scales?.image && ( | ||
<Container className={'image'}> | ||
<img | ||
src={`${gestor['@id']}/${gestor.image_scales.image[0].download}`} | ||
/> | ||
</Container> | ||
)} | ||
|
||
<Container className="gestor-cargo"> | ||
<h3 className={`gestor-nome}`}>{gestor.title}</h3> | ||
</Container> | ||
|
||
{gestor.description && ( | ||
<Container className="gestor-biografia"> | ||
<span>{gestor.description}</span> | ||
</Container> | ||
)} | ||
|
||
{gestor.cargo && ( | ||
<Container className="gestor-cargo"> | ||
<span>Cargo</span>: <span>{gestor.cargo.title}</span> | ||
</Container> | ||
)} | ||
</> | ||
)} | ||
</Container> | ||
); | ||
}; | ||
|
||
export default Gestor; |
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
12 changes: 12 additions & 0 deletions
12
...tal-governo/src/customizations/@kitconcept/volto-light-theme/components/Footer/Footer.jsx
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* Footer component. | ||
* @module components/theme/Footer/Footer | ||
*/ | ||
import { injectIntl } from 'react-intl'; | ||
import LocalFooter from '../../../../../components/Footer/Footer'; | ||
|
||
const Footer = () => { | ||
return <LocalFooter />; | ||
}; | ||
|
||
export default injectIntl(Footer); |
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
// it is injected | ||
@import 'root'; | ||
@import 'secretaria'; | ||
@import 'components/footer'; |
16 changes: 16 additions & 0 deletions
16
frontend/packages/volto-portal-governo/src/theme/components/_footer.scss
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#footer { | ||
.footer { | ||
.footer-wrapper { | ||
display: flex; | ||
justify-content: space-between; | ||
margin: 0 150px; | ||
gap: 25px; | ||
> div { | ||
min-width: 33%; | ||
} | ||
.footer-info { | ||
text-align: left; | ||
} | ||
} | ||
} | ||
} |