Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactor] 포스트 이미지가 없을 경우, 내용 추가 표시 처리 #67

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 1 addition & 25 deletions src/components/post/SelectedPostList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</div>
<div class="preview-main">
<h5 class="card-title"><strong>{{ post.title }}</strong></h5>
<div class="content-preview">{{ stripHtmlTags(post.content) }}</div>
<div :class="{'no-postImg': !post.postImg, 'content-preview': true}">{{ stripHtmlTags(post.content) }}</div>
<b-card-img v-if="post.postImg" :src="post.postImg"
class="card-img" alt="Image" bottom></b-card-img>
</div>
Expand Down Expand Up @@ -319,28 +319,4 @@ function zergRush() {

<style>
@import url('@/styles/post/PostList.css');

.zerg-unit {
display: inline-block;
width: 30px;
height: 30px;
background-color: white;
border: 3px solid navy;
border-radius: 50%;
position: absolute;
cursor: pointer;
animation: zergAnimation 20s linear infinite; /* 애니메이션 적용 */
}

@keyframes zergAnimation {
0% {
transform: translateY(0);
}
50% {
transform: translateY(50vh); /* 바닥까지 떨어지는 위치로 변경 */
}
100% {
transform: translateY(100vh); /* 바닥까지 떨어지는 위치로 변경 */
}
}
</style>
35 changes: 34 additions & 1 deletion src/styles/post/PostList.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@
/* 두 줄을 표시하고 넘어가면 말줄임표 표시 */
-webkit-box-orient: vertical;
overflow: hidden;
white-space: normal;
text-overflow: ellipsis;
min-height: 50px;
margin-top: 10px;
margin-bottom: 10px;
max-width: 100%;
line-height: 1.8em;
}

.content-preview.no-postImg{
-webkit-line-clamp: 9;
min-height: 260px;
}

.card-title {
Expand Down Expand Up @@ -101,4 +109,29 @@
bottom: 20px;
right: 20px;
color: #042444;
}
}


.zerg-unit {
display: inline-block;
width: 30px;
height: 30px;
background-color: white;
border: 3px solid navy;
border-radius: 50%;
position: absolute;
cursor: pointer;
animation: zergAnimation 20s linear infinite; /* 애니메이션 적용 */
}

@keyframes zergAnimation {
0% {
transform: translateY(0);
}
50% {
transform: translateY(50vh); /* 바닥까지 떨어지는 위치로 변경 */
}
100% {
transform: translateY(100vh); /* 바닥까지 떨어지는 위치로 변경 */
}
}
Loading