Skip to content

Commit

Permalink
Merge pull request #184 from Andres2D/field-responsive
Browse files Browse the repository at this point in the history
Field responsive
  • Loading branch information
Andres2D authored Jan 21, 2023
2 parents 1dc5262 + 99d9e79 commit 41f631b
Show file tree
Hide file tree
Showing 12 changed files with 104 additions and 114 deletions.
2 changes: 1 addition & 1 deletion components/layout/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const Navbar: NextPage = () => {
>
Log out
</Button>
<p>Version 2.2.2</p>
<p>Version 2.3.0</p>
</DrawerFooter>
</DrawerContent>
</Drawer>
Expand Down
117 changes: 97 additions & 20 deletions components/matches/detail/field/field.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,64 @@
align-items: center;

.field {
width: 100%;
border-radius: 20px;
border: 3px solid ghostwhite;
height: 400px;
background-image: url('/images/field.svg');
background-repeat: no-repeat;
background-size: 100% 100%;
margin-top: 20px;
background-color: #6abd67;
display: grid;
margin-top: 20px;
position: relative;
width: 90%;

.smallArea {
border: 4px solid ghostwhite;
border-bottom: 0;
bottom: -43px;
left: 50%;
transform: translate(-50%, -50%);
position: absolute;
height: 80px;
width: 30%;
}

.bigArea {
border: 4px solid ghostwhite;
border-bottom: 0;
bottom: -64px;
left: 50%;
transform: translate(-50%, -50%);
position: absolute;
height: 128px;
width: 60%;
}

.outArea {
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
height: 71px;
bottom: 89px;
border-radius: 150px 150px 0 0;
border: 4px solid ghostwhite;
width: 25%;
}

.middle {
position: absolute;
left: 50%;
top: 32px;
transform: translate(-50%, -50%);
height: 70px;
bottom: 89px;
width: 25%;
border-radius: 0 0 150px 150px;
border: 4px solid ghostwhite;
}


.player {
margin: auto auto;
z-index: 1;
}

.player1 {
Expand Down Expand Up @@ -392,30 +440,59 @@
@media (max-width: $medium-device) {
.fieldGroup {
width: 90%;
}
}

@media (max-width: $medium-small-device) {
.fieldGroup {
.field {
height: 315px;
.smallArea {
bottom: -32px;
height: 60px;
}

.bigArea {
bottom: -46px;
height: 92px;
width: 55%;
}

.outArea {
bottom: 65px;
height: 48px;
width: 82px;
}

.middle {
top: 22px;
height: 48px;
width: 82px;
}
}
}
}

@media (max-width: $small-device) {
.fieldGroup {
.field {
background-image: url('/images/field-mobile-md.svg');
.smallArea {
bottom: -26px;
height: 45px;
}

.bigArea {
bottom: -38px;
height: 75px;
width: 55%;
}

.outArea {
bottom: 51px;
height: 40px;
width: 64px;
}

.middle {
top: 17px;
height: 40px;
width: 64px;
}
}
}
}

@media (max-width: $extra-small-device) {
.fieldGroup {
.field {
background-image: url('/images/field-mobile-sm.svg');
}
}
}

4 changes: 4 additions & 0 deletions components/matches/detail/field/field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ const FieldLayout: NextPage<Props> = ({team, isAway}) => {
<section className={`${styles.field}
${styles[`${formationTypeMap[matchDetails.match[teamKey].formation]}${formationKeyMap[team.length]}`]}`}>
{playersMap}
<div className={styles.smallArea} />
<div className={styles.bigArea} />
<div className={styles.outArea} />
<div className={styles.middle} />
</section>
<Stack className={styles.check} spacing={5} direction='row'>
<Checkbox
Expand Down
2 changes: 2 additions & 0 deletions components/matches/detail/match-detail.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
.fields {
display: flex;
justify-content: space-evenly;
flex-wrap: wrap;
width: 100%;
}

.leaveButton {
Expand Down
Binary file modified public/favicon.ico
Binary file not shown.
Binary file removed public/images/chelsea-fc-logo.png
Binary file not shown.
Binary file removed public/images/colombia-flag.png
Binary file not shown.
32 changes: 0 additions & 32 deletions public/images/field-mobile-md.svg

This file was deleted.

32 changes: 0 additions & 32 deletions public/images/field-mobile-sm.svg

This file was deleted.

29 changes: 0 additions & 29 deletions public/images/field.svg

This file was deleted.

Binary file removed public/images/liverpool-fc-logo.png
Binary file not shown.
Binary file removed public/images/user-image-fallback.png
Binary file not shown.

1 comment on commit 41f631b

@vercel
Copy link

@vercel vercel bot commented on 41f631b Jan 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

cotejoapp – ./

cotejoapp.vercel.app
cotejoapp-git-main-andres2d.vercel.app
cotejoapp-andres2d.vercel.app

Please sign in to comment.