_textbooks.scss 7.36 KB
Newer Older
1 2 3
// studio - views - textbooks
// ====================

4
.view-textbooks {
5

6 7 8 9 10
  .content-primary, .content-supplementary {
    @include box-sizing(border-box);
  }

  .content-primary {
11
    @extend .ui-col-wide;
12

13
    .no-textbook-content {
14
      @extend %no-content;
15 16 17
    }

    .textbook {
18
      @extend %ui-window;
19
      position: relative;
20

21
      .view-textbook {
22
        padding: $baseline ($baseline*1.5);
23

24 25 26 27
        header {
          margin-bottom: 0;
          border-bottom: 0;
        }
28

29
        .textbook-title {
30
          @extend %t-title4;
31
          @extend %t-strong;
32
          @include margin-right($baseline*14);
33
        }
34

35 36
        .ui-toggle-expansion {
          @include transition(rotate .15s ease-in-out .25s);
37
          @extend %t-action1;
38
          display: inline-block;
39
          width: ($baseline*0.75);
40 41 42 43
          vertical-align: text-bottom;
        }

        &.is-selectable {
44
          @extend %ui-fake-link;
45

46
          &:hover {
47 48 49 50 51
            color: $blue;

            .ui-toggle-expansion {
              color: $blue;
            }
52
          }
53
        }
54

55 56 57 58
        .chapters {
          margin-left: $baseline;

          .chapter {
59
            @extend %t-copy-sub2;
60 61 62 63 64
            margin-bottom: ($baseline/4);
            border-bottom: 1px solid $gray-l4;

            .chapter-name {
              display: inline-block;
65
              vertical-align: middle;
66 67 68 69 70 71
              width: 45%;
              margin-right: ($baseline/2);
              overflow: hidden;
              white-space: nowrap;
              text-overflow: ellipsis;
            }
72

73 74 75 76 77 78 79
            .chapter-asset-path {
              display: inline-block;
              width: 50%;
              color: $gray-l1;
            }
          }
        }
80

81
        .actions {
82 83
          @include transition(opacity .15s .25s ease-in-out);
          opacity: 0.0;
84 85
          position: absolute;
          top: $baseline;
86
          @include right($baseline);
87

88 89 90
          .action {
            display: inline-block;
            margin-right: ($baseline/4);
91

92
            .view {
93
              @include blue-button;
94
              @extend %t-action4;
95
            }
96

97 98
            .edit {
              @include blue-button;
99
              @extend %t-action4;
100
            }
101

102
            .delete {
103
              @extend %ui-btn-non;
104 105
            }
          }
106

107
        }
108

109
      }
110

111 112 113
      &:hover .actions {
        opacity: 1.0;
      }
114 115 116

    .edit-textbook {
        @include box-sizing(border-box);
117
        border-radius: 2px;
118 119 120
        width: 100%;
        background: $white;

121 122 123
      .wrapper-form {
        padding: $baseline ($baseline*1.5);
      }
124

125

126 127 128
      fieldset {
          margin-bottom: $baseline;
      }
129

130
      .actions {
131
        box-shadow: inset 0 1px 2px $shadow;
132 133 134
        border-top: 1px solid $gray-l1;
        padding: ($baseline*0.75) $baseline;
        background: $gray-l6;
135

136 137 138 139 140 141 142 143
        .action {
          margin-right: ($baseline/4);

          &:last-child {
            margin-right: 0;
          }
        }

144
        // add a chapter is below with chapters styling
145

146 147 148
        .action-primary {
          @include blue-button;
          @include transition(all .15s);
149 150
          @extend %t-action2;
          @extend %t-strong;
151 152 153 154
          display: inline-block;
          padding: ($baseline/5) $baseline;
          text-transform: uppercase;
        }
155

156 157 158
        .action-secondary {
          @include grey-button;
          @include transition(all .15s);
159 160
          @extend %t-action2;
          @extend %t-strong;
161 162 163
          display: inline-block;
          padding: ($baseline/5) $baseline;
          text-transform: uppercase;
164
        }
165

166

167
      }
168

169
      .copy {
170
        @extend %t-copy-sub2;
171 172
        margin: ($baseline) 0 ($baseline/2) 0;
        color: $gray;
173 174


175
        strong {
176
          @extend %t-strong;
177
        }
178 179


180
      }
181

182 183
      .chapters-fields,
      .textbook-fields {
184
        @extend %cont-no-list;
185

186 187
        .field {
          margin: 0 0 ($baseline*0.75) 0;
188

189 190 191
          &:last-child {
            margin-bottom: 0;
          }
192

193
          &.required {
194

195
            label {
196
              @extend %t-strong;
197
            }
198

199 200 201
            label:after {
              margin-left: ($baseline/4);
              content: "*";
202
            }
203 204 205 206 207
          }

          label, input, textarea {
            display: block;
          }
208

209
          label {
210
            @extend %t-copy-sub1;
211 212
            @include transition(color, 0.15s, ease-in-out);
            margin: 0 0 ($baseline/4) 0;
213

214 215
            &.is-focused {
              color: $blue;
216
            }
217
          }
218 219


220
          &.add-textbook-name label {
221
            @extend %t-title5;
222
          }
223

224 225

          //this section is borrowed from _account.scss - we should clean up and unify later
226
          input, textarea {
227
            @extend %t-copy-base;
228 229 230
            height: 100%;
            width: 100%;
            padding: ($baseline/2);
231

232 233 234
            &.long {
              width: 100%;
            }
235

236 237 238
            &.short {
              width: 25%;
            }
239

240 241 242
            ::-webkit-input-placeholder {
               color: $gray-l4;
            }
243

244 245 246
            :-moz-placeholder {
               color: $gray-l3;
            }
247

248 249
            ::-moz-placeholder {
               color: $gray-l3;
250 251
            }

252 253
            :-ms-input-placeholder {
               color: $gray-l3;
254 255
            }

256
            &:focus {
257

258 259
              + .tip {
                color: $gray;
260 261
              }
            }
262 263 264 265 266 267 268 269 270 271 272
          }

          textarea.long {
            height: ($baseline*5);
          }

          input[type="checkbox"] {
            display: inline-block;
            margin-right: ($baseline/4);
            width: auto;
            height: auto;
273

274 275
            & + label {
              display: inline-block;
276
            }
277
          }
278

279
          .tip {
280
            @extend %t-copy-sub2;
281 282 283 284 285
            @include transition(color, 0.15s, ease-in-out);
            display: block;
            margin-top: ($baseline/4);
            color: $gray-l3;
          }
286 287 288 289 290 291 292 293 294 295

          &.error {
              label {
                color: $red;
              }

              input {
                border-color: $red;
              }
          }
296
        }
297

298 299 300
        .field-group {
          @include clearfix();
          margin: 0 0 ($baseline/2) 0;
301

302 303 304 305
          .field {
            display: block;
            width: 46%;
            border-bottom: none;
306
            @include margin(0, ($baseline*0.75), 0, 0);
307
            padding: ($baseline/4) 0 0 0;
308
            @include float(left);
309 310 311 312
            position: relative;

            input, textarea {
              width: 100%;
313
            }
314

315
            .action-upload {
316
                @extend %ui-btn-flat-outline;
317 318
                position: absolute;
                top: 3px;
319
                @include right(0);
320
            }
321

322 323 324
          }

          .action-close {
325
            @include transition(color $tmg-f2 ease-in-out);
326
            @extend %t-action1;
327
            display: inline-block;
328
            float: right;
329 330 331 332
            margin-top: ($baseline*2);
            border: 0;
            padding: 0;
            background: transparent;
333
            color: $blue-l3;
334 335 336

            &:hover {
              color: $blue;
337
            }
338
          }
339
        }
340 341 342 343
      }


      .action-add-chapter {
344
        @extend %ui-btn-flat-outline;
345
        @extend %t-action1;
346 347 348
        display: block;
        width: 100%;
        margin: ($baseline*1.5) 0 0 0;
349
        padding: ($baseline/2);
350
      }
351 352
    }
  }
353
}
354
  .content-supplementary {
355
    @extend .ui-col-narrow;
356
  }
357
}