summaryrefslogtreecommitdiffstats
path: root/src/scss/components/_power-ops.scss
blob: 1d4d2d860cb65b3d4a51b1b68678c54c49d9dcc2 (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
// Power Operations SCSS

#power-operations {

  .h4 {
    font-weight: bold;
  }

  // Power op time stamp
  .power__status-log {
    color: $darkgrey;
  }

  // Power Curernt status wrapper
  .power__current-status {
    border-bottom: 1px solid $lightbg__grey;
    margin: 3.625em 0 1.2em 0;
    .h4 {
      padding: 0;
      margin: 0 0 .5em 0;
    }
  }

  // Power state indicator on/off
  .power__state {
    span:before {
      content: '\25CF';
      display: inline-block;
      font-size: 1.2em;
      color: $darkgrey;
      margin-right: .3em;
      @include slowTransition-all;
    }
  }

  // Power bar indicator
  .power__indicator-bar {
    font-weight: bold;
    padding: 1.4em 3em;
    margin-bottom: 3.750em;
    background-size: 200% 100%;
    background-image: linear-gradient(to right, $status-ok-light 50%, $lightgrey 50%);
    background-position: 100%;
    transition: background-position 2s ease;
    p {
      padding: 0;
      margin: 0;
    }
    &.power__state-on {
      background-position: -200%;
      .power__state {
        span:before {
          color: $status-ok;
        }
      }
    }
    &.power__state-off {
      background-position: -100%;
      color: $darkgrey;
      .power__state {
        span:before {
          color: $darkgrey;
        }
      }
    }
  }

  // Power button options
  .power-option {
    border-top: 1px solid $lightgrey;
    padding: 1.8em 0 1em 1.8em;
    position: relative;
    overflow: hidden;
    min-height: 1px;
    .btn-secondary {
      margin-bottom: .5em;
    }
    // Confirmation message for power option
    .power__confirm {
      position: absolute;
      top: 0;
      transform: translateY(-100%);
      width: 100%;
      margin-left: -1.8em;
      z-index: 5;
      background: $darkbg__primary;
      color: $white;
      padding: 2em 2em 1.55em 2em;
      &.active {
        transform: translateY(0);
        @include fastTransition-all;
      }
    }
    &.disabled {
      @include fastTransition-all;
    }
  }
}

// Power confirmation buttons
.power__confirm-buttons {
  .btn-primary {
    background: transparent;
    border: 2px solid $white;
    padding: 1em 2.2em;
    margin: 0 10px;
    border-radius: 4px;
    &:focus,
    &:hover {
      background: $primebtn__bg;
      border: 2px solid $primebtn__bg;
    }
  }
  @include mediaQuery(large) {
    float: right;
  }
}

// Power confirmation message
.power__confirm-message {
  display: inline-block;
}

// Power confirmation message icon
.power__confirm-message i::before {
  content: '\26A0';
  color: $white;
  display: inline-block;
  font-size: 2em;
  vertical-align: middle;
  font-style: normal;
  margin-right: 15px;
}
OpenPOWER on IntegriCloud