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