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
fd3cecf5
Commit
fd3cecf5
authored
5 years ago
by
smr17
Browse files
Options
Downloads
Patches
Plain Diff
requisições prontas, carrosel quebrado
parent
d031c544
No related branches found
No related tags found
1 merge request
!1
Develop
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Components/AreasSubPages.js
+26
-18
26 additions, 18 deletions
src/Components/AreasSubPages.js
src/Components/Card.js
+3
-5
3 additions, 5 deletions
src/Components/Card.js
with
29 additions
and
23 deletions
src/Components/AreasSubPages.js
+
26
−
18
View file @
fd3cecf5
...
@@ -31,19 +31,35 @@ const areaStyle={
...
@@ -31,19 +31,35 @@ const areaStyle={
minHeight
:
"
150px
"
minHeight
:
"
150px
"
}
}
class
SubPage
s
extends
Component
{
class
ReqCard
s
extends
Component
{
constructor
(
props
){
constructor
(
props
){
super
(
props
);
super
(
props
);
this
.
state
=
{
resources
:
[],
};
}
}
getCards
(){
componentWillMount
(){
axios
.
get
(
`
${
apiUrl
}
/learning_objects`
+
'
?limit=12&sort=["published_at", "desc"]
'
)
axios
.
get
(
`
${
apiUrl
}
/learning_objects`
+
'
?limit=12&sort=["published_at", "desc"]
'
)
.
then
(
function
(
response
){
.
then
(
res
=>
{
console
.
log
(
response
.
data
);
this
.
setState
({
resources
:
res
.
data
});
});
console
.
log
(
res
.
data
);
});
}
}
render
(){
return
(
<
Row
>
{
this
.
state
.
resources
.
map
(
card
=>
<
Col
md
=
{
3
}
sm
=
{
6
}
key
=
{
card
.
id
}
><
MediaCard
name
=
{
card
.
name
}
description
=
{
card
.
description
}
/></
Col
>
)}
<
/Row
>
)
}
}
class
SubPages
extends
Component
{
constructor
(
props
){
super
(
props
);
}
areaRender
(){
areaRender
(){
this
.
getCards
();
switch
(
this
.
props
.
banner
){
switch
(
this
.
props
.
banner
){
case
"
Recursos
"
:
case
"
Recursos
"
:
return
(
return
(
...
@@ -62,21 +78,14 @@ class SubPages extends Component{
...
@@ -62,21 +78,14 @@ class SubPages extends Component{
Recursos
mais
recentes
<
/p
>
Recursos
mais
recentes
<
/p
>
<
Hidden
sm
xs
>
<
Hidden
sm
xs
>
<
Carousel
showThumbs
=
{
false
}
autoPlay
infiniteLoop
=
{
true
}
showStatus
=
{
false
}
>
<
Carousel
showThumbs
=
{
false
}
autoPlay
infiniteLoop
=
{
true
}
showStatus
=
{
false
}
>
<
ReqCards
/>
<
/Carousel
>
<
/Carousel
>
<
/Hidden
>
<
/Hidden
>
<
Visible
sm
xs
>
<
Visible
sm
xs
>
<
Carousel
showThumbs
=
{
false
}
infiniteLoop
=
{
true
}
showStatus
=
{
false
}
>
<
Carousel
showThumbs
=
{
false
}
infiniteLoop
=
{
true
}
showStatus
=
{
false
}
>
<
Row
justify
=
"
around
"
style
=
{{
paddingBottom
:
"
50px
"
}}
>
<
Row
justify
=
"
around
"
style
=
{{
paddingBottom
:
"
50px
"
}}
>
{
rows
}
<
ReqCards
/>
{
rows
}
<
/Row
>
<
Row
justify
=
"
around
"
style
=
{{
paddingBottom
:
"
50px
"
}}
>
{
rows
}
{
rows
}
<
/Row
>
<
Row
justify
=
"
around
"
style
=
{{
paddingBottom
:
"
50px
"
}}
>
{
rows
}
{
rows
}
<
/Row
>
<
/Row
>
<
/Carousel
>
<
/Carousel
>
<
/Visible
>
<
/Visible
>
...
@@ -137,7 +146,6 @@ class SubPages extends Component{
...
@@ -137,7 +146,6 @@ class SubPages extends Component{
return
(
return
(
<
div
>
<
div
>
{
this
.
areaRender
()}
{
this
.
areaRender
()}
<
/div
>
<
/div
>
);
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/Components/Card.js
+
3
−
5
View file @
fd3cecf5
...
@@ -18,18 +18,16 @@ import thumbnail from "../img/girassol.jpg"
...
@@ -18,18 +18,16 @@ import thumbnail from "../img/girassol.jpg"
// },
// },
// };
// };
function
RecipeReviewCard
()
{
function
RecipeReviewCard
(
props
){
// const classes = useStyles;
return
(
return
(
<
Card
>
<
Card
>
<
img
src
=
{
thumbnail
}
alt
=
"
thumbnail do recurso
"
/>
<
img
src
=
{
thumbnail
}
alt
=
"
thumbnail do recurso
"
/>
<
CardContent
>
<
CardContent
>
<
Typography
variant
=
"
title
"
color
=
"
textSecondary
"
component
=
"
p
"
>
<
Typography
variant
=
"
title
"
color
=
"
textSecondary
"
component
=
"
p
"
>
Girassol
{
props
.
name
}
<
/Typography
>
<
/Typography
>
<
Typography
variant
=
"
caption
"
color
=
"
textSecondary
"
component
=
"
p
"
>
<
Typography
variant
=
"
caption
"
color
=
"
textSecondary
"
component
=
"
p
"
>
This
impressive
paella
is
a
perfect
party
dish
and
a
fun
meal
to
cook
together
with
your
{
props
.
description
}
guests
.
Add
1
cup
of
frozen
peas
along
with
the
mussels
,
if
you
like
.
<
/Typography
>
<
/Typography
>
<
/CardContent
>
<
/CardContent
>
<
CardActions
>
<
CardActions
>
...
...
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