fixes & tweaks
This commit is contained in:
parent
2c700de5d9
commit
46f70c9355
|
@ -33,28 +33,36 @@ const bg = {
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.hpaizdrt {
|
.hpaizdrt {
|
||||||
$height: 1.1rem;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
height: $height;
|
height: 1.1em;
|
||||||
justify-self: flex-end;
|
justify-self: flex-end;
|
||||||
padding: .1em .7em;
|
padding: .1em .4em;
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
font-size: .8em;
|
font-size: .8em;
|
||||||
text-shadow: 0 2px 2px var(--shadow);
|
text-shadow: 0 2px 2px var(--shadow);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
.header > .body & {
|
||||||
|
width: max-content;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
> .icon {
|
> .icon {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .name {
|
> .name {
|
||||||
|
display: none;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
line-height: $height;
|
font-size: 0.85em;
|
||||||
font-size: 0.9em;
|
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-overflow: clip;
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
text-shadow: -1px -1px 0 var(--bg), 1px -1px 0 var(--bg), -1px 1px 0 var(--bg), 1px 1px 0 var(--bg);
|
text-shadow: -1px -1px 0 var(--bg), 1px -1px 0 var(--bg), -1px 1px 0 var(--bg), 1px 1px 0 var(--bg);
|
||||||
|
.article > .main &, .header > .body & {
|
||||||
|
display: unset;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -33,7 +33,10 @@
|
||||||
</div>
|
</div>
|
||||||
<article class="article" @contextmenu.stop="onContextmenu" @click.self="router.push(notePage(appearNote))">
|
<article class="article" @contextmenu.stop="onContextmenu" @click.self="router.push(notePage(appearNote))">
|
||||||
<div class="main" @click.self="router.push(notePage(appearNote))">
|
<div class="main" @click.self="router.push(notePage(appearNote))">
|
||||||
<XNoteHeader class="header" :note="appearNote" :mini="true"/>
|
<div class="header-container">
|
||||||
|
<MkAvatar class="avatar" :user="note.user"/>
|
||||||
|
<XNoteHeader class="header" :note="appearNote" :mini="true"/>
|
||||||
|
</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<p v-if="appearNote.cw != null" class="cw">
|
<p v-if="appearNote.cw != null" class="cw">
|
||||||
<Mfm v-if="appearNote.cw != ''" class="text" :text="appearNote.cw" :author="appearNote.user" :i="$i" :custom-emojis="appearNote.emojis"/>
|
<Mfm v-if="appearNote.cw != ''" class="text" :text="appearNote.cw" :author="appearNote.user" :i="$i" :custom-emojis="appearNote.emojis"/>
|
||||||
|
@ -429,23 +432,29 @@ function readPromo() {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .avatar {
|
.header-container {
|
||||||
flex-shrink: 0;
|
display: flex;
|
||||||
display: block;
|
> .avatar {
|
||||||
margin: 0 14px 8px 0;
|
flex-shrink: 0;
|
||||||
width: 48px;
|
display: block;
|
||||||
height: 48px;
|
margin: 0 14px 8px 0;
|
||||||
position: relative;
|
width: 48px;
|
||||||
top: 0;
|
height: 48px;
|
||||||
left: 0;
|
position: relative;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
> .header {
|
||||||
|
width: 0;
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> .main {
|
> .main {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
|
||||||
> .body {
|
> .body {
|
||||||
margin-top: .7em;
|
margin-top: .2em;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-inline: -100px;
|
margin-inline: -100px;
|
||||||
padding-inline: 100px;
|
padding-inline: 100px;
|
||||||
|
@ -535,7 +544,7 @@ function readPromo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
> .files {
|
> .files {
|
||||||
margin-top: .7em;
|
margin-top: .4em;
|
||||||
margin-bottom: .4em;
|
margin-bottom: .4em;
|
||||||
}
|
}
|
||||||
> .url-preview {
|
> .url-preview {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<header class="kkwtjztg">
|
<header class="kkwtjztg">
|
||||||
<MkAvatar class="avatar" :user="note.user"/>
|
|
||||||
<div class="user-info">
|
<div class="user-info">
|
||||||
<div>
|
<div>
|
||||||
<MkA v-user-preview="note.user.id" class="name" :to="userPage(note.user)">
|
<MkA v-user-preview="note.user.id" class="name" :to="userPage(note.user)">
|
||||||
|
@ -8,15 +7,15 @@
|
||||||
<span v-if="note.user.isBot" class="is-bot">bot</span>
|
<span v-if="note.user.isBot" class="is-bot">bot</span>
|
||||||
</MkUserName>
|
</MkUserName>
|
||||||
</MkA>
|
</MkA>
|
||||||
|
<div class="username"><MkAcct :user="note.user"/></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<MkA class="created-at" :to="notePage(note)">
|
<MkA class="created-at" :to="notePage(note)">
|
||||||
<MkTime :time="note.createdAt"/>
|
<MkTime :time="note.createdAt"/>
|
||||||
</MkA>
|
</MkA>
|
||||||
<MkVisibility :note="note"/>
|
<MkVisibility :note="note"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div class="username"><MkAcct :user="note.user"/></div>
|
|
||||||
<MkInstanceTicker v-if="showTicker" class="ticker" :instance="note.user.instance"/>
|
<MkInstanceTicker v-if="showTicker" class="ticker" :instance="note.user.instance"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -60,17 +59,40 @@ defineProps<{
|
||||||
width: 0;
|
width: 0;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
|
display: flex;
|
||||||
|
font-size: 1.2em;
|
||||||
> div {
|
> div {
|
||||||
display: flex;
|
&:first-child {
|
||||||
align-items: center;
|
flex-grow: 1;
|
||||||
|
width: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
&:last-child {
|
||||||
|
max-width: 50%;
|
||||||
|
gap: .2em .5em;
|
||||||
|
}
|
||||||
|
.article > .main & {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
.username {
|
||||||
|
font-size: .9em;
|
||||||
|
}
|
||||||
|
&:last-child {
|
||||||
|
align-items: flex-end;
|
||||||
|
}
|
||||||
|
> * {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.name {
|
.name {
|
||||||
flex: 1 1 0px;
|
// flex: 1 1 0px;
|
||||||
display: block;
|
display: inline;
|
||||||
margin: 0 .5em 0 0;
|
margin: 0 .5em 0 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
font-size: 1.2em;
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
@ -91,7 +113,7 @@ defineProps<{
|
||||||
}
|
}
|
||||||
|
|
||||||
.username {
|
.username {
|
||||||
flex: 1 1 0px;
|
display: inline;
|
||||||
margin: 0 .5em 0 0;
|
margin: 0 .5em 0 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
@ -99,9 +121,24 @@ defineProps<{
|
||||||
}
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
|
display: inline-flex;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin-left: auto;
|
margin-left: .5em;
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
|
.created-at {
|
||||||
|
max-width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ticker {
|
||||||
|
display: inline-flex;
|
||||||
|
margin-left: .5em;
|
||||||
|
vertical-align: middle;
|
||||||
|
> .name {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue