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">
|
<p class="favorite-count">
|
||||||
{{i18n "badges.favorite_count" count=this.favoriteBadges.length max=siteSettings.max_favorite_badges}}
|
{{i18n "badges.favorite_count" count=this.favoriteBadges.length max=siteSettings.max_favorite_badges}}
|
||||||
</p>
|
</p>
|
||||||
{{#each sortedBadges as |ub|}}
|
|
||||||
{{badge-card
|
<div class="badge-group-list">
|
||||||
badge=ub.badge
|
{{#each sortedBadges as |ub|}}
|
||||||
count=ub.count
|
{{badge-card
|
||||||
canFavorite=ub.can_favorite
|
badge=ub.badge
|
||||||
isFavorite=ub.is_favorite
|
count=ub.count
|
||||||
username=username
|
canFavorite=ub.can_favorite
|
||||||
canFavoriteMoreBadges=canFavoriteMoreBadges
|
isFavorite=ub.is_favorite
|
||||||
onFavoriteClick=(action "favorite" ub)
|
username=username
|
||||||
filterUser="true"}}
|
canFavoriteMoreBadges=canFavoriteMoreBadges
|
||||||
{{/each}}
|
onFavoriteClick=(action "favorite" ub)
|
||||||
|
filterUser="true"
|
||||||
|
}}
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
{{/d-section}}
|
{{/d-section}}
|
||||||
|
|
|
@ -29,7 +29,7 @@ acceptance("User Anonymous", function () {
|
||||||
test("Badges", async function (assert) {
|
test("Badges", async function (assert) {
|
||||||
await visit("/u/eviltrout/badges");
|
await visit("/u/eviltrout/badges");
|
||||||
assert.ok($("body.user-badges-page").length, "has the body class");
|
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) {
|
test("Restricted Routes", async function (assert) {
|
||||||
|
|
|
@ -55,15 +55,6 @@
|
||||||
background-color: var(--secondary);
|
background-color: var(--secondary);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
&.user-badges-list {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.user-badges-list .favorite-count {
|
|
||||||
flex: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn.right {
|
.btn.right {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue