mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Guild category tags and challenge category tags have now the same styling.
This commit is contained in:
@@ -23,6 +23,16 @@
|
|||||||
color: $gray-300;
|
color: $gray-300;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.category-label-purple {
|
||||||
|
color: white;
|
||||||
|
background: $purple-300;
|
||||||
|
}
|
||||||
|
|
||||||
|
.category-label-blue {
|
||||||
|
color: white;
|
||||||
|
background: $blue-50;
|
||||||
|
}
|
||||||
|
|
||||||
.category-select {
|
.category-select {
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
background-color: $white;
|
background-color: $white;
|
||||||
|
|||||||
@@ -26,9 +26,9 @@
|
|||||||
.svg-icon(v-html="icons.calendarIcon")
|
.svg-icon(v-html="icons.calendarIcon")
|
||||||
strong.mx-1 {{ $t('endDate')}}:
|
strong.mx-1 {{ $t('endDate')}}:
|
||||||
span {{challenge.endDate}}
|
span {{challenge.endDate}}
|
||||||
.tags
|
.categories
|
||||||
span.tag.tag-blue(v-if='isLeader(challenge)') {{ $t('owned') }}
|
span.category-label.category-label-blue(v-if='isLeader(challenge)') {{ $t('owned') }}
|
||||||
span.tag(v-for='category in challenge.categories', :class="{'tag-purple':isOfficial(category)}") {{ $t(category.name) }}
|
span.category-label(v-for='category in challenge.categories', :class="{'category-label-purple':isOfficial(category)}") {{ $t(category.name) }}
|
||||||
.challenge-description {{challenge.summary}}
|
.challenge-description {{challenge.summary}}
|
||||||
.well-wrapper(v-if="fullLayout")
|
.well-wrapper(v-if="fullLayout")
|
||||||
.well
|
.well
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
float: right;
|
float: right;
|
||||||
padding: 1em 1.5em;
|
padding: 1em 1.5em;
|
||||||
margin-left: 1.5em;
|
margin-left: 1em;
|
||||||
background: #eefaf6;
|
background: #eefaf6;
|
||||||
border-bottom-left-radius: .3em;
|
border-bottom-left-radius: .3em;
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
.meta, .owner {
|
.meta, .owner {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
overflow: visible;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.meta-item, .owner-item {
|
.meta-item, .owner-item {
|
||||||
@@ -165,33 +165,15 @@
|
|||||||
width: 26px;
|
width: 26px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tags {
|
.categories {
|
||||||
|
clear: right;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 0 1em 1em;
|
padding: 0 1.5em 1em;
|
||||||
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag {
|
.category-label {
|
||||||
box-shadow: none !important;
|
margin-top: .5em;
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
border-radius: 1em;
|
|
||||||
color: $gray-200;
|
|
||||||
background: $gray-500;
|
|
||||||
padding: .2em .8em;
|
|
||||||
margin-left: .3em;
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: .9em
|
|
||||||
}
|
|
||||||
|
|
||||||
.tag-purple {
|
|
||||||
color: white;
|
|
||||||
background: $purple-300;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tag-blue {
|
|
||||||
color: white;
|
|
||||||
background: $blue-50;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.challenge-description {
|
.challenge-description {
|
||||||
|
|||||||
@@ -25,7 +25,11 @@ router-link.card-link(:to="{ name: 'guild', params: { groupId: guild._id } }")
|
|||||||
div.guild-bank(v-if='displayGemBank', v-once) {{$t('guildBank')}}
|
div.guild-bank(v-if='displayGemBank', v-once) {{$t('guildBank')}}
|
||||||
.row
|
.row
|
||||||
.col-md-12
|
.col-md-12
|
||||||
.category-label(v-for="category in guild.categorySlugs")
|
.category-label.category-label-blue(v-if='isLeader(guild)') {{ $t('owned') }}
|
||||||
|
.category-label(
|
||||||
|
v-for="category in guild.categorySlugs"
|
||||||
|
:class="{'category-label-purple': isOfficial(category)}"
|
||||||
|
)
|
||||||
| {{$t(category)}}
|
| {{$t(category)}}
|
||||||
span.recommend-text(v-if='showSuggested(guild._id)') Suggested because you’re new to Habitica.
|
span.recommend-text(v-if='showSuggested(guild._id)') Suggested because you’re new to Habitica.
|
||||||
</template>
|
</template>
|
||||||
@@ -176,6 +180,13 @@ export default {
|
|||||||
// @TODO: ask about challenges when we add challenges
|
// @TODO: ask about challenges when we add challenges
|
||||||
await this.$store.dispatch('guilds:leave', {groupId: this.guild._id, type: 'myGuilds'});
|
await this.$store.dispatch('guilds:leave', {groupId: this.guild._id, type: 'myGuilds'});
|
||||||
},
|
},
|
||||||
|
isLeader (guild) {
|
||||||
|
if (!guild.leader) return false;
|
||||||
|
return this.user._id === guild.leader;
|
||||||
|
},
|
||||||
|
isOfficial (category) {
|
||||||
|
return category === 'habitica_official';
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user