Skip to content

Commit

Permalink
๋ฐฐํฌ
Browse files Browse the repository at this point in the history
  • Loading branch information
Minn-Choi committed Nov 4, 2024
1 parent 3dfcd6f commit eb19448
Show file tree
Hide file tree
Showing 16 changed files with 217 additions and 49 deletions.
3 changes: 1 addition & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"dev": "concurrently \"npm run serve\" \"npm run backend\""
},
"dependencies": {
"@popperjs/core": "^2.11.8",
"axios": "^1.7.7",
"bootstrap": "^5.3.3",
"core-js": "^3.8.3",
Expand Down
5 changes: 5 additions & 0 deletions src/assets/images/add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/images/comment.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/images/delete.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/images/next.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/images/search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/assets/images/smile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/images/write.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/components/common/feed/CommentInput.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<template>
<div class="comment-input">
<select v-model="selectedEmoji">
<option value="" disabled selected hidden><img src="../../../assets/images/smile.svg"></option>
<option value="๐Ÿ˜Š">๐Ÿ˜Š</option>
<option value="๐Ÿ‘">๐Ÿ‘</option>
<option value="โค๏ธ">โค๏ธ</option>
</select>
<input type="text" v-model="comment" placeholder="๋Œ“๊ธ€ ์ž…๋ ฅ" />
<button @click="submitComment">์ž‘์„ฑ</button>
<button @click="submitComment"><img src="../../../assets/images/add.svg"></button>
</div>
</template>

Expand Down
52 changes: 38 additions & 14 deletions src/components/common/feed/FollowStats.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,30 @@
<div class="follow-stats" @click="goToFollowPage">
<div class="date-info">{{ formattedDate }}</div>
<div class="follow-info">
<span>ํŒ”๋กœ์›Œ {{ followerCount }}๋ช…</span>
<span>ํŒ”๋กœ์ž‰ {{ followingCount }}๋ช…</span>
<span class="arrow-icon">โ€บ</span>
<span class="follower-text">ํŒ”๋กœ์›Œ</span>
<span class="follower-count">{{ followerCount }}๋ช…</span>
<span class="following-text">ํŒ”๋กœ์ž‰</span>
<span class="following-count">{{ followingCount }}๋ช…</span>
<img src="../../../assets/images/next.svg">
</div>
</div>
</template>

<script setup>
import { ref } from 'vue'
import { ref, computed } from 'vue'
const followerCount = ref(0) // API์—์„œ ๋ฐ›์•„์˜ค๋Š” ํŒ”๋กœ์›Œ ์ˆ˜
const followingCount = ref(0) // API์—์„œ ๋ฐ›์•„์˜ค๋Š” ํŒ”๋กœ์ž‰ ์ˆ˜
// ํ˜„์žฌ ๋‚ ์งœ๋ฅผ ํฌ๋งทํŒ…
const formattedDate = ref(
new Date().toLocaleDateString('ko-KR', {
year: 'numeric',
month: 'long',
day: 'numeric'
})
)
const formattedDate = computed(() => {
const date = new Date();
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // ์›”์€ 0๋ถ€ํ„ฐ ์‹œ์ž‘ํ•˜๋ฏ€๋กœ +1
const day = String(date.getDate()).padStart(2, '0');
return `${year} . ${month} . ${day}`;
});
const goToFollowPage = () => {
// ํŒ”๋กœ์šฐ ๊ด€๋ฆฌ ํŽ˜์ด์ง€๋กœ ์ด๋™ํ•˜๋Š” ํ•จ์ˆ˜
Expand All @@ -33,16 +36,19 @@ const goToFollowPage = () => {
.follow-stats {
display: flex;
align-items: center;
height: 37px;
padding: 8px;
background-color: #f6f6f6;
font-family: 'NanumSquareRound', sans-serif;
border-radius: 10px;
background: #FFF;
}
.date-info {
flex: 1;
text-align: left;
color: #333;
color: #FF7F00; /* ๋‚ ์งœ ์ƒ‰์ƒ */
font-family: 'NaR';
font-size: 0.9rem;
padding-left: 5px;
}
.follow-info {
Expand All @@ -60,4 +66,22 @@ const goToFollowPage = () => {
font-size: 1rem;
color: #999;
}
.follower-text,
.following-text {
color: #000;
font-family: 'NaR';
font-size: 15px;
font-weight: 300;
line-height: normal;
}
.follower-count,
.following-count {
color: #000;
font-family: 'NaB';
font-size: 15px;
font-weight: 400;
line-height: normal;
}
</style>
50 changes: 43 additions & 7 deletions src/components/common/feed/FriendGoal.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<template>
<div class="friend-goal">
<div class="goal-content">
<span>{{ friendNickname }}์˜ ๋ชฉํ‘œ: {{ friendGoalContent }}</span>
<button @click="toggleCommentSection">๐Ÿ’ฌ</button>
<span class="friendName">{{ friendNickname }}</span>
<span class="friendContent">{{ friendGoalContent }}</span>
<button class="btn" @click="toggleCommentSection"><img src='../../../assets/images/comment.svg'></button>
</div>

<CommentInput v-if="showCommentSection" />
Expand All @@ -15,8 +16,8 @@ import { ref } from 'vue'
import CommentInput from './CommentInput.vue'
import CommentList from './CommentList.vue'
const friendNickname = ref('์นœ๊ตฌ ๋‹‰๋„ค์ž„')
const friendGoalContent = ref('์นœ๊ตฌ์˜ ์˜ค๋Š˜ ๋ชฉํ‘œ')
const friendNickname = ref('ํ† ๋‹ˆ')
const friendGoalContent = ref('์ด๋”ฐ ์ƒ๋ก์›์—์„œ ๋ฐฅ๋จน์„์‚ฌ๋žŒ? ๊น€์น˜์ฒ ํŒ์–ด์ฉŒ๊ณ ์ €์ฉŒ๊ณ ')
const showCommentSection = ref(false)
const toggleCommentSection = () => {
Expand All @@ -28,13 +29,48 @@ const toggleCommentSection = () => {
.friend-goal {
display: flex;
flex-direction: column;
gap: 4px;
gap: 8px;
width: 100%;
border-radius: 10px;
background: #FFF;
height: 100%;
}
.goal-content {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
}
.friendName {
border-radius: 10px 0px 0px 10px;
background: #FF7F00;
color: #FFF;
text-align: center;
font-family: 'NaB';
font-size: 11px;
width: 54px;
display: flex;
align-items: center;
justify-content: center;
padding: 8px 0;
word-wrap: break-word;
}
.friendContent{
margin-left: 10px;
margin-right: 5px;
padding: 5px 0px;
color: #000;
width:70%;
font-family: 'NaL';
font-size: 15px;
font-style: normal;
font-weight: 300;
line-height: normal;
}
.btn button:hover {
background: none;
}
</style>
63 changes: 54 additions & 9 deletions src/components/common/feed/MyGoal.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<template>
<div class="my-goal">
<div class="goal-content">
<span>{{ nickname }}์˜ ๋ชฉํ‘œ: {{ goalContent }}</span>
<span class="name">{{ nickname }}</span>
<span class="content"> {{ goalContent }}</span>
<div class="goal-icons">
<button @click="toggleCommentSection">๐Ÿ’ฌ</button>
<button @click="editGoal">โœ๏ธ</button>
<button @click="deleteGoal">๐Ÿ—‘๏ธ</button>
<button @click="toggleCommentSection"><img src='../../../assets/images/comment.svg'></button>
<div class='line'></div>
<button @click="editGoal"><img src='../../../assets/images/write.svg'></button>
<div class='line'></div>
<button @click="deleteGoal"><img src='../../../assets/images/delete.svg'></button>
</div>
</div>

Expand All @@ -21,8 +24,8 @@ import { ref } from 'vue'
import CommentInput from './CommentInput.vue'
import CommentList from './CommentList.vue'
const nickname = ref('๋‚ด ๋‹‰๋„ค์ž„')
const goalContent = ref('์˜ค๋Š˜์˜ ๋ชฉํ‘œ ๋‚ด์šฉ')
const nickname = ref('๋ฏผ๋‹ฌํŒฝ๋Ÿด')
const goalContent = ref('ํฌ๊ธฐํ•˜์ง€ ์•Š๊ณ  ๊ธ์ •์ ์œผ๋กœ ์˜ค๋Š˜์˜ ํ• ์ผ์„ ๋งˆ๋ฌด๋ฆฌํ•˜์ž๋ƒฅ๋ƒฅ๊ฑธ')
const showCommentSection = ref(false)
const toggleCommentSection = () => {
Expand All @@ -43,21 +46,63 @@ const deleteGoal = () => {
flex-direction: column;
gap: 8px;
width: 100%;
border-radius: 10px;
background: #FFF;
height: 100%;
}
.goal-content {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}
.name {
border-radius: 10px 0px 0px 10px;
background: #FF7F00;
color: #FFF;
text-align: center;
font-family: 'NaB';
font-size: 11px;
width: 54px;
display: flex;
align-items: center;
justify-content: center;
padding: 8px 0;
word-wrap: break-word;
}
.content{
margin-left: 10px;
margin-right: 5px;
padding: 5px 0px;
color: #000;
width:50%;
font-family: 'NaL';
font-size: 15px;
font-style: normal;
font-weight: 300;
line-height: normal;
}
.goal-icons {
display: flex;
gap: 4px;
gap: 10px;
align-items: center;
}
.goal-icons button:hover {
background: none;
}
.comment-section {
margin-top: 8px;
}
.line{
width: 1px;
height: 35px;
background: #D9D9D9;
}
</style>
39 changes: 35 additions & 4 deletions src/components/common/feed/SearchBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
placeholder="์นœ๊ตฌ ๋‹‰๋„ค์ž„ ๊ฒ€์ƒ‰"
@input="searchFriend"
/>
<img src="../../../assets/images/search.svg" class="search-icon">
</div>
</template>

Expand All @@ -20,10 +21,40 @@ const searchFriend = () => {
</script>

<style scoped>
.search-bar {
height: 33px;
border-radius: 10px;
border: 1px solid #D9D9D9;
background: #FFF;
font-family: 'NaL';
box-shadow: none;
display: flex; /* ํ”Œ๋ ‰์Šค ๋ฐ•์Šค๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์•„์ดํ…œ์„ ๊ฐ€๋กœ๋กœ ์ •๋ ฌ */
align-items: center;
gap:3px;
}
.search-bar input {
width: 100%;
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
height: 32px;
width: 90%;
border-radius: 10px;
background: #FFF;
border: 1px solid #FFFFFF;
font-family: 'NaL';
box-shadow: none;
padding-left: 8px;
}
.search-bar input::placeholder {
color: #878282;
text-align: center;
font-size: 13px;
font-style: normal;
font-weight: 300;
line-height: 32px;
}
.search-icon{
cursor: pointer;
}
</style>
Loading

0 comments on commit eb19448

Please sign in to comment.