mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 20:24:05 -06:00
FIX: user/badges
grid fix (#13729)
No more special CSS just for this path.
This commit is contained in:
parent
c750bfb4af
commit
f89b135a21
@ -1,16 +1,20 @@
|
||||
{{#d-section pageClass="user-badges" class="user-content user-badges-list"}}
|
||||
{{#d-section pageClass="user-badges" class="user-content"}}
|
||||
<p class="favorite-count">
|
||||
{{i18n "badges.favorite_count" count=this.favoriteBadges.length max=siteSettings.max_favorite_badges}}
|
||||
</p>
|
||||
{{#each sortedBadges as |ub|}}
|
||||
{{badge-card
|
||||
badge=ub.badge
|
||||
count=ub.count
|
||||
canFavorite=ub.can_favorite
|
||||
isFavorite=ub.is_favorite
|
||||
username=username
|
||||
canFavoriteMoreBadges=canFavoriteMoreBadges
|
||||
onFavoriteClick=(action "favorite" ub)
|
||||
filterUser="true"}}
|
||||
{{/each}}
|
||||
|
||||
<div class="badge-group-list">
|
||||
{{#each sortedBadges as |ub|}}
|
||||
{{badge-card
|
||||
badge=ub.badge
|
||||
count=ub.count
|
||||
canFavorite=ub.can_favorite
|
||||
isFavorite=ub.is_favorite
|
||||
username=username
|
||||
canFavoriteMoreBadges=canFavoriteMoreBadges
|
||||
onFavoriteClick=(action "favorite" ub)
|
||||
filterUser="true"
|
||||
}}
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/d-section}}
|
||||
|
@ -29,7 +29,7 @@ acceptance("User Anonymous", function () {
|
||||
test("Badges", async function (assert) {
|
||||
await visit("/u/eviltrout/badges");
|
||||
assert.ok($("body.user-badges-page").length, "has the body class");
|
||||
assert.ok(exists(".user-badges-list .badge-card"), "shows a badge");
|
||||
assert.ok(exists(".badge-group-list .badge-card"), "shows a badge");
|
||||
});
|
||||
|
||||
test("Restricted Routes", async function (assert) {
|
||||
|
@ -55,15 +55,6 @@
|
||||
background-color: var(--secondary);
|
||||
box-sizing: border-box;
|
||||
|
||||
&.user-badges-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
&.user-badges-list .favorite-count {
|
||||
flex: 100%;
|
||||
}
|
||||
|
||||
.btn.right {
|
||||
float: right;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user