Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PortalMEC-React
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PortalMEC
PortalMEC-React
Commits
afe36563
Commit
afe36563
authored
4 years ago
by
lfr20
Browse files
Options
Downloads
Patches
Plain Diff
Add breadcrumbs
parent
58bd5e10
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!57
Merge of develop into master
,
!56
Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Pages/FormationMaterialPage.js
+42
-13
42 additions, 13 deletions
src/Pages/FormationMaterialPage.js
with
42 additions
and
13 deletions
src/Pages/FormationMaterialPage.js
+
42
−
13
View file @
afe36563
...
@@ -23,16 +23,18 @@ import FormationMaterialDescription from '../Components/FormationMaterialDescrip
...
@@ -23,16 +23,18 @@ import FormationMaterialDescription from '../Components/FormationMaterialDescrip
import
TopicList
from
'
../Components/TopicList.js
'
;
import
TopicList
from
'
../Components/TopicList.js
'
;
import
TopicFooter
from
'
../Components/TopicFooter.js
'
;
import
TopicFooter
from
'
../Components/TopicFooter.js
'
;
import
colecoes_obj
from
'
../Components/FormationMaterialsResources/formationMaterials.js
'
;
import
colecoes_obj
from
'
../Components/FormationMaterialsResources/formationMaterials.js
'
;
import
Breadcrumbs
from
"
@material-ui/core/Breadcrumbs
"
;
import
{
Link
}
from
"
react-router-dom
"
export
default
function
FormationMaterialPage
(
props
)
{
export
default
function
FormationMaterialPage
(
props
)
{
const
colecao
=
props
.
location
.
pathname
===
"
/colecao
"
;
const
colecao
=
props
.
location
.
pathname
===
"
/colecao
"
;
const
colecoes
=
colecoes_obj
();
const
colecoes
=
colecoes_obj
();
const
colecao_id
=
Number
(
const
colecao_id
=
Number
(
colecao
?
colecao
?
props
.
location
.
search
.
split
(
'
=
'
)[
1
]
props
.
location
.
search
.
split
(
'
=
'
)[
1
]
:
props
.
location
.
search
.
split
(
'
&
'
)[
0
].
split
(
'
=
'
)[
1
]
:
props
.
location
.
search
.
split
(
'
&
'
)[
0
].
split
(
'
=
'
)[
1
]
);
);
const
topico_id
=
Number
(
colecao
?
0
:
props
.
location
.
search
.
split
(
'
&
'
)[
1
].
split
(
'
=
'
)[
1
]);
const
topico_id
=
Number
(
colecao
?
0
:
props
.
location
.
search
.
split
(
'
&
'
)[
1
].
split
(
'
=
'
)[
1
]);
const
colecao_obj
=
((
id
)
=>
{
const
colecao_obj
=
((
id
)
=>
{
...
@@ -52,7 +54,7 @@ export default function FormationMaterialPage(props) {
...
@@ -52,7 +54,7 @@ export default function FormationMaterialPage(props) {
const
topic_list_ref
=
useRef
(
null
);
const
topic_list_ref
=
useRef
(
null
);
const
handleHeaderClick
=
()
=>
{
const
handleHeaderClick
=
()
=>
{
if
(
colecao
)
if
(
colecao
)
window
.
scrollTo
(
0
,
topic_list_ref
.
current
.
offsetTop
);
window
.
scrollTo
(
0
,
topic_list_ref
.
current
.
offsetTop
);
}
}
...
@@ -60,6 +62,16 @@ export default function FormationMaterialPage(props) {
...
@@ -60,6 +62,16 @@ export default function FormationMaterialPage(props) {
return
(
return
(
<
Background
>
<
Background
>
<
BreadCrumbsDiv
>
<
StyledBreadCrumbs
>
<
Link
to
=
"
/
"
>
Página
Inicial
<
/Link
>
<
span
>
{
colecao
?
"
Material de formação
"
:
"
Tópicos
"
}
<
/span
>
<
/StyledBreadCrumbs
>
<
/BreadCrumbsDiv
>
<
MainContainer
>
<
MainContainer
>
<
Grid
container
<
Grid
container
direction
=
"
row
"
direction
=
"
row
"
...
@@ -79,7 +91,7 @@ export default function FormationMaterialPage(props) {
...
@@ -79,7 +91,7 @@ export default function FormationMaterialPage(props) {
colecao
=
{
colecao
}
colecao
=
{
colecao
}
colecao_obj
=
{
colecao_obj
}
colecao_obj
=
{
colecao_obj
}
topico_obj
=
{
topico_obj
}
topico_obj
=
{
topico_obj
}
/
>
/
>
<
/Grid
>
<
/Grid
>
<
Grid
item
xs
=
{
12
}
ref
=
{
topic_list_ref
}
>
<
Grid
item
xs
=
{
12
}
ref
=
{
topic_list_ref
}
>
{
{
...
@@ -94,22 +106,22 @@ export default function FormationMaterialPage(props) {
...
@@ -94,22 +106,22 @@ export default function FormationMaterialPage(props) {
<
/Grid
>
<
/Grid
>
<
/Grid
>
<
/Grid
>
<
/MainContainer
>
<
/MainContainer
>
{
colecao
?
{
colecao
?
<
div
><
/div
>
<
div
><
/div
>
:
:
<
TopicFooter
<
TopicFooter
topic_name
=
{
colecao_obj
.
topic_name
}
topic_name
=
{
colecao_obj
.
topic_name
}
src
=
{
colecao_obj
.
img
}
src
=
{
colecao_obj
.
img
}
colecao_name
=
{
colecao_obj
.
name
}
/
>
colecao_name
=
{
colecao_obj
.
name
}
/
>
}
}
<
/Background
>
<
/Background
>
);
);
}
}
const
Background
=
styled
.
div
`
const
Background
=
styled
.
div
`
background-color: #f4f4f4;
background-color: #f4f4f4;
`
`
const
MainContainer
=
styled
.
div
`
const
MainContainer
=
styled
.
div
`
margin-left: auto;
margin-left: auto;
margin-right: auto;
margin-right: auto;
padding : 0;
padding : 0;
...
@@ -124,3 +136,20 @@ const MainContainer=styled.div`
...
@@ -124,3 +136,20 @@ const MainContainer=styled.div`
width : 1170px;
width : 1170px;
}
}
`
`
const
StyledBreadCrumbs
=
styled
(
Breadcrumbs
)
`
display: flex;
justify-content: flex-start;
max-width: 1170px;
span {
color: #a5a5a5;
}
a {
color: #00bcd4;
text-decoration: none;
}
`
const
BreadCrumbsDiv
=
styled
.
div
`
padding: 10px;
display: flex;
`
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment