|
| 1 | +<template> |
| 2 | + <div> |
| 3 | + <div class="book-container"> |
| 4 | + <div class="book-item book-style-vueonrails" v-bind:class="classObject" v-on:click="flipBook"> |
| 5 | + <div class="book-front"> |
| 6 | + <div class="book-cover-back"></div> |
| 7 | + <div class="book-cover"> |
| 8 | + <div class="book-cover-content"> |
| 9 | + <h2 class="font-weight-light display-5">Vue on Rails</h2> |
| 10 | + <hr class="w-25"> |
| 11 | + <span class="font-weight-light small">Discover how to build delightful web app using Vue.js and Ruby on Rails</span> |
| 12 | + </div> |
| 13 | + </div> |
| 14 | + </div> |
| 15 | + <div class="book-page"> |
| 16 | + <div class="book-content book-content-current"> |
| 17 | + <div class="logo d-flex justify-content-center mx-auto mb-3"> |
| 18 | + <div class="logo-text align-self-center">VR</div> |
| 19 | + </div> |
| 20 | + <p class="lead"> |
| 21 | + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. |
| 22 | + </p> |
| 23 | + </div> |
| 24 | + </div> |
| 25 | + <div class="book-back"> |
| 26 | + <div class="bg-light py-3 mt-5"> |
| 27 | + <div class="logo d-flex justify-content-center mx-auto"> |
| 28 | + <div class="logo-text align-self-center">VR</div> |
| 29 | + </div> |
| 30 | + </div> |
| 31 | + <p class="text-center text-light small py-4 px-4"> |
| 32 | + Explain the concept of Rails first & Vue first-class approach |
| 33 | + <i class="text-dark mx-1">•</i> Build some real-world applications with Vue on Rails |
| 34 | + <i class="text-dark mx-1">•</i> Scaffold a Vue component and get up to speed quickly |
| 35 | + <i class="text-dark mx-1">•</i> Explore different ways to deploy Vue Component |
| 36 | + <i class="text-dark mx-1">•</i> Make frustration-free configuration for Vue on Rails |
| 37 | + <i class="text-dark mx-1">•</i> Learn enough Vue to be dangerous |
| 38 | + <i class="text-dark mx-1">•</i> Deploying & Testing |
| 39 | + </p> |
| 40 | + </div> |
| 41 | + <div class="book-right"></div> |
| 42 | + <div class="book-left"> |
| 43 | + <div class="book-left-content"> |
| 44 | + <div class="d-flex justify-content-between align-items-center h-100 px-3"> |
| 45 | + <span class="text-dark font-weight-bold">Vue on Rails</span> |
| 46 | + <span class="text-light text-right small"> |
| 47 | + <span class="mr-2">With <i class="fas fa-heart text-danger"></i> by</span> |
| 48 | + Richard LaFranchi & Bryan Lim |
| 49 | + </span> |
| 50 | + </div> |
| 51 | + </div> |
| 52 | + </div> |
| 53 | + <div class="book-top"></div> |
| 54 | + <div class="book-bottom"></div> |
| 55 | + </div> |
| 56 | + </div> |
| 57 | + |
| 58 | + <div class="mt-4" v-if="isDebug"> |
| 59 | + <button class="btn" v-on:click="flipBook">Flip</button> |
| 60 | + <button class="btn" v-on:click="openBook">Inside</button> |
| 61 | + </div> |
| 62 | + |
| 63 | + </div> |
| 64 | +</template> |
| 65 | + |
| 66 | +<script> |
| 67 | +export default { |
| 68 | + name: 'Book', |
| 69 | + data() { |
| 70 | + return { |
| 71 | + isDebug: false, |
| 72 | + viewCover: true, |
| 73 | + viewBack: false, |
| 74 | + viewInside: false |
| 75 | + }; |
| 76 | + }, |
| 77 | + computed: { |
| 78 | + classObject: function() { |
| 79 | + return { |
| 80 | + 'book-view-cover': this.viewCover && !this.viewInside, |
| 81 | + 'book-view-back': this.viewBack, |
| 82 | + 'book-view-inside': this.viewInside |
| 83 | + } |
| 84 | + } |
| 85 | + }, |
| 86 | + methods: { |
| 87 | + flipBook: function() { |
| 88 | + this.viewCover = !this.viewCover |
| 89 | + this.viewBack = !this.viewBack |
| 90 | + this.viewInside = false |
| 91 | + }, |
| 92 | + openBook: function() { |
| 93 | + if ( this.viewBack ) { |
| 94 | + this.flipBook() |
| 95 | + } |
| 96 | + this.viewInside = !this.viewInside |
| 97 | + } |
| 98 | + } |
| 99 | +}; |
| 100 | +</script> |
0 commit comments