JWT 설계
2021. 12. 15. 09:38
Web/웹운영
서버에서 토큰을 임의로 만들고 쿠키에 저장 로그인아웃 상태는 0로 쿠키에 저장 (로그인 유무는 islogin 상태값 0, 1로 판별) 로그인한 사용자에게 임의 토큰을 부여하고 쿠키에 저장 로그인 상태 1로 변환하고 쿠키에 저장 로그인된 토큰은 함께 서버로 보낸다. 서버는 로그인한 사용자에게 uuid(유저 고유식별번호)를 부여하고 맞는 데이터를 각 페이지마다 뿌려준다. 클라이언트에서 서버와 통신방법 //get 방식 const res = await axios.get(URL, { headers: { 'content-type': 'application/json', Authorization: `Bearer +${token}` }, }) //post 방식 const res = await axios.post( URL..
![thumbnail](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FdO3i3n%2FbtrnDFsXFuZ%2FyQSDf3oO39A3fDKe9heTaK%2Fimg.png)
CSS) justify-content: space-between 해도 센터가 안 맞을떄
2021. 12. 12. 17:22
Frontend/HTML, CSS, DOM, jQuery
issue justify-content: space-between 플렉스를 써도 시간이 안 중앙이 안될 수도 있음 이유는 왼쪽과 오른쪽 div의 너비가 다르기 때문에 solution style.css .status-bar{ display:flex; justify-content: center; } .status-bar__column{ width:33%; } .status-bar__column:nth-child(2){ display:flex; justify-content: center; } .status-bar__column:last-child{ display:flex; justify-content: flex-end; } status-bar = [ status-bar_column 3개 ] 된 구조
![thumbnail](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fp1UjI%2FbtrnBsg4nIa%2FvJ1IRVE2xYa5uzpW8WUJV0%2Fimg.png)
CSS) BEM (Class 이름 네이밍 방법)
2021. 12. 12. 11:01
Frontend/HTML, CSS, DOM, jQuery
BEM 속성 표시할때는 ' -- ' 부모 자식 관계 표시할 때는 ' __ ' 참고 사이트 https://css-tricks.com/bem-101/ BEM 101 The following is a collaborative post by guest Joe Richardson, Robin Rendle, and a bunch of the CSS-Tricks staff. Joe wanted to do a post about BEM, which we loved, and just about everybody around … css-tricks.com
![thumbnail](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FwYjZN%2FbtrnFaMMl7T%2F4VHWk8SkROZCeT5Fm3h5C0%2Fimg.png)
HTML) 주요 단축키
2021. 12. 12. 08:51
Frontend/HTML, CSS, DOM, jQuery
prettier가 설치되어 있어야 한다. 1. 빠르게 HTML 기본 폼 셋팅하기 ! 2. 빠르게 html과 css 연결하기 link:css 3. 빠르게 태그 만들기 자식, 여러개 태그 한번에 nav>ul>li*4>a