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
36349579
Commit
36349579
authored
3 years ago
by
lfr20
Browse files
Options
Downloads
Patches
Plain Diff
Improving the style of the page
parent
9160d122
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!69
Fixed upload page: recaptcha not implemented, lack of blocking (part one, two,...
,
!59
Fix production bugs luis
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Components/TabPanels/PublicUserPageTabs/TabInicio.js
+30
-51
30 additions, 51 deletions
src/Components/TabPanels/PublicUserPageTabs/TabInicio.js
with
30 additions
and
51 deletions
src/Components/TabPanels/PublicUserPageTabs/TabInicio.js
+
30
−
51
View file @
36349579
...
...
@@ -20,10 +20,8 @@ import React from 'react'
import
styled
from
'
styled-components
'
import
UserDescription
from
'
./UserDescription.js
'
import
NoContentImage
from
'
../../../img/img-16.png
'
import
Grid
from
'
@material-ui/core/Grid
'
;
import
LastLearnObjs
from
'
./LastLearnObj.js
'
import
LastCols
from
'
./LastCollections.js
'
import
{
ContainerStyled
}
from
'
../StyledComponents.js
'
import
Template
from
'
../PanelComponents/TemplateRecurso
'
import
PanelTemplateColecao
from
'
../PanelComponents/TemplateColecao.js
'
const
NoContentContainer
=
styled
.
div
`
height : 250px;
...
...
@@ -46,11 +44,11 @@ const NoContentContainer = styled.div`
}
`
/*Displays given image and text saying user hasn't posted anything yet*/
export
function
NoContent
(
props
)
{
export
function
NoContent
(
props
)
{
return
(
<
NoContentContainer
>
<
div
style
=
{{
paddingTop
:
"
1em
"
}}
>
<
img
alt
=
""
src
=
{
props
.
image
}
style
=
{{
width
:
"
130px
"
,
verticalAlign
:
"
middle
"
,
border
:
"
0
"
}}
/
>
<
div
style
=
{{
paddingTop
:
"
1em
"
}}
>
<
img
alt
=
""
src
=
{
props
.
image
}
style
=
{{
width
:
"
130px
"
,
verticalAlign
:
"
middle
"
,
border
:
"
0
"
}}
/
>
<
h3
>
{
props
.
text1
}
<
/h3
>
...
...
@@ -63,55 +61,36 @@ export function NoContent (props) {
)
}
export
default
function
TabInicio
(
props
)
{
export
default
function
TabInicio
({
id
,
user
,
learningObjs
,
collections
})
{
return
(
<
React
.
Fragment
>
{
/*display user description*/
}
{
props
.
user
.
description
&&
<
UserDescription
text
=
{
props
.
user
.
description
}
/
>
}
{
props
.
user
.
learning_objects_count
===
0
&&
props
.
user
.
collections_count
===
0
?
(
[
<
ContainerStyled
>
<
Grid
container
>
<
Grid
item
xs
=
{
12
}
>
<
NoContent
image
=
{
NoContentImage
}
text1
=
{
props
.
user
.
name
+
"
ainda não disponibilizou nenhum recurso ou coleção.
"
}
text2
=
{
"
Quando disponibilizar, eles aparecerão aqui.
"
}
/
>
<
/Grid
>
<
/Grid
>
<
/ContainerStyled
>
]
)
:
(
[
<
React
.
Fragment
>
<
ContainerStyled
style
=
{{
flexDirection
:
"
column
"
}}
>
<
LastLearnObjs
count
=
{
props
.
user
.
learning_objects_count
}
username
=
{
props
.
user
.
name
}
learningObjs
=
{
props
.
learningObjs
}
/
>
<
/ContainerStyled
>
<
ContainerStyled
style
=
{{
flexDirection
:
"
column
"
,
paddingTop
:
"
1em
"
}}
>
<
LastCols
count
=
{
props
.
user
.
collections_count
}
username
=
{
props
.
user
.
name
}
collections
=
{
props
.
collections
}
/
>
<
/ContainerStyled
>
<
/React.Fragment
>
]
)
user
.
description
&&
<
UserDescription
text
=
{
user
.
description
}
/
>
}
{
/*display last published learning objects and last alterations in user collections*/
}
<
Template
length
=
{
learningObjs
.
length
}
titleText
=
{
learningObjs
.
length
===
1
?
`Recurso de
${
user
.
name
}
`
:
`Recursos de
${
user
.
name
}
`
}
noContentText
=
{
`
${
user
.
name
}
não publicou nenhum recursos ainda`
}
slice
=
{
learningObjs
}
showMore
=
{()
=>
{
}}
// there is no function here, because we don't want to display more resources in this tab
loadingMore
=
{
false
}
end
=
{
learningObjs
.
length
}
error
=
{
false
}
/
>
<
PanelTemplateColecao
title
=
{
`Coleçoes de
${
user
.
name
}
`
}
length
=
{
collections
.
length
}
noContentText
=
{
`
${
user
.
name
}
não publicou nenhuma coleção ainda`
}
sliceArr
=
{
collections
}
showMore
=
{()
=>
{
}}
// there is no function here, because we don't want to display more collections in this tab
loadingMore
=
{
false
}
end
=
{
collections
.
length
}
followed
=
{
false
}
error
=
{
false
}
/
>
<
/React.Fragment
>
...
...
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