Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- partitioning
- 파티셔닝
- frontend
- Partition
- EventSource
- 개발자
- mariadb
- SSE
- node.js란
- 열공하자
- node.js
- Lag
- Node.js기본
- PostgreSQL
- 실시간알림
- localStorage
- ServerSentEvent
- 성장기
Archives
- Today
- Total
써치킴의 우당탕탕 개발 블로그
[Vue.js][Ch4][영화검색 사이트] 스켈레톤 UI 본문
Movie.vue
<template>
<div class="container">
<div class="skeletons">
<div class="skeleton poster"></div>
<div class="specs">
<div class="skeleton title"></div>
<div class="skeleton spec"></div>
<div class="skeleton plot"></div>
<div class="skeleton etc"></div>
<div class="skeleton etc"></div>
<div class="skeleton etc"></div>
</div>
</div>
</div>
</template>
<script>
export default {
created() { // Movie 컴포넌트가 실행되면
console.log(this.$route); // 현재 페이지 주소 정보를 가져옴
this.$store.dispatch('movie/searchMovieWithId', {
// ex) movie/tt1234545
id: this.$route.params.id // 주소 부분의 파라미터에서 omdbID를 가져옴
});
}
}
</script>
<style lang="scss" scoped>
@import "~/scss/main"; /* 부트스트랩을 사용할 수 있게 import */
.container {
padding-top: 40px;
}
.skeletons {
display: flex;
.poster {
flex-shrink: 0; // 감소 너비를 사용하지 않겠다.
width: 500px;
height: 500px * 3 / 2;
margin-right: 70px;
}
.specs {
flex-grow: 1; // 증가 너비를 최대한 많이 사용하겠다.
}
.skeleton {
border-radius: 10px;
background-color: $gray-200;
&.title {
width: 80%;
height: 70px;
}
&.spec {
width: 60%;
height: 30px;
margin-top: 20px;
}
&.plot {
width: 100%;
height: 250px;
margin-top: 20px;
}
&.etc {
width: 50%;
height: 50px;
margin-top: 20px;
}
}
}
</style>
출력
'완벽하게 Vue.js' 카테고리의 다른 글
[Vue.js][Ch4][영화검색 사이트] 영화 상세 페이지 정리 (0) | 2022.04.25 |
---|---|
[Vue.js][Ch4][영화검색 사이트] Loader (0) | 2022.04.25 |
[Vue.js][Ch4][영화검색 사이트] 단일 영화 상세 정보 가져오기 (0) | 2022.04.25 |
[Vue.js][Ch4][영화검색 사이트] Footer (0) | 2022.04.25 |
[Vue.js][Ch4][영화검색 사이트] 에러 메시지 출력과 로딩 애니메이션 (0) | 2022.04.25 |
Comments