HomeBody.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <div class="modal fade" id="register" tabindex="-1" role="dialog" aria-labelledby="register-modal">
  3. <div class="modal-dialog" role="document">
  4. <div class="modal-content">
  5. <div class="modal-header">
  6. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  7. <h4 class="modal-title">Register</h4>
  8. </div>
  9. <div class="modal-body">
  10. <input class="form-control" type="text" placeholder="Email..." v-model="$parent.register.email"/>
  11. <input class="form-control" type="text" placeholder="Username..." v-model="$parent.register.username"/>
  12. <input class="form-control" type="password" placeholder="Password..." v-model="$parent.register.password"/>
  13. <div class="g-recaptcha" data-sitekey="6Lfa-wYUAAAAANY6iVvWNEXohC38l1cZqHRole9T"></div>
  14. </div>
  15. <div class="modal-footer">
  16. <button type="button" class="btn btn-primary" data-dismiss="modal" @click="this.$dispatch('register');">Submit</button>
  17. </div>
  18. </div>
  19. </div>
  20. </div>
  21. <div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="login-modal">
  22. <div class="modal-dialog" role="document">
  23. <div class="modal-content">
  24. <div class="modal-header">
  25. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  26. <h4 class="modal-title">Login</h4>
  27. </div>
  28. <div class="modal-body">
  29. <input class="form-control" type="text" placeholder="Email..." v-model="$parent.login.email"/>
  30. <input class="form-control" type="password" placeholder="Password..." v-model="$parent.login.password"/>
  31. </div>
  32. <div class="modal-footer">
  33. <button type="button" class="btn btn-primary" data-dismiss="modal" @click="this.$dispatch('login');">Submit</button>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. <div class="group" v-for="group in groups">
  39. <div class="group-title">{{group.name}}</div>
  40. <div class="group-rooms">
  41. <div class="rooms-room" v-for="room in group.rooms" @click="this.$dispatch('switchView', 'home', 'station');">
  42. <img class="room-image" :src="room.thumbnail" />
  43. <div class="room-info">
  44. <div class="room-grid-left">
  45. <h3>{{ room.name }}</h3>
  46. <p>{{ room.description }}</p>
  47. </div>
  48. <div class="room-grid-right">
  49. <div>{{ room.users }}&nbsp;&nbsp;<i class="fa fa-user" aria-hidden="true"></i></div>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. </template>
  56. <script>
  57. export default {
  58. data() {
  59. return {
  60. groups: [
  61. {
  62. id: "lu08gw56571r4497wrk9",
  63. name: "Official Rooms",
  64. rooms: [
  65. { id: "73qvw65746acvo8yqfr", thumbnail: "https://lh6.googleusercontent.com/-ghASz3s6yL4/AAAAAAAAAAI/AAAAAAAAALc/tFblPp2myu0/s0-c-k-no-ns/photo.jpg", name: "Country", description: "Johnny Cash - I Walk The Line", users: 10 },
  66. { id: "enxcysmhn1k7ld56ogvi", thumbnail: "http://66.media.tumblr.com/1734069af425e491fae7deae0a19869f/tumblr_o0i0xmIYrF1v421f2o1_1280.jpg", name: "Pop", description: "Sia - Cheap Thrills", users: 14 },
  67. { id: "kqa99gbva7lij05dn29", thumbnail: "http://www.youredm.com/wp-content/uploads/2014/09/taking-you-higher.jpg", name: "Chill", description: "MrSuicideSheep - Taking you higher", users: 13 },
  68. { id: "w19hu791iiub6wmjf9a4i", thumbnail: "http://edmsauce.wpengine.netdna-cdn.com/wp-content/uploads/2012/12/Deadmau5-album-title-goes-here.jpg", name: "EDM", description: "Deadmau5 - There Might Be Coffee", users: 13 }
  69. ]
  70. },
  71. {
  72. id: "g2b8v03xaedj8ht1emi",
  73. name: "Trending Rooms",
  74. rooms: [
  75. { id: "73qvw65746acvo8yqfr", thumbnail: "https://lh6.googleusercontent.com/-ghASz3s6yL4/AAAAAAAAAAI/AAAAAAAAALc/tFblPp2myu0/s0-c-k-no-ns/photo.jpg", name: "Country", description: "Johnny Cash - I Walk The Line", users: 10 },
  76. { id: "enxcysmhn1k7ld56ogvi", thumbnail: "http://66.media.tumblr.com/1734069af425e491fae7deae0a19869f/tumblr_o0i0xmIYrF1v421f2o1_1280.jpg", name: "Pop", description: "Sia - Cheap Thrills", users: 14 },
  77. { id: "kqa99gbva7lij05dn29", thumbnail: "http://www.youredm.com/wp-content/uploads/2014/09/taking-you-higher.jpg", name: "Chill", description: "MrSuicideSheep - Taking you higher", users: 13 },
  78. { id: "w19hu791iiub6wmjf9a4i", thumbnail: "http://edmsauce.wpengine.netdna-cdn.com/wp-content/uploads/2012/12/Deadmau5-album-title-goes-here.jpg", name: "EDM", description: "Deadmau5 - There Might Be Coffee", users: 13 }
  79. ]
  80. }
  81. ]
  82. }
  83. },
  84. methods: {
  85. log(thing) {
  86. console.log(thing);
  87. }
  88. }
  89. }
  90. </script>
  91. <style lang="sass" scoped>
  92. .g-recaptcha {
  93. display: flex;
  94. justify-content: center;
  95. margin-top: 10px;
  96. }
  97. .group {
  98. width: 100%;
  99. height: 448px;
  100. margin: 64px 0 64px 0;
  101. .group-title {
  102. float: left;
  103. clear: none;
  104. width: 100%;
  105. height: 64px;
  106. line-height: 48px;
  107. text-align: center;
  108. font-size: 48px;
  109. }
  110. .group-rooms {
  111. white-space: nowrap;
  112. text-align: center;
  113. overflow: hidden;
  114. float: left;
  115. clear: none;
  116. width: 100%;
  117. height: 384px;
  118. .rooms-room {
  119. position: relative;
  120. top: 16px;
  121. display: inline-block;
  122. clear: none;
  123. width: 256px;
  124. height: 345px;
  125. margin: 0 16px 0 16px;
  126. box-shadow: 0 1px 6px 2px rgba(0, 0, 0, 0.25);
  127. cursor: pointer;
  128. .room-info {
  129. display: flex;
  130. flex-direction: row;
  131. align-items: center;
  132. padding: 5px;
  133. }
  134. .room-image {
  135. width: 100%;
  136. height: 256px;
  137. }
  138. .room-grid-left {
  139. display: flex;
  140. flex-direction: column;
  141. width: 75%;
  142. text-align: left;
  143. padding-left: 10px;
  144. h3, p {
  145. margin: 0;
  146. white-space: normal;
  147. }
  148. }
  149. .room-grid-right {
  150. display: flex;
  151. flex-direction: column;
  152. width: 25%;
  153. }
  154. }
  155. }
  156. }
  157. </style>