Home.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <template>
  2. <div class="app">
  3. <main-header></main-header>
  4. <toast>
  5. Test
  6. </toast>
  7. <div class="modal fade" id="register" tabindex="-1" role="dialog" aria-labelledby="register-modal">
  8. <div class="modal-dialog" role="document">
  9. <div class="modal-content">
  10. <div class="modal-header">
  11. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  12. <h5 class="modal-title">Register</h5>
  13. </div>
  14. <div class="modal-body">
  15. <input class="form-control" type="text" placeholder="Email..." v-model="$parent.register.email"/>
  16. <input class="form-control" type="text" placeholder="Username..." v-model="$parent.register.username"/>
  17. <input class="form-control" type="password" placeholder="Password..." v-model="$parent.register.password"/>
  18. <div class="g-recaptcha" data-sitekey="6LdNCQcUAAAAANj_w5leQSrxnAmDp2ioh4alkUHg"></div>
  19. </div>
  20. <div class="modal-footer">
  21. <button type="button" class="btn btn-primary" data-dismiss="modal" @click="this.$dispatch('register');">Submit</button>
  22. </div>
  23. </div>
  24. </div>
  25. </div>
  26. <div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="login-modal">
  27. <div class="modal-dialog" role="document">
  28. <div class="modal-content">
  29. <div class="modal-header">
  30. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  31. <h5 class="modal-title">Login</h5>
  32. </div>
  33. <div class="modal-body">
  34. <input class="form-control" type="text" placeholder="Email..." v-model="$parent.login.email"/>
  35. <input class="form-control" type="password" placeholder="Password..." v-model="$parent.login.password"/>
  36. <hr />
  37. <a class="btn btn-block btn-default btn-github" href="/users/github"><i class="fa fa-github"></i> Login with GitHub</a>
  38. <a class="btn btn-block btn-default btn-discord" href="/users/discord">Login with Discord</a>
  39. </div>
  40. <div class="modal-footer">
  41. <button type="button" class="btn btn-primary" data-dismiss="modal" @click="this.$dispatch('login');">Submit</button>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. <div class="group" v-for="group in $parent.groups">
  47. <div class="group-title">{{group.name}}</div>
  48. <div class="group-rooms">
  49. <div class="rooms-room" v-for="room in group.rooms" v-link="{ path: '/station' }">
  50. <img class="room-image" :src="room.thumbnail" />
  51. <div class="room-info">
  52. <div class="room-grid-left">
  53. <h3>{{ room.name }}</h3>
  54. <p>{{ room.description }}</p>
  55. </div>
  56. <div class="room-grid-right">
  57. <div>{{ room.users }}&nbsp;&nbsp;<i class="fa fa-user" aria-hidden="true"></i></div>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. <main-footer></main-footer>
  64. </div>
  65. </template>
  66. <script>
  67. import MainHeader from '../MainHeader.vue'
  68. import MainFooter from '../MainFooter.vue'
  69. import Toast from 'vue-roaster/src/Toast.vue'
  70. export default {
  71. components: { MainHeader, MainFooter, Toast }
  72. }
  73. </script>
  74. <style lang="sass">
  75. * { box-sizing: border-box; font-family: Roboto, sans-serif; }
  76. html {
  77. width: 100%;
  78. height: 100%;
  79. color: rgba(0, 0, 0, 0.87);
  80. body {
  81. width: 100%;
  82. height: 100%;
  83. margin: 0;
  84. padding: 0;
  85. }
  86. }
  87. @media only screen and (min-width: 1200px) {
  88. html {
  89. font-size: 15px;
  90. }
  91. }
  92. @media only screen and (min-width: 992px) {
  93. html {
  94. font-size: 14.5px;
  95. }
  96. }
  97. @media only screen and (min-width: 0) {
  98. html {
  99. font-size: 14px;
  100. }
  101. }
  102. .g-recaptcha {
  103. display: flex;
  104. justify-content: center;
  105. margin-top: 10px;
  106. }
  107. .group {
  108. width: 100%;
  109. height: 448px;
  110. margin: 64px 0 64px 0;
  111. .group-title {
  112. float: left;
  113. clear: none;
  114. width: 100%;
  115. height: 64px;
  116. line-height: 48px;
  117. text-align: center;
  118. font-size: 48px;
  119. }
  120. .group-rooms {
  121. white-space: nowrap;
  122. text-align: center;
  123. overflow: hidden;
  124. float: left;
  125. clear: none;
  126. width: 100%;
  127. height: 400px;
  128. .rooms-room {
  129. position: relative;
  130. top: 16px;
  131. display: inline-block;
  132. clear: none;
  133. width: 256px;
  134. height: 370px;
  135. margin: 0 16px 0 16px;
  136. box-shadow: 0 1px 6px 2px rgba(0, 0, 0, 0.25);
  137. cursor: pointer;
  138. .room-info {
  139. display: flex;
  140. flex-direction: row;
  141. align-items: center;
  142. }
  143. .room-image {
  144. width: 100%;
  145. height: 256px;
  146. }
  147. .room-grid-left {
  148. display: flex;
  149. flex-direction: column;
  150. width: 75%;
  151. text-align: left;
  152. padding-left: 10px;
  153. h3, p {
  154. margin: 0;
  155. white-space: normal;
  156. padding-top: 10px;
  157. }
  158. }
  159. .room-grid-right {
  160. display: flex;
  161. flex-direction: column;
  162. width: 25%;
  163. }
  164. }
  165. }
  166. }
  167. .btn-github {
  168. background-color: #333;
  169. color: #fff;
  170. border: 0;
  171. &:hover, &:active, &:focus {
  172. background-color: darken(#333, 5%);
  173. color: #fff;
  174. }
  175. }
  176. .btn-discord {
  177. background-color: #7289DA;
  178. color: #fff;
  179. border: 0;
  180. &:hover, &:active, &:focus {
  181. background-color: darken(#7289DA, 5%);
  182. color: #fff;
  183. }
  184. }
  185. </style>