Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust flag size on leaderboard top card #11714

Merged
merged 4 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading