Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PB138 - Film Database Group Project
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tomáš Havlíček
PB138 - Film Database Group Project
Commits
83e2d4cc
There was an error fetching the commit references. Please try again later.
Commit
83e2d4cc
authored
2 years ago
by
Tomáš Havlíček
Browse files
Options
Downloads
Patches
Plain Diff
feat:reworked card to render from array, preparation for backend integration
parent
870a529a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/src/components/Preview.tsx
+25
-74
25 additions, 74 deletions
frontend/src/components/Preview.tsx
with
25 additions
and
74 deletions
frontend/src/components/Preview.tsx
+
25
−
74
View file @
83e2d4cc
...
@@ -9,9 +9,27 @@ const contentStyle: React.CSSProperties = {
...
@@ -9,9 +9,27 @@ const contentStyle: React.CSSProperties = {
background
:
"
#364d79
"
,
background
:
"
#364d79
"
,
};
};
interface
DisplayCards
{
title
:
string
;
altitle
:
string
;
image
:
string
}
const
cardsData
:
DisplayCards
[]
=
[
{
title
:
"
Cars
"
,
altitle
:
"
Auta
"
,
image
:
"
https://upload.wikimedia.org/wikipedia/en/3/34/Cars_2006.jpg
"
},
{
title
:
"
Monster House
"
,
altitle
:
"
V tom domě straší
"
,
image
:
"
https://images-na.ssl-images-amazon.com/images/S/pv-target-images/9a996123e0b01f618ab2291b479f9d5034de354b2d1bb58979ddc6937588dfa8._RI_V_TTW_.jpg
"
},
{
title
:
"
Pokemon
"
,
altitle
:
"
Pokémon
"
,
image
:
"
https://www.obchod.crew.cz/im/coc/1280/0/content/629080/cover_image.1607432614.jpg
"
},
{
title
:
"
The Can
"
,
altitle
:
"
Gympl
"
,
image
:
"
https://img.csfd.cz/files/images/user/profile/162/847/162847510_91e839.jpg
"
},
{
title
:
"
Toy Story
"
,
altitle
:
"
Příběh hraček
"
,
image
:
"
https://m.media-amazon.com/images/M/MV5BMDU2ZWJlMjktMTRhMy00ZTA5LWEzNDgtYmNmZTEwZTViZWJkXkEyXkFqcGdeQXVyNDQ2OTk4MzI@._V1_.jpg
"
},
{
title
:
"
Smoke
"
,
altitle
:
"
Kouř
"
,
image
:
"
https://img.csfd.cz/files/images/user/profile/164/556/164556101_d8e43b.jpg
"
},
]
const
Preview
:
React
.
FC
=
()
=>
(
const
Preview
:
React
.
FC
=
()
=>
(
<
div
>
<
div
>
<
Space
>
<
Space
>
{
cardsData
.
map
((
movie
)
=>
{
return
(
<>
<
Card
<
Card
hoverable
hoverable
style
=
{
{
style
=
{
{
...
@@ -19,85 +37,18 @@ const Preview: React.FC = () => (
...
@@ -19,85 +37,18 @@ const Preview: React.FC = () => (
}
}
}
}
cover
=
{
cover
=
{
<
img
<
img
alt
=
"Cars"
alt
=
{
movie
.
title
}
src
=
"https://upload.wikimedia.org/wikipedia/en/3/34/Cars_2006.jpg"
src
=
{
movie
.
image
}
/>
}
>
<
Meta
title
=
"Cars"
description
=
"Auta"
/>
</
Card
>
<
Card
hoverable
style
=
{
{
width
:
240
,
}
}
cover
=
{
<
img
alt
=
"Monster House"
src
=
"https://images-na.ssl-images-amazon.com/images/S/pv-target-images/9a996123e0b01f618ab2291b479f9d5034de354b2d1bb58979ddc6937588dfa8._RI_V_TTW_.jpg"
/>
}
>
<
Meta
title
=
"Monster house"
description
=
"V tom domě straší"
/>
</
Card
>
<
Card
hoverable
style
=
{
{
width
:
240
,
}
}
cover
=
{
<
img
alt
=
"Pokemon"
src
=
"https://www.obchod.crew.cz/im/coc/1280/0/content/629080/cover_image.1607432614.jpg"
/>
/>
}
}
>
>
<
Meta
title
=
"Pokemon 3"
description
=
"Pokémon 3"
/>
<
Meta
title
=
{
movie
.
title
}
description
=
{
movie
.
altitle
}
/>
</
Card
>
</
Card
>
<
Card
</>)
hoverable
})
}
style
=
{
{
width
:
240
,
}
}
cover
=
{
<
img
alt
=
"Gympl"
src
=
"https://img.csfd.cz/files/images/user/profile/162/847/162847510_91e839.jpg"
/>
}
>
<
Meta
title
=
"The Can"
description
=
"Gympl"
/>
</
Card
>
<
Card
hoverable
style
=
{
{
width
:
240
,
}
}
cover
=
{
<
img
alt
=
"Toy Story"
src
=
"https://m.media-amazon.com/images/M/MV5BMDU2ZWJlMjktMTRhMy00ZTA5LWEzNDgtYmNmZTEwZTViZWJkXkEyXkFqcGdeQXVyNDQ2OTk4MzI@._V1_.jpg"
/>
}
>
<
Meta
title
=
"Toy Story"
description
=
"www.instagram.com"
/>
</
Card
>
<
Card
hoverable
style
=
{
{
width
:
240
,
}
}
cover
=
{
<
img
alt
=
"Kour"
src
=
"https://img.csfd.cz/files/images/user/profile/164/556/164556101_d8e43b.jpg"
/>
}
>
<
Meta
title
=
"Smoke"
description
=
"Kouř"
/>
</
Card
>
</
Space
>
</
Space
>
<
Carousel
autoplay
>
<
Carousel
autoplay
>
<
div
>
<
div
>
<
h3
style
=
{
contentStyle
}
>
Avengers: Infinity War
</
h3
>
<
h3
style
=
{
contentStyle
}
>
Avengers: Infinity War
</
h3
>
...
...
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