Skip to content

Commit 537127a

Browse files
authored
Merge pull request #597 from Alt-Org/nikolas/enhancement/564-update-clan-page
Nikolas/enhancement/564 update clan page
2 parents ab1e5c0 + 98f96b5 commit 537127a

File tree

19 files changed

+720
-447
lines changed

19 files changed

+720
-447
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { ClanLabel } from '../enum/clanLabel.enum';
2+
import type { StaticImageData } from 'next/image';
3+
import iconSpammer from '@/shared/assets/images/clanLabels/ClanLabelSpammer.png';
4+
import iconHumorous from '@/shared/assets/images/clanLabels/ClanLabelHumorous.png';
5+
import iconAnimalLovers from '@/shared/assets/images/clanLabels/ClanLabelAnimalLovers.png';
6+
7+
const CLAN_LABEL_ICON_MAP: Partial<Record<ClanLabel, StaticImageData>> = {
8+
[ClanLabel.SPÄMMÄÄJÄT]: iconSpammer,
9+
[ClanLabel.HUUMORINTAJUISET]: iconHumorous,
10+
[ClanLabel.ELÄINRAKKAAT]: iconAnimalLovers,
11+
};
12+
13+
// Temporary fallback icon for labels without a specific icon
14+
const CLAN_LABEL_FALLBACK_ICON = iconSpammer;
15+
16+
export const getClanLabelIcon = (label: string) =>
17+
CLAN_LABEL_ICON_MAP[label as ClanLabel] ?? CLAN_LABEL_FALLBACK_ICON;

frontend-next-migration/src/preparedPages/ClanPages/ui/ClanAllSubPage/ClanAllSubPage.module.scss

Lines changed: 75 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,94 @@
1-
.ClanTable {
2-
overflow-y: auto;
3-
overflow-x: hidden;
4-
border-collapse: collapse;
5-
max-width: 100px;
6-
font: var(--font-dm-m);
7-
8-
th,
9-
td {
10-
padding: 0px 10px;
11-
border-bottom: 1px solid rgba(255, 0, 0, 0.11);
12-
white-space: nowrap;
13-
word-wrap: break-word;
14-
}
15-
16-
17-
th {
18-
background-color: rgb(100, 84, 66);
19-
text-align: left;
20-
}
21-
22-
tr:hover {
23-
cursor: pointer;
1+
.Container {
2+
max-width: var(--content-width);
3+
margin: 0 auto;
4+
}
245

25-
&:hover {
26-
//@include link-scale-effect;
27-
background-color: rgba(203, 15, 15, 0.47) !important;
28-
}
29-
}
6+
.TitleBar {
7+
display: flex;
8+
align-items: center;
9+
justify-content: space-between;
10+
gap: 1rem;
11+
margin-bottom: 1rem;
12+
}
3013

31-
tr {
32-
height: 40px;
33-
border-collapse: collapse;
34-
white-space: nowrap;
35-
word-wrap: break-word;
36-
}
14+
.SearchBar {
15+
display: flex;
16+
height: 20px;
17+
justify-content: left;
18+
color: var(--primary-color);
19+
border: 2px solid var(--black);
20+
box-shadow: var(--black) 4px 4px 0;
21+
border-radius: 1.5em;
22+
background: var(--base-card-background);
23+
align-items: center;
24+
padding: 1em;
25+
margin-top: 1em;
26+
margin-bottom: 1em;
27+
font: var(--font-dm-m);
28+
}
3729

30+
.Input {
31+
color: var(--primary-color);
32+
padding-left: 1em;
33+
border: none;
34+
background: transparent;
35+
outline: none;
36+
width: 100%;
37+
}
3838

39+
.SearchBarDesktop {
40+
width: 200px;
3941
}
4042

41-
.ClanCard {
42-
border: 1px solid #ddd;
43-
padding: 10px;
44-
margin-bottom: 10px;
45-
border-radius: var(--border-radius-custom);
46-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
43+
.SearchBarMobile {
44+
width: 280px;
45+
max-width: 90%;
46+
margin: 0.5rem auto 1rem;
47+
}
4748

48-
div {
49-
cursor: pointer;
50-
margin-bottom: 8px;
51-
}
49+
.SearchBarTablet {
50+
width: 280px;
51+
max-width: 90%;
52+
margin: 0.5rem auto 1rem;
5253
}
5354

55+
main :where(.SearchBarDesktop, .SearchBarMobile) {
56+
overflow: visible;
57+
}
5458

55-
.Loader {
56-
@include position-absolute-center;
59+
.DesktopCardContainer {
60+
display: flex;
61+
padding-top: 1em;
62+
justify-content: left;
63+
flex-wrap: wrap;
64+
gap: 1em;
5765
}
5866

59-
.Buttons {
67+
.MobileCardContainer {
68+
--gap: 0.45rem;
69+
--row-gap: 0.95rem;
6070
display: flex;
61-
flex-direction: row;
62-
justify-content: center;
63-
gap: 20px;
71+
flex-wrap: wrap;
72+
column-gap: var(--gap);
73+
row-gap: var(--row-gap);
74+
justify-content: flex-start;
75+
align-items: flex-start;
6476
width: 100%;
65-
margin-top: 5%;
77+
padding-inline: 0;
78+
margin-top: 0.25rem;
6679
}
6780

68-
.titleText {
69-
font: var(--font-dm-bold-xl);
70-
text-align: center;
71-
margin-bottom: 20px;
81+
.MobileCardItemWrap {
82+
box-sizing: border-box;
83+
flex: 0 0 calc((100% - 2 * var(--gap)) / 3);
84+
display: flex;
85+
justify-content: center;
86+
min-width: 0;
7287
}
7388

74-
.notFound {
75-
text-align: left;
89+
.MobileCardItem {
90+
width: 100% !important;
91+
height: auto !important;
92+
max-width: 100%;
93+
display: block;
7694
}
77-
78-
.BtnGame {
79-
background-color: var(--black) !important;
80-
81-
82-
//line height: ;
83-
font: var(--font-dm-m) !important;
84-
white-space: nowrap;
85-
min-width: fit-content;
86-
//border: solid 1px var(--primary-color);
87-
}

0 commit comments

Comments
 (0)