๐Ÿฆ_21.11.27 / 21.11.28

Boriยท2021๋…„ 11์›” 28์ผ
1
post-thumbnail

21๋…„ 11์›” 27์ผ / 28์ผ

๐Ÿ“Ž Vending Machine with SCSS

์†Œ์Šค์ฝ”๋“œ ๋ณด๊ธฐ

// _main.scss
#app {
  @include grid(null, null, 28px);
  margin: 65px 0;
  .vending-machine {
    grid-column: 1 / 2;
    padding: 30px 30px 30px 27px;
    background-color: $white;
  }
  .my-page {
    @include grid(null, null, 20px);
    grid-column: 2 / 3;
    width: 369px;
  }
}

//  ul.list-items-cart
.list-items-cart {
  @include itemStyle($border-main, null, $sub-color);
  overflow-y: scroll;
  padding: 12px 16px 12px 12px;

  &::-webkit-scrollbar {
    width: 4px;
  }
  &::-webkit-scrollbar-track {
    background: transparent;
  }
  &::-webkit-scrollbar-thumb {
    @include itemStyle(null, $border-r-5, rgba(255, 255, 255, 0.8));
  }

  .item-cart {
    @include itemStyle(null, $border-r-5, $white);
    overflow: hidden;
    padding: 8px 8px 8px 10px;
  }
  .item-cart + .item-cart {
    margin-top: 6px;
  }
  .img-item {
    width: 18px;
    height: 33px;
  }
  .tit-item {
    @include fontStyle(null, $font-9, null, 33px);
    margin-left: 10px;
  }
  .num-counter {
    @include itemStyle($border-main, $border-r-5);
    float: right;
    width: 31px;
    height: 31px;
    text-align: center;
    line-height: 30px;
  }
}

// section.vending-machine
.vending-machine {
  .list-items {
    @include grid(repeat(3, 96px), repeat(2, minmax(136px, auto)), 12px);
    li {
      @include itemStyle(null, $border-r-10, null, $shadow-25);

      &.selected {
        position: relative;
      }
      &.selected::after {
        @include itemAfter(-3px, -3px, -3px, -3px);
        border: 3px solid $main-color;
      }
      &.sold-out {
        position: relative;

        &::after {
          @include itemAfter;
          background: url("../img/Sold-out.png") no-repeat center center
            rgba(0, 0, 0, 0.8);
          background-size: 70%;
        }
      }
    }

    .btn-item {
      @include flex(column, center, space-between);
      @include itemStyle(null, $border-r-10, $white);
      width: 100%;
      height: 100%;
      padding: 10px 0;
      .img-item {
        width: 36px;
        height: 65px;
      }
      .tit-item {
        @include fontStyle(null, $font-9, $font-w-500);
      }
      .txt-item {
        @include itemStyle(null, 50px, $main-color);
        @include fontStyle($white, $font-12);
        width: 70px;
        padding: 5px 0;
      }
    }
  }
}

.vending-machine {
  .cont-mycart {
    @include grid(204px 96px, 33px 33px 106px, 12px);
    margin-top: 20px;
    .cart-mycart__col-left {
      @include itemStyle(null, $border-r-5);
      @include fontStyle(null, $font-14, null, 20px);
      padding: 6px 10px 7px;
    }
    .info-balance {
      overflow: hidden;
      background-color: $sub-color;
      .txt-balance {
        float: right;
      }
    }
    .inp-insert {
      border: $border-main;
      background: $white;

      &::placeholder {
        @include fontStyle(#bdbdbd, $font-13, null);
      }
    }
    .cart-mycart__col-right {
      @include itemStyle(null, $border-r-5, $white, $shadow-25);
      @include fontStyle(null, $font-13);
      padding: 6px 0 7px;
    }
    .btn-get {
      @include itemStyle(null, null, $main-color, $shadow-50);
      @include fontStyle($white, null, $font-w-700);
    }
  }
}

// section.my-page
.my-page {
  .cont-mymoney {
    padding: 9px 27px;
    background-color: $white;
    .info-mymoney {
      @include itemStyle(null, $border-r-5, $sub-color);
      @include fontStyle(null, $font-14, null, 20px);
      overflow: hidden;
      padding: 6px 10px;
    }
    .txt-mymoney {
      float: right;
      font-weight: $font-w-700;
    }
  }
  .cont-myitems {
    overflow: hidden;
    padding: 25px 27px;
    background-color: $white;
    text-align: center;
    .tit-myitems {
      @include fontStyle(null, $font-14, null, 20px);
    }
    .list-items-cart {
      @include itemStyle(null, $border-r-5);
      height: 378px;
      margin: 13px 0 6px;
      text-align: left;
    }
  }
  .tit-total {
    @include fontStyle(null, $font-12, null, 17px);
    float: right;
  }
}

@media screen and (max-width: $media-w-md) {
  #app {
    .vending-machine {
      grid-row: 1 / 2;
    }
    .my-page {
      grid-column: 1 / 2;
      grid-row: 2 / 3;
    }
  }
}

@media screen and (max-width: $media-w-sm) {
  #app {
    gap: 0;
    margin: 16px 0 0;
    .vending-machine {
      grid-row: 1 / 2;
      padding-bottom: 20px;
    }
    .my-page {
      row-gap: 0;
      grid-column: 1 / 2;
      grid-row: 2 / 3;
      .cont-mymoney {
        padding: 0 27px;
      }
      .cont-myitems {
        padding: 41px 27px;
      }
    }
  }
}

๐Ÿ“Œ ์•ก์…˜ ํ”Œ๋žœ ๋Œ์•„๋ณด๊ธฐ(4์ฃผ์ฐจ)

1์ˆœ์œ„ : ๋šœ๋ ทํ•œ ๋ชฉํ‘œ ์„ค์ •

  • ํ•™์Šต ์„ธ๋ถ€ ๊ณ„ํš
    => ์ฐจ๊ทผ์ฐจ๊ทผ ์ง„ํ–‰์ค‘
  • ์ทจ์—… ๋ฐฉํ–ฅ์„ฑ
    => ์–ด๋ ต๊ตฌ๋งŒ... ๊ทธ๋ƒฅ ์žฌ๋ฏธ์žˆ๊ฒŒ ์ผํ•  ์ˆ˜ ์žˆ๋Š” ๊ณณ์œผ๋ฉด ๋”ํ• ๋‚˜์œ„ ์—†์ด ์ข‹์„๋“ฏ ์‹ถ์€๋ฐ... ๊ทธ๋Ÿฐ๋ฐ ์ด์ œ ๋†’์€ ์—ฐ๋ด‰์„ ๊ณ๋“ค์ธ

2์ˆœ์œ„ : ์ˆ˜์—… ๋‚ด์šฉ ์ž˜ ์ •๋ฆฌํ•˜๊ธฐ

  • TIL ์ž‘์„ฑ
    => ์ด๋ฒˆ์ฃผ๋Š” ๋งŽ์ด ๋ฐ€๋ ธ๋„ค์š”
  • commit
    => ์ž์ฃผ ํ•˜๋Š” ์ค‘!
  • ์‹ค์Šต ํ•œ ๋ฒˆ ๋” ํ•ด๋ณด๊ธฐ
    => ์ตœ๋Œ€ํ•œ ๋งŽ์ด ์‹ค์Šต ๋„์ „!
  • ์ ๊ทน์ ์ธ ์งˆ๋ฌธ
    => ๊ฐœ์ธ์ ์ธ ๋ฉ”์‹œ์ง€๋กœ ์งˆ๋ฌธ ๊ฐ€๋Šฅ
    => ๋‹จ์ฒด ์ฑ„ํŒ…์— ์งˆ๋ฌธ ๋ถˆ๊ฐ€๋Šฅ ํ—ˆํ—ˆ

3์ˆœ์œ„ : ์ฒด๋ ฅ ๊ด€๋ฆฌ

  • ์ˆ˜๋ฉด์‹œ๊ฐ„ ์ง€ํ‚ค๊ธฐ
    => ์ œ์ผ ์ง€ํ‚ค๊ธฐ ์–ด๋ ต์Šต๋‹ˆ๋‹ค๋งŒ...
  • ์šด๋™ ๊พธ์ค€ํžˆ
    => ์ด๋ฒˆ์ฃผ๋Š” ์ƒํƒœ๊ฐ€ ์ข‹์ง€ ๋ชปํ–ˆ์Šต๋‹ˆ๋‹ค

๐Ÿ“Œ ์ง€๋‚œ ์ฃผ ๋ชฉํ‘œ ๋‹ฌ์„ฑ ์—ฌ๋ถ€

  • ์ง€๋‚œ ์ฃผ ๋ชฉํ‘œ ์ด์–ด๊ฐ€๊ธฐ
    • ์ตœ์†Œํ•œ์˜ ์ˆ˜๋ฉด ์‹œ๊ฐ„ ์ง€ํ‚ค๊ธฐ
      => ์•ก์…˜ํ”Œ๋žœ 3์ˆœ์œ„ ์ฐธ๊ณ ...๐Ÿฅฒ
    • Notion์— ์˜ฌ๋ผ์™€ ์žˆ๋Š” ๊ณผ์ œ ์ฐจ๊ทผ์ฐจ๊ทผ ๋ฟŒ์‹œ๊ธฐ (๋‹จ, ๋‚˜๋Š” ๋ฟŒ์…”์ง€๋ฉด ์•ˆ๋จ)
      => Notion์— ์žˆ๋Š” ๊ณผ์ œ๋Š” ์•„๋‹ˆ์ง€๋งŒ Vending Machine : SCSS ์ž‘์„ฑ
  • ์ฃผ๋ง์— ๊ณต๋ถ€ํ•  ๋ชฉ๋ก ์ž‘์„ฑํ•˜๊ธฐ
    => ๋ฌด์ž‘์ • ๋ชฉ๋ก ์ž‘์„ฑํ•˜์ง€ ์•Š๋„๋ก ํ•ด์•ผ๊ฒ ๋‹ค. ํ•ด๋ณด๊ณ  ์‹ถ์€๊ฑด ๋งŽ์€๋ฐ ์‹œ๊ฐ„๋„ ๋ถ€์กฑํ•˜๊ณ  ์ œ์ผ ๋ถ€์กฑํ•œ ๊ฒƒ์€ ๋‚ด ์ฒด๋ ฅ๊ณผ ์ˆ˜๋ฉด์ด๋‹ค.

๐Ÿ“Œ 11์›” 29์ผ(์›”) ~ 12์›” 05์ผ(์ผ) ๋ชฉํ‘œ

  • ๋‚ด๊ฐ€ ํ•˜๊ณ ์‹ถ์€ ๊ฒƒ๊ณผ ํ•ด์•ผํ•˜๋Š” ๊ฒƒ ์ž˜ ๊ตฌ๋ถ„ํ•ด์„œ ์ฃผ๋ง์— ๊ณต๋ถ€ํ•  ๋ชฉ๋ก ์ž‘์„ฑํ•ด์„œ ์‹ค์ฒœํ•˜๊ธฐ
  • ๋ชจ๋˜ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ๊ณต๋ถ€ํ•˜๊ธฐ
    => ์Šคํ„ฐ๋””๋ฅผ ํ•ด๋ณด๊ณ  ์‹ถ์€๋ฐ ์ž˜ ์ฐธ์—ฌํ•  ์ˆ˜ ์žˆ์„์ง€ ํ™•์‹ ์ด ๋“ค์ง€ ์•Š๋Š”๋‹ค.
    => ์ผ๋‹จ ํ˜ผ์ž ๊ณต๋ถ€ ํ•ด๋ณธ๋‹ค.

๋งˆ๋ฌด๋ฆฌ

  • ์ด๋ฒˆ์ฃผ๋Š” TIL์ด ๋งŽ์ด ๋ฐ€๋ ธ๋‹ค.
    • ์ด์œ 1 : ๋งŽ์ด ํ”ผ๊ณคํ–ˆ๋‹ค.
    • ์ด์œ 2 : TIL์„ ์ž‘์„ฑ ๋ฐฉ๋ฒ•?
      => ์‹œ๊ฐ„์ด ์˜ค๋ž˜๊ฑธ๋ฆฌ๋Š” ํŽธ์ด์ง€๋งŒ ๊ทธ๋ž˜๋„ ๊ผผ๊ผผํ•˜๊ฒŒ ์ž‘์„ฑํ•˜๊ณ  ์‹ถ๋‹ค.
    • ์ด์œ 3 : ์ˆ˜์—…์‹œ๊ฐ„์—๋„ ๋ฐ”์‚ ์ž‘์„ฑํ•ด์•ผํ•˜๋Š”๋ฐ ์ข€ ๋œ ๋ฐ”์˜๊ฒŒ ์ž‘์„ฑํ•œ ๊ฒƒ ๊ฐ™๋‹ค.

=> ๊ฑฐ ์‚ด๋‹ค๋ณด๋ฉด TIL ์ด๋Ÿฐ๊ฑฐ ์ข€ ๋ฐ€๋ฆด ์ˆ˜ ์žˆ์ง€ ๋ญ, ์–ด์งœํ”ผ ๊ณ„์† ์ฑ„์šธ๊ฑด๋ฐ ๋ญ๊ฐ€ ๋ฌธ์ œ๋ƒ์•„์•„

  • ํ•˜๊ณ ์‹ถ์€ ๊ฒƒ๋“ค์ด ์ ์  ๋งŽ์•„์ง€๋Š”๋ฐ ์ด๊ฑธ ์–ด๋–ป๊ฒŒ ํ•ด์•ผ ํ•˜๋‚˜?
  • ์ฑ…์„ ๊ตฌ๋งคํ•ด๋ณด์•˜์Šต๋‹ˆ๋‹ค. ๊ณต๋ถ€ํ•  ์ฑ…, ๊ฐ€๋ณ๊ฒŒ ์ฝ์„ ์ฑ…, ํ•ด๋งˆ๋‹ค ๊ตฌ๋งคํ•ด์•ผ๊ฒ ๋‹ค ์‹ถ์€ ์ฑ…๊นŒ์ง€ ์ด 3๊ถŒ
    => ์˜ˆ์Šค24 ๊ตฟ์ฆˆ๋„ ํžˆํžˆ
    => ํŒจ๋”ฉ ์Šฌ๋ฆฌํผ ์˜ˆ์—์—์—

0๊ฐœ์˜ ๋Œ“๊ธ€