Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TDDD27_2024
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marc Taylor
TDDD27_2024
Commits
6f66244f
Commit
6f66244f
authored
11 months ago
by
Maximilian Sjöström
Browse files
Options
Downloads
Patches
Plain Diff
added beginning of categories page
parent
c50e39c4
No related branches found
No related tags found
1 merge request
!4
Categories
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theme-costume-app/src/CategoriesPage.css
+32
-15
32 additions, 15 deletions
theme-costume-app/src/CategoriesPage.css
theme-costume-app/src/CategoriesPage.js
+7
-11
7 additions, 11 deletions
theme-costume-app/src/CategoriesPage.js
with
39 additions
and
26 deletions
theme-costume-app/src/CategoriesPage.css
+
32
−
15
View file @
6f66244f
/* CategoriesPage.css */
.categories-container
{
padding
:
20px
;
padding
:
20px
;
}
.categories-title
{
font-size
:
24px
;
margin-bottom
:
20px
;
}
.category-item
{
font-size
:
18px
;
padding
:
10px
;
margin-bottom
:
10px
;
border
:
1px
solid
#ccc
;
border-radius
:
4px
;
cursor
:
pointer
;
/* Add cursor pointer for better UX */
transition
:
transform
0.4s
,
box-shadow
0.4s
;
/* Add transition for smoothness */
}
/* Add the hover effect */
.category-item
:hover
{
animation
:
shadow-drop-2-center
0.4s
cubic-bezier
(
0.250
,
0.460
,
0.450
,
0.940
)
both
;
}
/* Define the shadow-drop-2-center animation */
@keyframes
shadow-drop-2-center
{
0
%
{
transform
:
translateZ
(
0
);
box-shadow
:
0
0
0
0
rgba
(
0
,
0
,
0
,
0
);
}
.categories-title
{
font-size
:
24px
;
margin-bottom
:
20px
;
100
%
{
transform
:
translateZ
(
50px
);
box-shadow
:
0
0
20px
0px
rgba
(
0
,
0
,
0
,
0.35
);
}
.category-item
{
font-size
:
18px
;
padding
:
10px
;
margin-bottom
:
10px
;
border
:
1px
solid
#ccc
;
border-radius
:
4px
;
}
\ No newline at end of file
}
This diff is collapsed.
Click to expand it.
theme-costume-app/src/CategoriesPage.js
+
7
−
11
View file @
6f66244f
import
React
from
'
react
'
;
import
'
./CategoriesPage.css
'
;
// Import the CSS file
const
categories
=
[
{
name
:
'
Men
'
,
link
:
'
/category/men
'
},
{
name
:
'
Women
'
,
link
:
'
/category/women
'
},
{
name
:
'
Kids
'
,
link
:
'
/category/kids
'
},
{
name
:
'
Accessories
'
,
link
:
'
/category/accessories
'
},
{
name
:
'
Sale
'
,
link
:
'
/category/sale
'
},
];
const
CategoriesPage
=
()
=>
{
return
(
<
div
style
=
{{
padding
:
'
20px
'
}}
>
<
h1
style
=
{{
fontSize
:
'
24px
'
,
marginBottom
:
'
20px
'
}}
>
Categories
<
/h1
>
<
div
className
=
"
categories-container
"
>
<
h1
className
=
"
categories-title
"
>
Categories
<
/h1
>
<
div
>
{
categories
.
map
((
category
,
index
)
=>
(
<
div
key
=
{
index
}
style
=
{{
fontSize
:
'
18px
'
,
padding
:
'
10px
'
,
marginBottom
:
'
10px
'
,
border
:
'
1px solid #ccc
'
,
borderRadius
:
'
4px
'
,
cursor
:
'
pointer
'
// Add cursor pointer for better UX
}}
onClick
=
{()
=>
{
// Navigate to the category link on click
className
=
"
category-item
"
onClick
=
{()
=>
{
window
.
location
.
href
=
category
.
link
;
}}
>
...
...
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