Skip to content

Commit

Permalink
Merge branch 'main' into helena/112-review-section
Browse files Browse the repository at this point in the history
  • Loading branch information
yolophg committed Jul 10, 2024
2 parents 8f73c20 + 99fd38e commit de4483c
Show file tree
Hide file tree
Showing 7 changed files with 285 additions and 32 deletions.
92 changes: 92 additions & 0 deletions components/code-review-section.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
import { css, html } from "../html-css-utils.js";

class CodeReviewSection extends HTMLElement {
constructor() {
super();

this.render();
}

render() {
this.attachShadow({ mode: "open" });
this.shadowRoot.innerHTML = this.createCss() + this.createHtml();
}

createCss() {
return css`
:host {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
section {
display: flex;
flex-direction: column;
row-gap: 30px;
margin: 0 27px 0;
max-width: 1550px;
@media only screen and (min-width: 768px) {
row-gap: 50px;
margin: 0 76px 0 77px;
}
@media only screen and (min-width: 1024px) {
position: relative;
flex-direction: row-reverse;
width: 80%;
height: 53vh;
margin: 0;
}
}
.hero {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
row-gap: 20px;
width: 65%;
@media only screen and (min-width: 768px) {
row-gap: 30px;
width: 40%;
}
@media only screen and (min-width: 1024px) {
justify-content: center;
row-gap: 40px;
width: 40%;
}
}
aside {
width: 100%;
@media only screen and (min-width: 1024px) {
width: 60%;
}
}
`;
}


createHtml() {
return html`
<section>
<aside>
<slot name="image"></slot>
</aside>
<div class="hero">
<slot name="heading"></slot>
<slot name="button"></slot>
</div>
</section>
`;
}
}

customElements.define("ds-code-review-section", CodeReviewSection);
2 changes: 1 addition & 1 deletion components/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class Header extends HTMLElement {
<div class="buttons-container">
<ds-button-link
href="#join-instruction-container"
href="#steps-section"
size="small"
variant="ghost"
>참여방법 안내</ds-button-link
Expand Down
133 changes: 133 additions & 0 deletions components/language-section.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
import { css, html } from "../html-css-utils.js";

class LanguageSection extends HTMLElement {
constructor() {
super();
this.render();
}

render() {
this.attachShadow({ mode: "open" });
this.shadowRoot.innerHTML = this.createCss() + this.createHtml();
}

createCss() {
return css`
:host {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
section {
display: flex;
flex-direction: column;
row-gap: 30px;
margin: 0px 27px 0px;
max-width: 1550px;
@media only screen and (min-width: 768px) {
row-gap: 50px;
margin: 0px 75px 0px 76px;
}
@media only screen and (min-width: 1024px) {
position: relative;
flex-direction: row;
width: 80%;
height: 52vh;
margin: 0;
}
}
.hero {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
row-gap: 20px;
width: 65%;
@media only screen and (min-width: 768px) {
row-gap: 30px;
width: 40%;
}
@media only screen and (min-width: 1024px) {
justify-content: center;
row-gap: 40px;
width: 37%;
}
}
.gap {
@media only screen and (min-width: 1024px) {
justify-content: center;
width: 16%;
}
}
aside {
width: 100%;
@media only screen and (min-width: 1024px) {
width: 47%;
}
}
::slotted([slot="mobile-image"]) {
display: block;
}
::slotted([slot="tablet-image"]) {
display: none;
}
::slotted([slot="desktop-image"]) {
display: none;
}
@media only screen and (min-width: 768px) {
::slotted([slot="mobile-image"]) {
display: none;
}
::slotted([slot="tablet-image"]) {
display: block;
}
}
@media only screen and (min-width: 1024px) {
::slotted([slot="tablet-image"]) {
display: none;
}
::slotted([slot="desktop-image"]) {
display: block;
}
}
`;
}

createHtml() {
return html`
<section>
<aside>
<slot name="tablet-image"></slot>
<slot name="desktop-image"></slot>
<slot name="mobile-image"></slot>
</aside>
<div class="gap"></div>
<div class="hero">
<slot name="heading"></slot>
<slot name="button"></slot>
</div>
</section>
`;
}
}

customElements.define("ds-language-section", LanguageSection);
Binary file added images/horizontal-language.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/vertical-language.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 57 additions & 31 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,36 +168,62 @@
></ds-image>
</ds-intro-section>

<div id="language-container">
<div class="language-image">
<ds-image src="images/languages.png" alt="languages"></ds-image>
</div>
<div class="hero">
<ds-hero>지역에 관계없이 다양한 언어로 참여할 수 있어요</ds-hero>
<ds-button-link
size="big"
variant="ghost"
outline
href="#join-instruction-container"
>참여방법 안내</ds-button-link
>
</div>
</div>

<div id="review-container">
<div class="hero">
<ds-hero>코드리뷰를 통해 새로운 관점을 배울 수 있어요</ds-hero>
<ds-button-link
size="big"
variant="primary"
href="https://discord.gg/43UkheRV"
>디스코드 참여하기</ds-button-link
>
</div>
<div class="review-image">
<ds-image src="images/review.png" alt="review"></ds-image>
</div>
</div>
<ds-language-section>
<ds-image
slot="mobile-image"
src="images/vertical-language.png"
alt="languages"
width="100%"
height="auto"
></ds-image>
<ds-image
slot="tablet-image"
src="images/horizontal-language.png"
alt="languages"
width="100%"
height="auto"
></ds-image>
<ds-image
slot="desktop-image"
src="images/vertical-language.png"
alt="languages"
width="100%"
height="auto"
></ds-image>
<ds-hero slot="heading">
지역에 관계없이 다양한 언어로 참여할 수 있어요.
</ds-hero>
<ds-button-link
slot="button"
size="big"
variant="ghost"
href="#steps-section"
>
참여방법 안내
</ds-button-link>
</ds-language-section>

<ds-code-review-section>
<ds-hero slot="heading">
코드리뷰를 통해 새로운 관점을 배울 수 있어요
</ds-hero>
<ds-button-link
slot="button"
size="big"
variant="primary"
href="https://discord.gg/43UkheRV"
>
디스코드 참여하기
</ds-button-link>

<ds-image
slot="image"
src="images/review.png"
alt="review"
width="100%"
height="auto"
></ds-image>
</ds-code-review-section>

<ds-participant-reviews-section>
<ds-hero>참가자 후기</ds-hero>
Expand Down Expand Up @@ -230,7 +256,7 @@
</ds-participant-review-list>
</ds-participant-reviews-section>

<ds-steps-section>
<ds-steps-section id="steps-section">
<ds-hero>스터디 참여방법</ds-hero>
<ds-step-list>
<ds-step step="1" iconSrc="images/icon_step1.png">
Expand Down
2 changes: 2 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import "./components/button-link.js";
import "./components/code-review-section.js";
import "./components/footer-link-list.js";
import "./components/footer.js";
import "./components/header.js";
import "./components/hero.js";
import "./components/icon-link-list.js";
import "./components/image.js";
import "./components/intro-section.js";
import "./components/language-section.js";
import "./components/participant-review.js";
import "./components/participant-review-section.js";
import "./components/seo-meta-tag/seo-meta-tag.js";
Expand Down

0 comments on commit de4483c

Please sign in to comment.