Skip to content

Commit a5949e6

Browse files
committed
refactor: fully revamp player header
1 parent b97e721 commit a5949e6

File tree

14 files changed

+666
-230
lines changed

14 files changed

+666
-230
lines changed

package-lock.json

Lines changed: 26 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
"react-dom": "^19.1.0"
2020
},
2121
"devDependencies": {
22-
"@types/react": "^19.1.2",
23-
"@types/react-dom": "^19.1.3",
22+
"@types/react": "^19",
23+
"@types/react-dom": "^19",
2424
"@wxt-dev/module-react": "^1.1.3",
2525
"typescript": "^5.8.3",
26-
"wxt": "^0.20.6"
26+
"wxt": "^0.20.7"
2727
}
2828
}

src/components/common.css

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@
6868
cursor: pointer;
6969
}
7070

71+
.relative {
72+
position: relative;
73+
}
74+
7175
.center-y {
7276
align-items: center;
7377
}
@@ -91,32 +95,39 @@
9195
.space-evenly {
9296
justify-content: space-evenly;
9397
}
94-
9598
.text {
9699
font-size: 14px;
97100
line-height: 14px;
98101
height: 14px;
99-
color: rgba(255,255,255,0.8);
102+
color: rgba(255,255,255);
100103
}
101104

102105
.text-small {
103106
font-size: 9px;
104107
line-height: 14px;
105108
height: 14px;
106109
text-align: right;
107-
color: rgba(255,255,255,0.8);
110+
color: rgba(255,255,255);
111+
}
112+
113+
.text-gray {
114+
color: rgb(170, 170, 170);
108115
}
109116

110117
.text-center {
111118
text-align: center;
112119
}
113120

121+
.text-right {
122+
text-align: right;
123+
}
124+
114125
.text-italic {
115126
font-style: italic;
116127
}
117128

118129
.cs2rating {
119-
transform: scale(1.25);
130+
transform: scale(1);
120131

121132
width: 70px;
122133
height: 24px;
@@ -130,7 +141,6 @@
130141
padding: .75rem .75rem .75rem 1.5rem;
131142
text-shadow: 0 1px 0 black;
132143
font-weight: bold;
133-
margin: auto;
134144
}
135145

136146
.cs2rating.ancient {

src/components/player/header.css

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616

1717
.header-competitive-ranks {
18-
max-width: calc(100% - (2 * 290px) - (2 * 10px));
18+
max-width: calc(100% - 330px - 63px - (2 * 20px));
1919
}
2020

2121
.player-avatar {
@@ -24,22 +24,22 @@
2424

2525
.premier-season-btn {
2626
position: absolute;
27-
top: 49px;
2827
height: 30px;
2928
width: 30px;
3029
border-width: initial;
3130
border-style: none;
3231
border-color: initial;
3332
border-image: initial;
34-
border-radius: 50%;
35-
background: url(data:image/gif;base64,R0lGODlhEwAMAIABAMXDwgAAACH5BAEAAAEALAAAAAATAAwAAAIUjI+py+0PEZh0wmpjjSfzD4aiUQAAOw==) center center no-repeat transparent;
36-
background-position: center center
33+
background-color: transparent;
3734
}
3835

39-
.premier-season-btn:hover {
40-
background: url(data:image/gif;base64,R0lGODlhEwAMAIABAMXDwgAAACH5BAEAAAEALAAAAAATAAwAAAIUjI+py+0PEZh0wmpjjSfzD4aiUQAAOw==) rgba(255, 255, 255, .1);
41-
background-position: center;
42-
background-repeat: no-repeat;
36+
.btn-on {
37+
color: white;
38+
}
39+
40+
.btn-off {
41+
color: gray;
42+
opacity: .3;
4343
}
4444

4545
.username {
@@ -52,11 +52,11 @@
5252
word-break: break-all;
5353
}
5454

55-
.hoverable {
55+
.rank-competitive-hoverable {
5656
position: relative;
5757
}
5858

59-
.hoverable:hover::before {
59+
.rank-competitive-hoverable:hover::before {
6060
content: '';
6161
position: absolute;
6262
z-index: -1;
@@ -65,4 +65,38 @@
6565
width: 60px;
6666
height: 172.38px;
6767
background: linear-gradient(0deg,rgba(255, 255, 255, .2) 0%, transparent 80%)
68+
}
69+
70+
.rank-tile-hoverable {
71+
position: relative;
72+
cursor: pointer;
73+
}
74+
75+
.rank-tile-hoverable:hover::before {
76+
content: '';
77+
position: absolute;
78+
z-index: -1;
79+
top: 0px;
80+
left: 0px;
81+
border-radius: 3px;
82+
width: 290px;
83+
height: 63px;
84+
background: linear-gradient(90deg,rgba(255, 255, 255, .2) 0%, transparent 80%)
85+
}
86+
87+
.rank-faceit-hoverable {
88+
position: relative;
89+
cursor: pointer;
90+
}
91+
92+
.rank-faceit-hoverable:hover::before {
93+
content: '';
94+
position: absolute;
95+
z-index: -1;
96+
top: 0px;
97+
left: 0px;
98+
border-radius: 3px;
99+
width: 63px;
100+
height: 63px;
101+
background: rgba(255, 255, 255, .1) 50%;
68102
}

0 commit comments

Comments
 (0)