logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git

basic_user_card.vue (1534B)


  1. <template>
  2. <div class="basic-user-card">
  3. <router-link
  4. :to="userProfileLink(user)"
  5. @click.prevent
  6. >
  7. <UserPopover
  8. :user-id="user.id"
  9. :overlay-centers="true"
  10. overlay-centers-selector=".avatar"
  11. >
  12. <UserAvatar
  13. class="user-avatar avatar"
  14. :user="user"
  15. @click.prevent
  16. />
  17. </UserPopover>
  18. </router-link>
  19. <div
  20. class="basic-user-card-collapsed-content"
  21. >
  22. <div
  23. :title="user.name"
  24. class="basic-user-card-user-name"
  25. >
  26. <RichContent
  27. class="basic-user-card-user-name-value"
  28. :html="user.name"
  29. :emoji="user.emoji"
  30. />
  31. </div>
  32. <div>
  33. <user-link
  34. class="basic-user-card-screen-name"
  35. :user="user"
  36. />
  37. </div>
  38. <slot />
  39. </div>
  40. </div>
  41. </template>
  42. <script src="./basic_user_card.js"></script>
  43. <style lang="scss">
  44. .basic-user-card {
  45. display: flex;
  46. flex: 1 0;
  47. margin: 0;
  48. --emoji-size: 14px;
  49. &-collapsed-content {
  50. margin-left: 0.7em;
  51. text-align: left;
  52. flex: 1;
  53. min-width: 0;
  54. }
  55. &-user-name {
  56. img {
  57. object-fit: contain;
  58. height: 16px;
  59. width: 16px;
  60. vertical-align: middle;
  61. }
  62. }
  63. &-user-name-value,
  64. &-screen-name {
  65. display: inline-block;
  66. max-width: 100%;
  67. overflow: hidden;
  68. white-space: nowrap;
  69. text-overflow: ellipsis;
  70. }
  71. &-expanded-content {
  72. flex: 1;
  73. margin-left: 0.7em;
  74. min-width: 0;
  75. }
  76. }
  77. </style>