HomeSection.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. <template>
  2. <section id="hero">
  3. <v-parallax dark src="@/assets/img/bgHero.jpg" height="750">
  4. <v-row align="center" justify="center">
  5. <v-col cols="10">
  6. <v-row align="center" justify="center">
  7. <v-col cols="12" md="6" xl="8">
  8. <h1 class="display-2 font-weight-bold mb-4">Vuetify.js</h1>
  9. <h1 class="font-weight-light">
  10. Lorem ipsum dolor sit amet consectetur <br />
  11. adipisicing elit. Maiores porro voluptatibus <br />
  12. delectus nam optio harum!
  13. </h1>
  14. <v-btn
  15. rounded
  16. outlined
  17. large
  18. dark
  19. @click="$vuetify.goTo('#features')"
  20. class="mt-5"
  21. >
  22. Saiba mais
  23. <v-icon class="ml-2">mdi-arrow-down</v-icon>
  24. </v-btn>
  25. <div class="video d-flex align-center py-4">
  26. <a @click.stop="dialog = true" class="playBut">
  27. <svg
  28. version="1.1"
  29. xmlns="http://www.w3.org/2000/svg"
  30. xmlns:xlink="http://www.w3.org/1999/xlink"
  31. xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
  32. x="0px"
  33. y="0px"
  34. width="60px"
  35. height="60px"
  36. viewBox="0 0 213.7 213.7"
  37. enable-background="new 0 0 213.7 213.7"
  38. xml:space="preserve"
  39. >
  40. <polygon
  41. class="triangle"
  42. id="XMLID_18_"
  43. fill="none"
  44. stroke-width="7"
  45. stroke-linecap="round"
  46. stroke-linejoin="round"
  47. stroke-miterlimit="10"
  48. points="73.5,62.5 148.5,105.8 73.5,149.1 "
  49. />
  50. <circle
  51. class="circle"
  52. id="XMLID_17_"
  53. fill="none"
  54. stroke-width="7"
  55. stroke-linecap="round"
  56. stroke-linejoin="round"
  57. stroke-miterlimit="10"
  58. cx="106.8"
  59. cy="106.8"
  60. r="103.3"
  61. />
  62. </svg>
  63. </a>
  64. <p class="subheading ml-2 mb-0">Assista o vídeo</p>
  65. </div>
  66. </v-col>
  67. <v-col cols="12" md="6" xl="4" class="hidden-sm-and-down"> </v-col>
  68. </v-row>
  69. </v-col>
  70. </v-row>
  71. <div class="svg-border-waves text-white">
  72. <v-img src="@/assets/img/borderWaves.svg" />
  73. </div>
  74. </v-parallax>
  75. <v-container fluid id="features" class="mt-2">
  76. <v-row align="center" justify="center">
  77. <v-col cols="10">
  78. <v-row align="center" justify="space-around">
  79. <!-- <v-col cols="12" class="text-center">
  80. <h1 class="font-weight-light display-2">Title</h1>
  81. <h1 class="font-weight-light">
  82. Lorem ipsum dolor sit amet consectetur adipisicing elit.
  83. </h1>
  84. </v-col> -->
  85. <v-col
  86. cols="12"
  87. sm="4"
  88. class="text-center"
  89. v-for="(feature, i) in features"
  90. :key="i"
  91. >
  92. <v-hover v-slot:default="{ hover }">
  93. <v-card
  94. class="card"
  95. shaped
  96. :elevation="hover ? 10 : 4"
  97. :class="{ up: hover }"
  98. >
  99. <v-img
  100. :src="feature.img"
  101. max-width="100px"
  102. class="d-block ml-auto mr-auto"
  103. :class="{ 'zoom-efect': hover }"
  104. ></v-img>
  105. <h1 class="font-weight-regular">{{ feature.title }}</h1>
  106. <h4 class="font-weight-regular subtitle-1">
  107. {{ feature.text }}
  108. </h4>
  109. </v-card>
  110. </v-hover>
  111. </v-col>
  112. </v-row>
  113. </v-col>
  114. </v-row>
  115. </v-container>
  116. <v-dialog v-model="dialog" max-width="640px">
  117. <v-card>
  118. <youtube
  119. :video-id="videoId"
  120. @ready="ready"
  121. @playing="playing"
  122. ></youtube>
  123. </v-card>
  124. </v-dialog>
  125. <div class="svg-border-waves">
  126. <img src="~@/assets/img/wave2.svg" />
  127. </div>
  128. </section>
  129. </template>
  130. <script>
  131. export default {
  132. data() {
  133. return {
  134. dialog: false,
  135. videoId: "i8IvvHJssWE",
  136. features: [
  137. {
  138. img: require("@/assets/img/icon2.png"),
  139. title: "Design Limpo",
  140. text: "Lorem ipsum dolor sit amet consectetur adipisicing elit.",
  141. },
  142. {
  143. img: require("@/assets/img/icon1.png"),
  144. title: "Dados Seguros",
  145. text: "Lorem ipsum dolor sit amet consectetur adipisicing elit.",
  146. },
  147. {
  148. img: require("@/assets/img/icon3.png"),
  149. title: "Código Aberto",
  150. text: "Lorem ipsum dolor sit amet consectetur adipisicing elit.",
  151. },
  152. ],
  153. };
  154. },
  155. watch: {
  156. dialog(value) {
  157. if (!value) {
  158. this.pause();
  159. }
  160. },
  161. },
  162. methods: {
  163. ready(event) {
  164. this.player = event.target;
  165. },
  166. playing(event) {
  167. // The player is playing a video.
  168. },
  169. change() {
  170. // when you change the value, the player will also change.
  171. // If you would like to change `playerVars`, please change it before you change `videoId`.
  172. // If `playerVars.autoplay` is 1, `loadVideoById` will be called.
  173. // If `playerVars.autoplay` is 0, `cueVideoById` will be called.
  174. this.videoId = "another video id";
  175. },
  176. stop() {
  177. this.player.stopVideo();
  178. },
  179. pause() {
  180. this.player.pauseVideo();
  181. },
  182. },
  183. };
  184. </script>
  185. <style lang="scss">
  186. .circle {
  187. stroke: white;
  188. stroke-dasharray: 650;
  189. stroke-dashoffset: 650;
  190. -webkit-transition: all 0.5s ease-in-out;
  191. opacity: 0.3;
  192. }
  193. .playBut {
  194. /* border: 1px solid red;*/
  195. display: inline-block;
  196. -webkit-transition: all 0.5s ease;
  197. .triangle {
  198. -webkit-transition: all 0.7s ease-in-out;
  199. stroke-dasharray: 240;
  200. stroke-dashoffset: 480;
  201. stroke: white;
  202. transform: translateY(0);
  203. }
  204. &:hover {
  205. .triangle {
  206. stroke-dashoffset: 0;
  207. opacity: 1;
  208. stroke: white;
  209. animation: nudge 0.7s ease-in-out;
  210. @keyframes nudge {
  211. 0% {
  212. transform: translateX(0);
  213. }
  214. 30% {
  215. transform: translateX(-5px);
  216. }
  217. 50% {
  218. transform: translateX(5px);
  219. }
  220. 70% {
  221. transform: translateX(-2px);
  222. }
  223. 100% {
  224. transform: translateX(0);
  225. }
  226. }
  227. }
  228. .circle {
  229. stroke-dashoffset: 0;
  230. opacity: 1;
  231. }
  232. }
  233. }
  234. </style>
  235. <style>
  236. .btn-play {
  237. transition: 0.2s;
  238. }
  239. .svg-border-waves .v-image {
  240. position: absolute;
  241. bottom: 0;
  242. left: 0;
  243. height: 3rem;
  244. width: 100%;
  245. overflow: hidden;
  246. }
  247. #hero {
  248. z-index: 0;
  249. }
  250. .svg-border-waves img {
  251. position: absolute;
  252. bottom: 0;
  253. left: 0;
  254. width: 100%;
  255. margin-bottom: -2px;
  256. z-index: -1;
  257. }
  258. .card {
  259. min-height: 300px;
  260. padding: 10px;
  261. transition: 0.5s ease-out;
  262. }
  263. .card .v-image {
  264. margin-bottom: 15px;
  265. transition: 0.75s;
  266. }
  267. .card h1 {
  268. margin-bottom: 10px;
  269. }
  270. .zoom-efect {
  271. transform: scale(1.1);
  272. }
  273. .up {
  274. transform: translateY(-20px);
  275. transition: 0.5s ease-out;
  276. }
  277. </style>
  278. <style>
  279. section {
  280. position: relative;
  281. }
  282. </style>