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.

ProfileCardList.vue 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template lang="pug">
  2. section.profile-card-list.xs12.w-flex
  3. article.w-flex.xs-col.sm-row.sm-wrap
  4. ProfileCard.match-layout(
  5. :aspects='aspects'
  6. :card='card'
  7. :is-list='true'
  8. :key='`${card.pid}-${i}`'
  9. v-for='(card, i) in cards'
  10. )
  11. w-button.pa8.more-results(
  12. @click='loadMoreResults()'
  13. bg-color='primary'
  14. )
  15. </template>
  16. <script setup>
  17. import { ref } from 'vue'
  18. import { cardAspects } from '../entities'
  19. import ProfileCard from './ProfileCard.vue'
  20. const aspects = ref(cardAspects)
  21. const emit = defineEmits(['loadMore'])
  22. const props = defineProps({
  23. cards: {
  24. type: [Object, Array],
  25. default: () => [
  26. {
  27. pid: '1',
  28. name: 'Full Name',
  29. avatar: 'https://hips.hearstapps.com/hmg-prod.s3.amazonaws.com/images/newborn-baby-boy-sleeping-peacefully-wearing-knit-royalty-free-image-1589459736.jpg?crop=0.669xw:1.00xh;0.228xw,0&resize=640:*',
  30. metadata: { age: '21', rawMetadata: 'Some Text Here!' },
  31. role: 'more filler',
  32. ethnicity: 'some background',
  33. },
  34. ],
  35. },
  36. })
  37. const loadMoreResults = () => {
  38. emit('loadMore')
  39. } // TODO update to scroll
  40. </script>
  41. <style lang="sass">
  42. @import '../assets/sass/main'
  43. .profile-card-list
  44. > header > .w-select >.primary
  45. margin-top: 0
  46. @media (min-width: $tablet)
  47. section.profile-card-list.xs12.w-flex > article
  48. display: flex
  49. flex-wrap: wrap
  50. flex-direction: row
  51. @media (max-width: $tablet)
  52. section.profile-card-list.xs12.w-flex > article
  53. display: flex
  54. flex-wrap: wrap
  55. flex-direction: column
  56. .more-results
  57. margin-bottom: 2em
  58. </style>