mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 09:57:29 -07:00
chore: format
This commit is contained in:
parent
f26f704139
commit
450eae74c1
2 changed files with 9 additions and 22 deletions
|
@ -35,16 +35,9 @@
|
|||
i18n.ts.noAccountDescription
|
||||
}}</span>
|
||||
</div>
|
||||
<XShowMoreButton
|
||||
v-if="isLong"
|
||||
v-model="collapsed"
|
||||
></XShowMoreButton>
|
||||
<XShowMoreButton v-if="isLong" v-model="collapsed"></XShowMoreButton>
|
||||
<div v-if="user.fields.length > 0 && detailed" class="fields">
|
||||
<dl
|
||||
v-for="(field, i) in user.fields"
|
||||
:key="i"
|
||||
class="field"
|
||||
>
|
||||
<dl v-for="(field, i) in user.fields" :key="i" class="field">
|
||||
<dt class="name">
|
||||
<Mfm
|
||||
:text="field.name"
|
||||
|
@ -101,10 +94,8 @@ const props = defineProps<{
|
|||
|
||||
let isLong = $ref(
|
||||
props.detailed &&
|
||||
(
|
||||
props.user.description.split("\n").length > 9 ||
|
||||
props.user.description.length > 400
|
||||
)
|
||||
(props.user.description.split("\n").length > 9 ||
|
||||
props.user.description.length > 400),
|
||||
);
|
||||
let collapsed = $ref(isLong);
|
||||
</script>
|
||||
|
@ -148,7 +139,6 @@ let collapsed = $ref(isLong);
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
.title {
|
||||
position: relative;
|
||||
display: block;
|
||||
|
@ -210,12 +200,10 @@ let collapsed = $ref(isLong);
|
|||
position: relative;
|
||||
max-height: calc(9em + 50px);
|
||||
mask: linear-gradient(black calc(100% - 64px), transparent);
|
||||
-webkit-mask: linear-gradient(
|
||||
black calc(100% - 64px),
|
||||
transparent
|
||||
);
|
||||
-webkit-mask: linear-gradient(black calc(100% - 64px), transparent);
|
||||
}
|
||||
&.collapsed, &.truncate {
|
||||
&.collapsed,
|
||||
&.truncate {
|
||||
:deep(br) {
|
||||
display: none; // collapse white spaces
|
||||
}
|
||||
|
|
|
@ -93,6 +93,5 @@ onMounted(() => {
|
|||
width: 300px;
|
||||
overflow: hidden;
|
||||
transform-origin: center top;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in a new issue