Skip to content

Commit

Permalink
Cards dynamic styles
Browse files Browse the repository at this point in the history
  • Loading branch information
rokoperki committed Jan 28, 2025
1 parent 41d1e56 commit c6ee2a7
Show file tree
Hide file tree
Showing 2 changed files with 188 additions and 119 deletions.
280 changes: 164 additions & 116 deletions apps/app/src/pages/FlyTalksListPage/FlyTalksListPage.module.scss
Original file line number Diff line number Diff line change
@@ -1,129 +1,177 @@
.page {
background-color: $primary-black;
background-color: $primary-black;
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
font-family: Inter;

header {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
font-family: Inter;

header {
width: 100%;

p{
color: $primary-white;
font-size: 24px;
font-weight: 500;
margin: 64px 0 24px 24px ;
}

p {
color: $primary-white;
font-size: 24px;
font-weight: 500;
margin: 64px 0 24px 24px;
}

main {
width: 100%;
height: 100%;
background-color: $primary-background;
border-radius: 12px 12px 0px 0px;
padding: 20px;
z-index: 1;

.listInfoText{
margin-top: 24px;
color: var(--Primary-Black, #171615);
font-family: Inter;
font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: 22px;
letter-spacing: -0.16px;
}
}

.groupsList{
margin-top: 24px;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 24px;
main {
width: 100%;
height: 100%;
background-color: $primary-background;
border-radius: 12px 12px 0px 0px;
padding: 20px;
z-index: 1;

.group{
width: 100%;
border-radius: 8px;

.groupHeader{
display: flex;
align-items: center;
justify-content: center;
gap: 5px;
margin-top: 24px;
padding: 10px;
border-radius: 8px 8px 0px 0px;
background: #EDDFCB;

div{
background-color: var(--Succes-Green, #5FB728);
width: 6px;
height: 6px;
border-radius: 100%;
}

p{
color: var(--Black-90, #2D2C2C);
font-feature-settings: 'ss12' on;
font-family: "PP Neue Machina";
font-size: 14px;
font-style: normal;
font-weight: 500;
line-height: 18px;
letter-spacing: -0.14px;
text-transform: uppercase;
}
}
.listInfoText {
margin-top: 24px;
color: var(--Primary-Black, #171615);
font-family: Inter;
font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: 22px;
letter-spacing: -0.16px;
}

.groupsList {
margin-top: 24px;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 24px;

.group {
width: 100%;
border-radius: 8px;

.groupHeader {
display: flex;
align-items: center;
justify-content: center;
gap: 5px;
margin-top: 24px;
padding: 10px;
border-radius: 8px 8px 0px 0px;
background: #eddfcb;

.starIcon{
display: none;
}

div {
background-color: var(--Succes-Green, #5fb728);
width: 6px;
height: 6px;
border-radius: 100%;
}

p {
color: var(--Black-90, #2d2c2c);
font-feature-settings: 'ss12' on;
font-family: 'PP Neue Machina';
font-size: 14px;
font-style: normal;
font-weight: 500;
line-height: 18px;
letter-spacing: -0.14px;
text-transform: uppercase;
}
}

.groupDuration {
text-align: center;
color: var(--Black-90, #2d2c2c);
font-family: 'PP Neue Montreal Mono';
font-size: 16px;
font-style: normal;
font-weight: 500;
line-height: 18px;
background: var(--Beige, #f5ede1);
padding: 12px;
}

.companiesList {
padding: 0 24px 24px;
background: var(--White, #f5f5f5);
border-radius: 0px 0px 8px 8px;

.groupDuration{
text-align: center;
color: var(--Black-90, #2D2C2C);
font-family: "PP Neue Montreal Mono";
font-size: 16px;
font-style: normal;
font-weight: 500;
line-height: 18px;
background: var(--Beige, #F5EDE1);
padding: 12px;
.company {
display: flex;
gap: 20px;
padding-top: 20px;
padding-bottom: 16px;
position: relative;
align-items: center;

p {
color: var(--Black-30, #b3b3b2);
font-family: 'PP Neue Montreal Mono';
font-size: 14px;
font-style: normal;
font-weight: 500;
line-height: 16px;
}

.companiesList{
padding: 0 24px 24px;
background: var(--White, #F5F5F5);
border-radius: 0px 0px 8px 8px;

.company{
display: flex;
gap: 20px;
padding-top: 20px;
padding-bottom: 16px;
position: relative;
align-items: center;

p{
color: var(--Black-30, #B3B3B2);
font-family: "PP Neue Montreal Mono";
font-size: 14px;
font-style: normal;
font-weight: 500;
line-height: 16px;
}

.divider {
position: absolute;
bottom: 0;
@include dottedBreak;
}
}

.applyButton{
margin-top: 32px;
width: 100%;
}
.divider {
position: absolute;
bottom: 0;
@include dottedBreak;
}
}

.applyButton {
margin-top: 32px;
width: 100%;
text-transform: uppercase;
}
}
}

.groupApplied {
.groupHeader {
background: var(--Primary-Muted-orange, #e0553f);

.starIcon{
display: block;
}

div {
width: 0;
}

p {
color: var(--White, #ffffff);
}
}

.applyButton {
background: #171615;
color: #ffffff;
}
}

.groupFull {
.groupHeader {
background: #171615;

div {
width: 0;
}

p {
color: var(--White, #ffffff);
}
}
.groupDuration {
background: var(--Black-5, #ebebeb);
}

.applyButton {
display: none;
}
}
}
}
}
27 changes: 24 additions & 3 deletions apps/app/src/pages/FlyTalksListPage/FlyTalksListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Tab from '../../components/Tab';
import TabGroup from '../../components/TabGroup';
import c from './FlyTalksListPage.module.scss';
import Button from '../../components/Button';
import star from '../../assets/icons/star.svg';

const FirstDayGroupsMock = [
{
Expand All @@ -19,6 +20,13 @@ const FirstDayGroupsMock = [
companies: ['venio', 'profico', 'travelSoft', 'hrCloud'],
hasUserApplied: false,
},
{
start: '11:30',
end: '12:30',
participantsNumber: 25,
companies: ['venio', 'profico', 'travelSoft', 'hrCloud'],
hasUserApplied: false,
},
];

const SecondDayGroupsMock = [
Expand Down Expand Up @@ -94,10 +102,23 @@ interface FlyTalksGroupProps {

const FlyTalksGroup: React.FC<FlyTalksGroupProps> = ({ key, group }) => {
return (
<div className={c.group} key={key}>
<div
className={
group.hasUserApplied
? `${c.group} ${c.groupApplied}`
: group.participantsNumber < 25
? c.group
: `${c.group} ${c.groupFull}`
}
key={key}>
<div className={c.groupHeader}>
<div></div>
<p>{group.participantsNumber}/25 PRIJAVLJENIH</p>
<img className={c.starIcon} src={star} alt='' />
<p>
{!group.hasUserApplied
? `${group.participantsNumber}/25 PRIJAVLJENIH`
: 'PRIJAVLJEN TERMIN'}
</p>
</div>
<p className={c.groupDuration}>
{group.start} - {group.end}
Expand All @@ -111,7 +132,7 @@ const FlyTalksGroup: React.FC<FlyTalksGroupProps> = ({ key, group }) => {
</div>
))}
<Button variant='orange' className={c.applyButton}>
Prijavi
{group.hasUserApplied ? 'Odjavi termin' : 'Prijavi'}
</Button>
</div>
</div>
Expand Down

0 comments on commit c6ee2a7

Please sign in to comment.