Skip to content

Commit 06cb774

Browse files
committed
프리티어 해결
1 parent f452562 commit 06cb774

2 files changed

Lines changed: 34 additions & 20 deletions

File tree

src/scripts/components/card-component.ts

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,22 @@ class CardComponent extends HTMLElement {
2222
const description = this.getAttribute('description') || '';
2323

2424
this.innerHTML = `
25-
<div class="card">
26-
<a href="${href}" class="card-link">
27-
${imgSrc
28-
? `<div class="card-icon">
29-
<img class="card-img" src="${imgSrc}" alt="${title}" />
30-
</div>`
31-
: ''
32-
}
33-
<div class="card-content">
34-
<p class="card-description">
35-
<strong class="card-title">${title}</strong><br>
36-
${description}
37-
</p>
25+
<div class="card">
26+
<a href="${href}" class="card-link">
27+
${imgSrc
28+
? `<div class="card-icon">
29+
<img class="card-img" src="${imgSrc}" alt="${title}" />
30+
</div>`
31+
: ''}
32+
<div class="card-content">
33+
<p class="card-description">
34+
<strong class="card-title">${title}</strong><br />
35+
${description}
36+
</p>
37+
</div>
38+
</a>
3839
</div>
39-
</a>
40-
</div>
41-
`;
42-
43-
40+
`;
4441
}
4542
}
4643

src/styles/style.css

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
@apply min-w-0 bg-white rounded-md border border-gray-200 px-4 py-3 mb-4 transition duration-200 hover:border-gray-300 hover:shadow h-full flex flex-col;
3131
}
3232

33-
34-
3533
.card-link {
3634
@apply flex items-start gap-4 no-underline;
3735
}
@@ -56,3 +54,22 @@
5654
@apply text-base font-semibold text-gray-700;
5755
}
5856
}
57+
58+
/* 전역 스타일 */
59+
body {
60+
font-family: 'Noto Sans KR', Arial, sans-serif;
61+
background: #f8fafc;
62+
color: #222;
63+
margin: 0;
64+
padding: 0;
65+
}
66+
67+
h1, h2, h3, h4, h5, h6 {
68+
font-weight: 700;
69+
margin-top: 1.5em;
70+
margin-bottom: 0.5em;
71+
}
72+
73+
p {
74+
margin: 0 0 1em 0;
75+
}

0 commit comments

Comments
 (0)