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
d335cfd8
Commit
d335cfd8
authored
5 years ago
by
sayuri
Browse files
Options
Downloads
Patches
Plain Diff
Thumbnail mosaico em cards coleção
parent
4e8692bf
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Components/AreasSubPages.js
+3
-3
3 additions, 3 deletions
src/Components/AreasSubPages.js
src/Components/CollectionCard.js
+21
-5
21 additions, 5 deletions
src/Components/CollectionCard.js
with
24 additions
and
8 deletions
src/Components/AreasSubPages.js
+
3
−
3
View file @
d335cfd8
...
@@ -74,13 +74,13 @@ class ReqCollections extends Component{
...
@@ -74,13 +74,13 @@ class ReqCollections extends Component{
return
(
return
(
<
Carousel
showThumbs
=
{
false
}
infiniteLoop
=
{
true
}
showStatus
=
{
false
}
>
<
Carousel
showThumbs
=
{
false
}
infiniteLoop
=
{
true
}
showStatus
=
{
false
}
>
<
Row
style
=
{{
paddingBottom
:
"
5px
"
}}
>
<
Row
style
=
{{
paddingBottom
:
"
5px
"
}}
>
{
row1
.
map
(
card
=>
<
Col
md
=
{
3
}
sm
=
{
6
}
key
=
{
card
.
id
}
><
CollectionCard
name
=
{
card
.
name
}
rating
=
{
card
.
score
}
author
=
{
card
.
owner
.
name
}
description
=
{
card
.
description
}
thumbnail
=
{
card
.
ite
n
s_thumbnail
}
/></
Col
>
)}
{
row1
.
map
(
card
=>
<
Col
md
=
{
3
}
sm
=
{
6
}
key
=
{
card
.
id
}
><
CollectionCard
name
=
{
card
.
name
}
rating
=
{
card
.
score
}
author
=
{
card
.
owner
.
name
}
description
=
{
card
.
description
}
thumbnail
=
{
card
.
ite
m
s_thumbnail
s
}
/></
Col
>
)}
<
/Row
>
<
/Row
>
<
Row
>
<
Row
>
{
row2
.
map
(
card
=>
<
Col
md
=
{
3
}
sm
=
{
6
}
key
=
{
card
.
id
}
><
CollectionCard
name
=
{
card
.
name
}
rating
=
{
card
.
score
}
author
=
{
card
.
owner
.
name
}
description
=
{
card
.
description
}
thumbnail
=
{
card
.
ite
n
s_thumbnail
}
/></
Col
>
)}
{
row2
.
map
(
card
=>
<
Col
md
=
{
3
}
sm
=
{
6
}
key
=
{
card
.
id
}
><
CollectionCard
name
=
{
card
.
name
}
rating
=
{
card
.
score
}
author
=
{
card
.
owner
.
name
}
description
=
{
card
.
description
}
thumbnail
=
{
card
.
ite
m
s_thumbnail
s
}
/></
Col
>
)}
<
/Row
>
<
/Row
>
<
Row
>
<
Row
>
{
row3
.
map
(
card
=>
<
Col
md
=
{
3
}
sm
=
{
6
}
key
=
{
card
.
id
}
><
CollectionCard
name
=
{
card
.
name
}
rating
=
{
card
.
score
}
author
=
{
card
.
owner
.
name
}
description
=
{
card
.
description
}
thumbnail
=
{
card
.
ite
n
s_thumbnail
}
/></
Col
>
)}
{
row3
.
map
(
card
=>
<
Col
md
=
{
3
}
sm
=
{
6
}
key
=
{
card
.
id
}
><
CollectionCard
name
=
{
card
.
name
}
rating
=
{
card
.
score
}
author
=
{
card
.
owner
.
name
}
description
=
{
card
.
description
}
thumbnail
=
{
card
.
ite
m
s_thumbnail
s
}
/></
Col
>
)}
<
/Row
>
<
/Row
>
<
/Carousel
>
<
/Carousel
>
)
)
...
...
This diff is collapsed.
Click to expand it.
src/Components/CollectionCard.js
+
21
−
5
View file @
d335cfd8
import
React
,
{
Component
}
from
'
react
'
;
import
React
,
{
Component
}
from
'
react
'
;
import
'
./CardsAnimation.css
'
;
import
'
./CardsAnimation.css
'
;
import
{
Container
}
from
'
react-grid-system
'
;
import
{
apiDomain
}
from
'
../env
'
;
import
{
Col
,
Row
,
Container
,
Hidden
,
Visible
}
from
'
react-grid-system
'
;
import
Card
from
'
@material-ui/core/Card
'
;
import
Card
from
'
@material-ui/core/Card
'
;
import
CardContent
from
'
@material-ui/core/CardContent
'
;
import
CardContent
from
'
@material-ui/core/CardContent
'
;
import
CardActions
from
'
@material-ui/core/CardActions
'
;
import
CardActions
from
'
@material-ui/core/CardActions
'
;
...
@@ -10,6 +11,7 @@ import FolderIcon from '@material-ui/icons/Folder';
...
@@ -10,6 +11,7 @@ import FolderIcon from '@material-ui/icons/Folder';
import
FavoriteIcon
from
'
@material-ui/icons/Favorite
'
;
import
FavoriteIcon
from
'
@material-ui/icons/Favorite
'
;
import
StarRatings
from
'
react-star-ratings
'
;
import
StarRatings
from
'
react-star-ratings
'
;
import
algumaCoisa
from
"
../img/laranja/LIVRO_DIGITAL.jpg
"
;
import
algumaCoisa
from
"
../img/laranja/LIVRO_DIGITAL.jpg
"
;
var
authorStyle
=
{
var
authorStyle
=
{
position
:
"
absolute
"
,
position
:
"
absolute
"
,
display
:
"
flex
"
,
display
:
"
flex
"
,
...
@@ -29,12 +31,26 @@ var pictureStyle={
...
@@ -29,12 +31,26 @@ var pictureStyle={
height
:
"
50px
"
,
height
:
"
50px
"
,
};
};
class
RenderThumbs
extends
Component
{
render
(){
if
(
this
.
props
.
thumbs
)
{
var
array
=
this
.
props
.
thumbs
.
slice
(
0
,
4
);
return
(
<
div
>
<
Row
>
{
array
.
map
(
thumb
=>
<
Col
style
=
{{
padding
:
"
0px
"
}}
md
=
{
6
}
><
img
key
=
{
thumb
.
id
}
height
=
"
80
"
src
=
{
apiDomain
+
thumb
}
/> </
Col
>
)}
<
/Row
>
<
/div
>
);
}
return
(
null
);
}
}
class
CollectionCard
extends
Component
{
class
CollectionCard
extends
Component
{
constructor
(
props
)
{
constructor
(
props
){
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
thumbnail
:
algumaCoisa
,
userStyle
:
"
animation
"
userStyle
:
"
animation
"
,
};
};
}
}
onHover
(){
onHover
(){
...
@@ -47,13 +63,13 @@ class CollectionCard extends Component {
...
@@ -47,13 +63,13 @@ class CollectionCard extends Component {
return
(
return
(
<
Card
onMouseOver
=
{
this
.
onHover
.
bind
(
this
)}
onMouseOut
=
{
this
.
onIddle
.
bind
(
this
)}
>
<
Card
onMouseOver
=
{
this
.
onHover
.
bind
(
this
)}
onMouseOut
=
{
this
.
onIddle
.
bind
(
this
)}
>
<
Container
style
=
{{
padding
:
"
0px
"
,
backgroundColor
:
"
#673ab7
"
}}
>
<
Container
style
=
{{
padding
:
"
0px
"
,
backgroundColor
:
"
#673ab7
"
}}
>
<
RenderThumbs
thumbs
=
{
this
.
props
.
thumbnail
}
/
>
<
div
style
=
{
authorStyle
}
>
<
div
style
=
{
authorStyle
}
>
<
Typography
variant
=
"
body2
"
color
=
"
textSecondary
"
component
=
"
p
"
>
{
this
.
props
.
author
}
<
/Typography
>
<
Typography
variant
=
"
body2
"
color
=
"
textSecondary
"
component
=
"
p
"
>
{
this
.
props
.
author
}
<
/Typography
>
<
Typography
variant
=
"
title
"
color
=
"
textSecondary
"
component
=
"
p
"
>
{
this
.
props
.
name
}
<
/Typography
>
<
Typography
variant
=
"
title
"
color
=
"
textSecondary
"
component
=
"
p
"
>
{
this
.
props
.
name
}
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{
pictureStyle
}
>
fotinha
<
/div
>
<
div
style
=
{
pictureStyle
}
>
fotinha
<
/div
>
<
div
className
=
{
this
.
state
.
userStyle
}
>
{
this
.
props
.
author
}
<
/div
>
<
div
className
=
{
this
.
state
.
userStyle
}
>
{
this
.
props
.
author
}
<
/div
>
<
img
src
=
{
this
.
state
.
thumbnail
}
alt
=
"
thumbnail do recurso
"
/>
<
/Container
>
<
/Container
>
<
CardContent
style
=
{{
height
:
"
60%
"
,
textAlign
:
"
left
"
,
paddingBottom
:
"
0px
"
}}
>
<
CardContent
style
=
{{
height
:
"
60%
"
,
textAlign
:
"
left
"
,
paddingBottom
:
"
0px
"
}}
>
...
...
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