Refactor: New Post design
This commit is contained in:
parent
1286de4c64
commit
a63034b4b4
@ -35,17 +35,24 @@
|
||||
gap: 16px
|
||||
}
|
||||
|
||||
.postHead {
|
||||
.titleBar {
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
align-items: start;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
|
||||
& > .date {
|
||||
color: var(--white-dim);
|
||||
}
|
||||
}
|
||||
|
||||
.postHead {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.commentsPart {
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
@ -54,18 +61,32 @@
|
||||
|
||||
.commentsHead {
|
||||
width: 100%;
|
||||
border-bottom: 2px solid var(--accent-dim);
|
||||
border-bottom: 1px solid var(--accent-dim);
|
||||
|
||||
margin-top: 32px;
|
||||
}
|
||||
|
||||
.postInfo {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
gap: 12px;
|
||||
align-items: start;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="body">
|
||||
<article class="post">
|
||||
<div class="postHead">
|
||||
<UserItem user={post.author} iconSize={28}></UserItem>
|
||||
<h1 class="typeTitle">{post.name}</h1>
|
||||
<span class="date">{moment(post.postDate).fromNow()}</span>
|
||||
<Avatar size={64}></Avatar>
|
||||
<div class="titleBar">
|
||||
<div class="postInfo">
|
||||
<Mention user={post.author}></Mention>
|
||||
<Ago date={post.postDate}></Ago>
|
||||
</div>
|
||||
<h1 class="typeTitle">{post.name}</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="postContent">
|
||||
@ -77,11 +98,11 @@
|
||||
|
||||
{#if commentTree}
|
||||
<div class="commentsPart">
|
||||
<h3 class="commentsHead typeName">Comments</h3>
|
||||
<div class="commentsHead"></div>
|
||||
|
||||
<CommentList commentTreeList={commentTree} getTags={(comment) => {
|
||||
if (comment.author?.id == post.author?.id) {
|
||||
return ["OP 🖋️"];
|
||||
return ["Original 🖋️"];
|
||||
}
|
||||
return [];
|
||||
}}></CommentList>
|
||||
|
||||
@ -9,6 +9,8 @@
|
||||
|
||||
--white: #ffffff;
|
||||
--white-dim: #afbcc2;
|
||||
|
||||
--gray: #1d1d28;
|
||||
}
|
||||
|
||||
body {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user