Skip to content

Commit

Permalink
Merge pull request #11714 from nanaya/leaderboard-card-alignment
Browse files Browse the repository at this point in the history
Adjust flag size on leaderboard top card
  • Loading branch information
notbakaneko authored Dec 9, 2024
2 parents 0f14bc3 + 1b18ee2 commit 0f23321
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 20 deletions.
11 changes: 9 additions & 2 deletions resources/css/bem/beatmap-score-top.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
flex-direction: column;

&__achieved {
margin: 2px 0;
margin-bottom: 2px; // more balanced margin
font-size: @font-size--small;
}

Expand All @@ -18,6 +18,12 @@
margin: 0px 10px;
}

&__flags {
display: flex;
gap: 5px;
font-size: @flag-size-medium; // icon size
}

&__link-container {
.full-size();
}
Expand Down Expand Up @@ -130,6 +136,8 @@

&__user-box {
flex: none;
display: grid;
gap: 4px;

@media @desktop {
margin-right: 10px;
Expand All @@ -139,7 +147,6 @@
&__username {
font-size: 18px;
font-weight: 700;
margin-bottom: 2px;
display: block;
.link-inverted();
}
Expand Down
2 changes: 1 addition & 1 deletion resources/css/bem/flag-country.less
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}

&--medium {
--height: 20px;
--height: @flag-size-medium;
}

&--small {
Expand Down
1 change: 1 addition & 0 deletions resources/css/bem/forum-post-info.less
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
width: 100%;
display: flex;
justify-content: center;
font-size: @flag-size-medium;
}

&--group-badge {
Expand Down
2 changes: 2 additions & 0 deletions resources/css/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -324,3 +324,5 @@
@user-card-height: 120px;

@user-list-icon-size: 20px;

@flag-size-medium: 20px;
28 changes: 15 additions & 13 deletions resources/js/beatmapsets-show/scoreboard/top-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,21 @@ export default class TopCard extends React.PureComponent<Props> {
/>
</div>

<a
className='u-hover'
href={route('rankings', {
country: this.props.score.user.country_code,
mode: ruleset,
type: 'performance',
})}
>
<FlagCountry
country={this.props.score.user.country}
modifiers='flat'
/>
</a>
<div className='beatmap-score-top__flags'>
<a
className='u-hover'
href={route('rankings', {
country: this.props.score.user.country_code,
mode: ruleset,
type: 'performance',
})}
>
<FlagCountry
country={this.props.score.user.country}
modifiers='flat'
/>
</a>
</div>
</div>
</div>

Expand Down
5 changes: 1 addition & 4 deletions resources/views/forum/topics/_post_info.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ class="forum-post-info__row forum-post-info__row--title"
'type' => 'performance',
'country' => $user->country->getKey(),
])}}">
@include('objects._flag_country', [
'country' => $user->country,
'modifiers' => 'medium',
])
@include('objects._flag_country', ['country' => $user->country])
</a>
</div>
@endif
Expand Down

0 comments on commit 0f23321

Please sign in to comment.