Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
API Toucan
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
Container registry
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
Damien Armillon
API Toucan
Commits
6c4b82d4
Commit
6c4b82d4
authored
6 years ago
by
Damien
Browse files
Options
Downloads
Patches
Plain Diff
Add cards for the Toucan
parent
a42abc45
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
front/src/view/AllToucanPage/AllToucanPage.js
+4
-1
4 additions, 1 deletion
front/src/view/AllToucanPage/AllToucanPage.js
front/src/view/AllToucanPage/ToucanCard.js
+12
-8
12 additions, 8 deletions
front/src/view/AllToucanPage/ToucanCard.js
with
16 additions
and
9 deletions
front/src/view/AllToucanPage/AllToucanPage.js
+
4
−
1
View file @
6c4b82d4
import
React
,
{
Component
}
from
'
react
'
import
React
,
{
Component
}
from
'
react
'
import
{
Card
}
from
'
semantic-ui-react
'
import
{
Card
,
Segment
}
from
'
semantic-ui-react
'
import
ToucanCard
from
'
./ToucanCard
'
import
ToucanCard
from
'
./ToucanCard
'
import
env
from
'
../../.env
'
import
env
from
'
../../.env
'
...
@@ -26,15 +26,18 @@ class AllToucan extends Component {
...
@@ -26,15 +26,18 @@ class AllToucan extends Component {
}
}
render
(){
render
(){
return
(
return
(
<
Segment
style
=
{{
margin
:
"
3em
"
,
padding
:
"
2em
"
}}
>
<
Card
.
Group
>
<
Card
.
Group
>
{
this
.
state
.
toucans
.
map
(
toucan
=>
{
{
this
.
state
.
toucans
.
map
(
toucan
=>
{
return
<
ToucanCard
return
<
ToucanCard
image
=
{
`
${
env
.
backURL
}
/toucan/img/
${
toucan
[
"
_id
"
]}
`
}
image
=
{
`
${
env
.
backURL
}
/toucan/img/
${
toucan
[
"
_id
"
]}
`
}
link
=
{
`
${
env
.
backURL
}
/toucan/pdf/
${
toucan
[
"
_id
"
]}
`
}
link
=
{
`
${
env
.
backURL
}
/toucan/pdf/
${
toucan
[
"
_id
"
]}
`
}
header
=
{
toucan
.
title
}
header
=
{
toucan
.
title
}
date
=
{(
new
Date
(
toucan
.
date
).
toLocaleDateString
())}
/
>
/
>
})}
})}
<
/Card.Group
>
<
/Card.Group
>
<
/Segment
>
)}
)}
}
}
...
...
This diff is collapsed.
Click to expand it.
front/src/view/AllToucanPage/ToucanCard.js
+
12
−
8
View file @
6c4b82d4
...
@@ -5,11 +5,15 @@ const ToucanCard = ({...props}) => {
...
@@ -5,11 +5,15 @@ const ToucanCard = ({...props}) => {
return
(
return
(
<
Card
<
Card
href
=
{
props
.
link
}
href
=
{
props
.
link
}
link
style
=
{{
margin
:
"
1em
"
}}
description
=
"
On test
"
>
>
<
Image
src
=
{
props
.
image
}
size
=
"
small
"
/>
<
Card
.
Content
>
<
Card
.
Content
>
<
Card
.
Header
content
=
"
HDNZIDJZEP
"
/>
<
Card
.
Header
content
=
{
props
.
header
}
/
>
<
Card
.
Meta
content
=
{
props
.
date
}
textAlign
=
"
right
"
/>
<
/Card.Content
>
<
/Card.Content
>
<
Image
src
=
{
props
.
image
}
/
>
<
/Card
>
<
/Card
>
)
)
}
}
...
...
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