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

feat: add step component #76

Merged
merged 10 commits into from
Jul 8, 2024
Prev Previous commit
Next Next commit
feat: re-design step component
yolophg committed Jul 8, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 636695f787654a4d7ac95ce35a0323b434871a14
7 changes: 5 additions & 2 deletions components/step.js
Original file line number Diff line number Diff line change
@@ -8,6 +8,9 @@ class Step extends HTMLElement {
}

validateAttributes() {
if (!this.hasAttribute("step")) {
throw new Error('The "step" attribute is required.');
}
if (!this.hasAttribute("iconSrc")) {
throw new Error('The "iconSrc" attribute is required.');
}
@@ -27,7 +30,7 @@ class Step extends HTMLElement {
max-width: 375px;
max-height: 627px;
}
.step-title ::slotted(h3) {
.step-title h3 {
font-size: 36px;
margin-bottom: 50px;
}
@@ -50,7 +53,7 @@ class Step extends HTMLElement {
return html`
<article class="step">
<section class="step-title">
<slot name="title"></slot>
<h3>Step ${step}</h3>
</section>
<img class="step-icon" src="${iconSrc}" alt="Step icon" />
<section class="step-content">
9 changes: 3 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
@@ -319,8 +319,7 @@
<div id="join-instruction-container">
<span>스터디 참여방법</span>
<div class="instruction-card-list">
<ds-step iconSrc="images/icon_step1.png">
<h3 slot="title">Step 1</h3>
<ds-step step="1" iconSrc="images/icon_step1.png">
<p slot="content">
현재 스터디 1기가 진행중이에요. (2024년 4/21~8/10) 다음 기수 스터디 참여를 원한다면
<ds-step-text-link
@@ -330,8 +329,7 @@ <h3 slot="title">Step 1</h3>
에서 신청할 수 있어요.
</p>
</ds-step>
<ds-step iconSrc="images/icon_step2.png">
<h3 slot="title">Step 2</h3>
<ds-step step="2" iconSrc="images/icon_step2.png">
<p slot="content">
답안 제출과 확인은 깃허브를 통해 이루어져요. 스터디 전체 진행상황을 알고 싶다면
<ds-step-text-link
@@ -341,8 +339,7 @@ <h3 slot="title">Step 2</h3>
를 통해 파악할 수 있어요.
</p>
</ds-step>
<ds-step iconSrc="images/icon_step3.png">
<h3 slot="title">Step 3</h3>
<ds-step step="3" iconSrc="images/icon_step3.png">
<p slot="content" style="text-align: center;">
매주 스터디 멤버들끼리
<ds-step-text-link