HomeBody.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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..."/>
  11. <input class="form-control" type="text" placeholder="Username..."/>
  12. <input class="form-control" type="password" placeholder="Password..."/>
  13. <div class="g-recaptcha" data-sitekey="6Ld5jygTAAAAAEi0E1IwovUuVFhZKctMvKnY553W"></div>
  14. </div>
  15. <div class="modal-footer">
  16. <button type="button" class="btn btn-primary" data-dismiss="modal">Submit</button>
  17. </div>
  18. </div>
  19. </div>
  20. </div>
  21. <div class="group" v-for="group in groups">
  22. <div class="group-title">{{group.name}}</div>
  23. <div class="group-rooms">
  24. <div class="rooms-room" v-for="room in group.rooms" @click="this.$dispatch('switchView', 'home', 'station');">
  25. <img class="room-image" :src="room.thumbnail" />
  26. <div class="room-info">
  27. <div class="room-grid-left">
  28. <h3>{{ room.name }}</h3>
  29. <p>{{ room.description }}</p>
  30. </div>
  31. <div class="room-grid-right">
  32. <div>{{ room.users }}&nbsp;&nbsp;<i class="fa fa-user" aria-hidden="true"></i></div>
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. </template>
  39. <script>
  40. export default {
  41. data() {
  42. return {
  43. groups: [
  44. {
  45. id: "lu08gw56571r4497wrk9",
  46. name: "Official Rooms",
  47. rooms: [
  48. { 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 },
  49. { id: "enxcysmhn1k7ld56ogvi", thumbnail: "http://66.media.tumblr.com/1734069af425e491fae7deae0a19869f/tumblr_o0i0xmIYrF1v421f2o1_1280.jpg", name: "Pop", description: "Sia - Cheap Thrills", users: 14 },
  50. { 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 },
  51. { 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 }
  52. ]
  53. },
  54. {
  55. id: "g2b8v03xaedj8ht1emi",
  56. name: "Trending Rooms",
  57. rooms: [
  58. { 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 },
  59. { id: "enxcysmhn1k7ld56ogvi", thumbnail: "http://66.media.tumblr.com/1734069af425e491fae7deae0a19869f/tumblr_o0i0xmIYrF1v421f2o1_1280.jpg", name: "Pop", description: "Sia - Cheap Thrills", users: 14 },
  60. { 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 },
  61. { 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 }
  62. ]
  63. }
  64. ]
  65. }
  66. },
  67. methods: {
  68. log: thing => {
  69. console.log(thing);
  70. }
  71. }
  72. }
  73. </script>
  74. <style lang="sass" scoped>
  75. .g-recaptcha {
  76. display: flex;
  77. justify-content: center;
  78. margin-top: 10px;
  79. }
  80. .group {
  81. width: 100%;
  82. height: 448px;
  83. margin: 64px 0 64px 0;
  84. .group-title {
  85. float: left;
  86. clear: none;
  87. width: 100%;
  88. height: 64px;
  89. line-height: 48px;
  90. text-align: center;
  91. font-size: 48px;
  92. }
  93. .group-rooms {
  94. white-space: nowrap;
  95. text-align: center;
  96. overflow: hidden;
  97. float: left;
  98. clear: none;
  99. width: 100%;
  100. height: 384px;
  101. .rooms-room {
  102. position: relative;
  103. top: 16px;
  104. display: inline-block;
  105. clear: none;
  106. width: 256px;
  107. height: 345px;
  108. margin: 0 16px 0 16px;
  109. box-shadow: 0 1px 6px 2px rgba(0, 0, 0, 0.25);
  110. cursor: pointer;
  111. .room-info {
  112. display: flex;
  113. flex-direction: row;
  114. align-items: center;
  115. padding: 5px;
  116. }
  117. .room-image {
  118. width: 100%;
  119. height: 256px;
  120. }
  121. .room-grid-left {
  122. display: flex;
  123. flex-direction: column;
  124. width: 75%;
  125. text-align: left;
  126. padding-left: 10px;
  127. h3, p {
  128. margin: 0;
  129. white-space: normal;
  130. }
  131. }
  132. .room-grid-right {
  133. display: flex;
  134. flex-direction: column;
  135. width: 25%;
  136. }
  137. }
  138. }
  139. }
  140. </style>