aboutsummaryrefslogtreecommitdiffstats
path: root/webapp/src/app/pages/dashboard/status-card/status-card.component.scss
blob: 08abc6113b9aa1f03a34360bb09f44efb6739e7e (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
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
134
135
136
137
138
139
140
141
142
@import '../../../@theme/styles/themes';
@import '~@nebular/theme/styles/global/bootstrap/hero-buttons';

@include nb-install-component() {
  nb-card {
    flex-direction: row;
    align-items: center;
    height: 6rem;
    overflow: visible;

    $bevel: btn-hero-bevel(nb-theme(card-bg));
    $shadow: nb-theme(btn-hero-shadow);
    box-shadow: $bevel, $shadow;

    .icon-container {
      height: 100%;
      padding: 0.625rem;
    }

    .icon {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 5.75rem;
      height: 4.75rem;
      font-size: 3.75rem;
      border-radius: nb-theme(card-border-radius);
      transition: width 0.4s ease;
      transform: translate3d(0, 0, 0);
      -webkit-transform-style: preserve-3d;
      -webkit-backface-visibility: hidden;
      color: nb-theme(color-white);

      &.primary {
        @include btn-hero-primary-gradient();
        @include btn-hero-primary-bevel-glow-shadow();
      }
      &.success {
        @include btn-hero-success-gradient();
        @include btn-hero-success-bevel-glow-shadow();
      }
      &.info {
        @include btn-hero-info-gradient();
        @include btn-hero-info-bevel-glow-shadow();
      }
      &.warning {
        @include btn-hero-warning-gradient();
        @include btn-hero-warning-bevel-glow-shadow();
      }
    }

    &:hover {
      background: lighten(nb-theme(card-bg), 5%);

      .icon {
        &.primary {
          background-image: btn-hero-primary-light-gradient();
        }
        &.success {
          background-image: btn-hero-success-light-gradient();
        }
        &.info {
          background-image: btn-hero-info-light-gradient();
        }
        &.warning {
          background-image: btn-hero-warning-light-gradient();
        }
      }
    }

    &.off {
      color: nb-theme(card-fg);

      .icon {
        color: nb-theme(card-fg);

        &.primary, &.success, &.info, &.warning {
          box-shadow: none;
          background-image: linear-gradient(to right, transparent, transparent);
        }
      }

      .title {
        color: nb-theme(card-fg);
      }
    }

    .details {
      display: flex;
      flex-direction: column;
      justify-content: center;
      height: 100%;
      padding: 0 0.5rem 0 0.75rem;
      border-left: 1px solid transparent;
    }

    .title {
      font-family: nb-theme(font-secondary);
      font-size: 1.25rem;
      font-weight: nb-theme(font-weight-bold);
      color: nb-theme(card-fg-heading);
    }

    .status {
      font-size: 1rem;
      font-weight: nb-theme(font-weight-light);
      text-transform: uppercase;
      color: nb-theme(card-fg);
    }
  }

  @include nb-for-theme(cosmic) {
    nb-card {
      &.off .icon-container {
        border-right: 1px solid nb-theme(separator);
      }

      .icon-container {
        padding: 0;
      }

      .details {
        padding-left: 1.25rem;
      }

      .icon {
        width: 7rem;
        height: 100%;
        font-size: 4.5rem;
        border-radius: nb-theme(card-border-radius) 0 0 nb-theme(card-border-radius);
      }

      .title {
        font-weight: nb-theme(font-weight-bolder);
      }

      .status {
        font-weight: nb-theme(font-weight-light);
      }
    }
  }
}