aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/menu/avatar-notification.component.scss
blob: 2ca7f24dca41ecb33ac04e63903ddb6b22be30c7 (plain) (blame)
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
@import '_variables';
@import '_mixins';

::ng-deep {
  .popover-notifications.popover {
    max-width: none;
    left: 7px !important;

    .popover-body {
      padding: 0;
      font-size: 14px;
      font-family: $main-fonts;
      width: 400px;
      box-shadow: 0 6px 14px rgba(0, 0, 0, 0.30);

      .loader {
        display: flex;
        align-items: center;
        justify-content: center;

        padding: 5px 0;
      }

      .content {
        max-height: 150px;
        transition: max-height 0.15s ease-out;
        display: flex;
        height: 500px;
        flex-direction: column;

        &.loaded {
          max-height: 500px;
        }

        & > my-user-notifications:nth-child(2) {
          overflow-y: auto;
        }
      }

      .notifications-header {
        display: flex;
        justify-content: space-between;

        background-color: rgba(0, 0, 0, 0.10);
        align-items: center;
        padding: 0 10px;
        font-size: 16px;
        min-height: 50px;

        a {
          @include disable-default-a-behaviour;
        }
        
        button {
          @include peertube-button;
        
          padding: 0;
          background: transparent;
        }

        a, button {
          color: rgba(20, 20, 20, 0.5);

          &:hover:not(:disabled) {
            color: rgba(20, 20, 20, 0.8);
          }
        }
      }

      .all-notifications {
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: $font-semibold;
        color: $fg-color;
        padding: 7px 0;
        margin-top: auto;
        text-decoration: none;
      }
    }
  }
}

.notification-avatar {
  cursor: pointer;
  position: relative;

  img,
  .unread-notifications {
    margin-left: 20px;
  }

  img {
    @include avatar(34px);

    margin-right: 10px;
  }

  .unread-notifications {
    position: absolute;
    top: -5px;
    left: -5px;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: var(--mainColor);
    color: var(#fff);
    font-size: 10px;
    font-weight: $font-semibold;

    border-radius: 15px;
    width: 15px;
    height: 15px;
  }
}

@media screen and (max-width: $mobile-view) {
  ::ng-deep {
    .popover-notifications.popover {
      left: unset !important;

      .arrow {
        left: calc(2em + 7px);
      }

      .popover-body {
        width: 100vw;
      }
    }
  }
}