โ ํ๊ฒ ๊ตฌ์กฐ
- 2๋จ ๊ทธ๋ฆฌ๋ ์นด๋ํ ๋ ์ด์์
- ๊ฐ ์นด๋์:
- ๊ฐ์ฌ ์ด๋ฆ + ์ง๋ ฌ
- ํ์ดํ (๊ตต๊ฒ)
- ๋ถ์ ์ค๋ช
- ์ฐ์ธก ํ๋กํ ์ด๋ฏธ์ง
- ๋ฅ๊ทผ ๋ฐฐ๊ฒฝ ์นด๋ ์คํ์ผ
๐ ์ปดํฌ๋ํธ ๊ตฌ์ฑ
components/
โโโ TeacherPromoCard.vue โ ์นด๋ 1๊ฐ
โโโ TeacherPromoSection.vue โ ์ ์ฒด ์น์
views/
โโโ HomePage.vue โ ์ฝ์
โ
1. TeacherPromoCard.vue
<template>
<div class="promo-card">
<div class="text-area">
<h4 class="title">{{ title }}</h4>
<p class="desc">{{ description }}</p>
<p class="subject">{{ subject }} {{ name }}</p>
</div>
<img class="profile-img" :src="img" :alt="name" />
</div>
</template>
<script>
export default {
name: "TeacherPromoCard",
props: {
title: String,
description: String,
name: String,
subject: String,
img: String,
},
};
</script>
<style scoped>
.promo-card {
display: flex;
justify-content: space-between;
align-items: center;
background: #f9f9f9;
border-radius: 16px;
padding: 20px 24px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
transition: 0.2s ease;
}
.promo-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.text-area {
flex: 1;
}
.title {
font-size: 16px;
font-weight: bold;
margin-bottom: 6px;
color: #111;
}
.desc {
font-size: 14px;
color: #666;
margin-bottom: 10px;
}
.subject {
font-size: 13px;
color: #333;
font-weight: 500;
}
.profile-img {
width: 64px;
height: 64px;
object-fit: cover;
border-radius: 50%;
margin-left: 16px;
}
</style>
โ
2. TeacherPromoSection.vue
<template>
<section class="teacher-promo-section">
<h3 class="section-title">์ง๊ธ ์ฃผ๋ชฉํ ์ ์๋ ๊ธฐํ์ </h3>
<div class="grid">
<TeacherPromoCard v-for="(card, i) in promoList" :key="i" v-bind="card" />
</div>
</section>
</template>
<script>
import TeacherPromoCard from "./TeacherPromoCard.vue";
export default {
components: { TeacherPromoCard },
data() {
return {
promoList: [
{
title: "ํ๋ฆ์ ์๋กญ๊ฒ, ๋ณธ์ง์ ๊ทธ๋๋ก\n2026 ์ ํจ์ง ์ปค๋ฆฌํ๋ผ",
description: "ํ๋ฆ์ ์๋กญ๊ฒ, ๋ณธ์ง์ ๊ทธ๋๋ก\n2026 ์ ํจ์ง ์ปค๋ฆฌํ๋ผ",
name: "์ ํจ์ง",
subject: "ํ์ ๋ฒ",
img: "https://img.megagong.net/profphoto/gong/wjsgywls1/main_intro2.png",
},
{
title: "๊ฐํธ์ง ์ต์ ์ด์ ์ด์ ๋ฆฌ\nNEW ์๊ฐ ์ก์๋ฆ",
description: "์ต์ ์ด์๋ฅผ ๋ณด๋ฉด ์ํ๋ฌธ์ ๊ฐ ๋ณด์
๋๋ค.",
name: "์ก์๋ฆ",
subject: "์ง์ญ์ฌํ๊ฐํธ",
img: "https://img.megagong.net/profphoto/gong/megapassnurse/main_intro2.png",
},
{
title: "2026 ๋ฐ์๋ฏผ\nํ์ฌ์ ์ฑ
๊ฐ๋
์์ฑ",
description: "๋ ๊ฒฌ๊ณ ํ๊ฒ ๋ง๋ ์ฌํ์์ฑ",
name: "๋ฐ์๋ฏผ",
subject: "ํ์ฌ์ ์ฑ
",
img: "https://img.megagong.net/profphoto/gong/p3672303/main_intro2.png",
},
{
title: "๊ฒฝ์ ์ ๊ณต๋ฌด์ ์๋จ์ด\n์ด์คํผ๋ ์๊ธฐ๋น๋ฒ",
description: "์ํ์ ๋ง๋ ์ดํ๋ค ๋ค์ ํ์ด๋ฌ๋ค!",
name: "๊ฒฝ์ ์",
subject: "์์ด",
img: "https://img.megagong.net/profphoto/gong/incredvoc/main_intro2.png",
},
{
title: "VocaGram ํํ๋ชจ๊ณ \n๋ฐ์์ฐ ์์ด",
description: "ํํ ๋ชจ์๊ณ ์ฌ๋ก ๋ฌธ์ ํ์ด ์ง์ค๋ ฅ UP",
name: "๋ฐ์์ฐ",
subject: "์์ด",
img: "https://img.megagong.net/profphoto/gong/sooyeon/main_intro2.png",
},
{
title: "2026 ์ง์
์๋ด์ฌ๋ฆฌํ\nNext Road ์ปค๋ฆฌํ๋ผ",
description: "๋ค์ ๋์ ์๋ ํฉ๊ฒฉ์
๋๋ค.",
name: "๊นํ์ค",
subject: "์ง์
์๋ด์ฌ๋ฆฌํ",
img: "https://img.megagong.net/profphoto/gong/pt1969/main_intro2.png",
},
],
};
},
};
</script>
<style scoped>
.teacher-promo-section {
margin-top: 60px;
padding: 0 20px;
width: 790px;
}
.section-title {
font-size: 20px;
font-weight: bold;
margin-bottom: 24px;
}
.grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20px;
}
</style>
โ
3. HomePage.vue
์ ์ฝ์
import TeacherPromoSection from "@/components/TeacherPromoSection.vue";
export default {
components: {
...,
TeacherPromoSection,
},
};
<!-- ๊ธฐ์กด ๊ตฌ์กฐ ์๋์ ์ถ๊ฐ -->
<MainTabs />
<TeacherPromoSection />
๐ ๊ฒฐ๊ณผ
- "์ง๊ธ ์ฃผ๋ชฉํ ์ ์๋ ๊ธฐํ์ " ๋ ์ด์์์ด ์คํฌ๋ฆฐ์ท๊ณผ ๋์ผํ ๊ตฌ์กฐ๋ก ๋์ต๋๋ค
- ์นด๋๋ค์
grid
๋ก 2์ด ์ ๋ ฌ๋๊ณ , ๋ฐ์ํ ๋์์ ๋ค์ ๊ฐ์์ ์ฒ๋ฆฌ ๊ฐ๋ฅํฉ๋๋ค
๐ฏ ๋ค์ ๊ณผ์
์๋ ๊ธฐ๋ฅ์ ์ถ๊ฐํด๋ณด์ธ์!
src\components\TeacherPromoSection.vue
์์ ๋ฐ์ ์ ์๋ ๊ธฐํ์ ๋ฐ์ดํฐ์ title์ด๋ description์ ๊ฐ \n์ ์ธ์ํด์src\components\TeacherPromoCard.vue
์ปดํฌ๋ํธ ๋ด๋ถ์์ ์ค๋ด๋ฆผ์ด ๋๋๋ก ์ฒ๋ฆฌ- ๋ฉ์ธ ์ ์ฒด๊ฐ ํ์ฌ ๋ง์ ๊ณ ๋์ฒด๋ก ๋์ค๋๋ฐ Noto Sans KR๋ก ๋์ฌ ์ ์๋๋ก
base.scss
๋ด๋ถ ์์
๐ฌ ๋๊ธ
โป ๋ก๊ทธ์ธ ํ ๋๊ธ์ ์์ฑํ ์ ์์ต๋๋ค.