aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_card/user_card.vue
blob: dd14d1b4371f90a602a95e400dc81e57b42f7338 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<template>
  <div class="card base00-background">
    <a href="#">
      <img @click.prevent="toggleUserExpanded" class="avatar" :src="user.profile_image_url">
    </a>
    <div class="usercard" v-if="userExpanded">
      <user-card-content :user="user" :switcher="false"></user-card-content>
    </div>
    <div class="name-and-screen-name" v-else>
      <div class="user-name">
        {{ user.name }}
        <span class="follows-you" v-if="!userExpanded && showFollows && user.follows_you">
            {{ $t('user_card.follows_you') }}
        </span>
      </div>
      <a :href="user.statusnet_profile_url" target="blank"><div class="user-screen-name">@{{ user.screen_name }}</div></a>
    </div>
  </div>
</template>

<script src="./user_card.js"></script>

<style lang="scss">
  .name-and-screen-name {
    margin-left: 0.7em;
    margin-top:0.0em;
    margin-right: 2em;
    text-align: left;
    width: 100%;
  }

  .follows-you {
    margin-left: 2em;
    float: right;
  }

  .follows {

  }

  .card {
    display: flex;
    flex: 1 0;
    padding-top: 0.6em;
    padding-right: 1em;
    padding-bottom: 0.6em;
    padding-left: 1em;
    border-bottom: 1px solid;
    margin: 0;
    border-bottom-color: inherit;


    .avatar {
      margin-top: 0.2em;
      width:32px;
      height: 32px;
      border-radius: 50%;
    }
  }

  .usercard {
    width: fill-available;
    margin: 0.2em 0 0.7em 0;
    border-radius: 10px;
    border-style: solid;
    border-color: inherit;
    border-width: 1px;
    overflow: hidden;

    p {
      margin-bottom: 0;
    }
  }
</style>