[TIL] DAY5 블록체인 기초 / SCSS JS

박동우·2023년 3월 21일

블록체인 스쿨 3기

목록 보기
7/72

[TIL] 2023-03-21 DAY5

블록체인 기초

  • 코인 베이스 거래 : 보내는 사람은 없고 받는 사람만 있음 -> 블록 생성 보상(채굴) + 수수료 보상이 채굴자의 지갑으로 가는 거래

  • bits : target(난이도)을 조정하는 값 -> 작업 난이도는 블록헤더 정보 중에서 비츠값으로 조절된다. 2016개 블록마다 난이도를 조정한다고 하면 2016개의 블록 비츠는 똑같음.

SCSS

기존 css에서 media 함수로 사용 가능

$pc: 1280px;

@mixin responsive($device) {
  @if $device == "pc" {
    @media (min-width: $pc) {
      @content;
    }
  }
}


.ellipsis {
        width: 24px;
        margin-left: 16px;

        @include responsive("pc") {
          display: none;
        }

-> @mixin(@include로 사용)

* responsive.scss
@mixin responsive($device) {
  @if $device == "tablet" {
    @media (min-width: $tablet) {
      @content;
    }
  }

  @if $device == "laptop" {
    @media (min-width: $laptop) {
      @content;
    }
  }

  @if $device == "pc" {
    @media (min-width: $pc) {
      @content;
    }
  }
}


* input.scss
@import "responsive";

body {
  margin: 0;
  background-color: lightpink;
  @include responsive("tablet") {
    background-color: chartreuse;
  }
  @include responsive("laptop") {
    background-color: blue;
  }
  @include responsive("pc") {
    background-color: orange;
  }
}

JS

  • 변수선언
    var -> 전역 범위(재선언 가능)
    let -> 지역 범위(+재선언 불가)
    const -> 값 고정(+재선언 불가)

  • JSON
    JSON(JavaScript Object Notation)은 속성-값 쌍(attribute–value pairs), 배열 자료형(array data types) 또는 기타 모든 시리얼화 가능한 값(serializable value) 또는 "키-값 쌍"으로 이루어진 데이터 오브젝트를 전달하기 위해 인간이 읽을 수 있는 텍스트를 사용하는 개방형 표준 포맷이다.

profile
HELLO!

0개의 댓글