_program-card.scss 3.44 KB
Newer Older
1 2
%hide-until-focus {
  @include left(0);
3

4 5
  display: inline-block;
  position: absolute;
AlasdairSwan committed
6
  top: -999999px;
7 8 9
  overflow: hidden;
}

10
.program-card {
11
  @include span(12);
12

13
  border: 1px solid $border-color-l3;
14
  border-bottom: none;
15
  margin-bottom: $baseline;
16
  position: relative;
17

18
  @media (min-width: $bp-screen-md) {
19 20 21
    @include span(6);

    &:nth-child(2n) {
22 23
      @include span(6, before);
    }
24

25 26
    &:nth-child(2n+1) {
      @include span(6, after);
27 28
    }
  }
29

30
  .card-link {
31
    @include left(0);
32
    @include right(0);
33

34 35 36 37 38
    position: absolute;
    top: 0;
    bottom: 0;
    border: 0;
    z-index: 1;
39
    opacity: 0.8;
40

41
    &:active,
42
    &:hover,
43
    &:focus {
44 45
      opacity: 1;
    }
46

47
    .banner-image-container {
48 49
      position: relative;
      overflow: hidden;
50 51
      height: 166px;

52 53 54 55 56
      @media (min-width: $bp-screen-sm) { height: 242px; }

      @media (min-width: $bp-screen-md) { height: 116px; }

      @media (min-width: $bp-screen-lg) { height: 145px; }
57

58
      .banner-image {
59
        @include left(50%);
60

61 62 63 64 65 66 67
        position: absolute;
        top: 0;
        z-index: 0;
        transform: translate(-50%, 0);
        min-height: 100%;
      }
    }
68
  }
69

70
  .text-section {
71
    padding: 40px $baseline $baseline;
72
    position: relative;
73
    margin-top: 156px;
74

75 76 77 78 79
    @media (min-width: $bp-screen-sm) { margin-top: 232px; }

    @media (min-width: $bp-screen-md) { margin-top: 106px; }

    @media (min-width: $bp-screen-lg) { margin-top: 135px; }
80
  }
81

82
  .meta-info {
83 84 85
    font-size: font-size(x-small);
    color: palette(grayscale, dark);
    position: absolute;
86
    top: $baseline;
87 88
    width: calc(100% - 40px);
  }
89

90
  .organization {
91
    @include span(6, none);
92

93 94 95
    white-space: nowrap;
    overflow: hidden;
  }
96

97
  .category {
98
    @include span(6, none);
99 100
    @include text-align(right);

101 102
    .category-text {
      @include float(right);
103
    }
104

105
    .category-icon {
106
      @include float(right);
107
      @include margin-right($baseline*0.25);
108

109 110
      background-color: transparent;
      background-size: 100%;
111 112
      width: ($baseline*0.7);
      height: ($baseline*0.7);
113 114
    }
  }
115

116
  .hd-3 {
117
    color: palette(grayscale, dark);
118
    min-height: ($baseline*3);
119
    line-height: 1.15;
120
  }
121

122 123 124 125 126 127 128 129 130 131 132 133 134
  .status-text {
    display: flex;
    margin-bottom: 5px;

    .number-status {
      text-align: center;
      width: 100%;
      float: left;
      padding: {
        left: 5px;
        right: 5px;
        bottom: 8px;
      }
135

136 137
      margin-top: -8px;
      font-size: 1em;
138
      font-family: $font-family-sans-serif;
139
    }
140

141 142 143 144 145 146 147 148 149 150
    .number-circle {
      padding-top: 1px;
      border-radius: 50%;
      margin-left: auto;
      margin-right: auto;
      width: 23px;
      height: 23px;
      color: white;
      text-align: center;
      font-size: 0.9375em;
151
      font-family: $font-family-sans-serif;
152
      font-weight: bold;
153
    }
154

155 156
    .completed {
      background: $blue;
157 158
    }

159 160 161 162 163 164
    .enrolled {
      background: $green;
    }

    .not-enrolled {
      background: palette(grayscale, dark);
165
    }
166 167
  }

168 169
  .progress-container {
    max-width: inherit;
170

171 172 173 174
    .progress-bar {
      height: 5px;
      display: flex;
      width: 100%;
175

176 177 178 179
      .item {
        width: 100%;
        margin-right: 2px;
        height: 5px;
180

181 182 183
        &.completed {
          background: $blue;
        }
184

185 186 187
        &.enrolled {
          background: $green;
        }
188

189 190 191
        &.not-enrolled {
          background: lightgray;
        }
192

193 194 195
        &.not-enrolled:last-of-type {
          margin-right: 0;
        }
196 197
      }
    }
198
  }
199

200
}