You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

home.vue 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <div id="home">
  3. <div class="content-wrapper">
  4. <div class="content">
  5. <main-header />
  6. <profile-cards :uid="uid" :users="swipables" />
  7. </div>
  8. </div>
  9. <sidebar />
  10. </div>
  11. </template>
  12. <script>
  13. import mainHeader from '../shared/MainHeader.vue'
  14. import sidebar from '../shared/Sidebar.vue'
  15. import profileCards from '../components/TinderCard.vue'
  16. export default {
  17. name: "home",
  18. components: { mainHeader, profileCards, sidebar },
  19. data() {
  20. return {
  21. swipables: [],
  22. uid: "",
  23. };
  24. },
  25. created() {
  26. // this.uid = auth.currentUser?.uid || "99999";
  27. this.uid = "99999"
  28. this.getUsers()
  29. },
  30. methods: {
  31. getUsers() {
  32. const users = []
  33. this.swipables = users.filter(u => (u.id = Date.now() + (Math.random() * 100000).toFixed()))
  34. },
  35. },
  36. };
  37. </script>
  38. <style lang="postcss">
  39. html
  40. background-color: #f9f9f9
  41. .wrapper
  42. position: relative
  43. .content
  44. margin-left: 320px
  45. clear: both
  46. overflow: auto
  47. background: #f9f9ff
  48. min-height: 100vh
  49. &-wrapper
  50. float: right
  51. width: 100%
  52. @media only screen and (max-width: 768px)
  53. .content
  54. margin-left: 0
  55. </style>