Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

cdm-vaadin / src / main / webapp / VAADIN / themes / edit-valo / edit-valo.scss @ 725d1ff2

History | View | Annotate | Download (14.7 KB)

1
// Global variable overrides. Must be declared before importing Valo.
2

    
3
// Defines the plaintext font size, weight and family. Font size affects general component sizing.
4
$v-font-size: 14px; // default in valo is 16px
5
//$v-font-weight: 300;
6
$v-font-family: "Open Sans", sans-serif;
7

    
8
// Defines the border used by all components.
9
//$v-border: 1px solid (v-shade 0.7);
10
//$v-border-radius: 4px;
11

    
12
// Affects the color of some component elements, e.g Button, Panel title, etc
13
//$v-background-color: hsl(210, 0%, 98%);
14
// Affects the color of content areas, e.g  Panel and Window content, TextField input etc
15
//$v-app-background-color: $v-background-color;
16

    
17
// Affects the visual appearance of all component
18
//$v-gradient: v-linear 8%;
19
//$v-bevel-depth: 30%;
20
//$v-shadow-opacity: 5%;
21

    
22
// Defines colors for indicating status (focus, success, failure)
23
//$v-focus-color: valo-focus-color(); // Calculates a suitable color automatically
24
//$v-friendly-color: #2c9720;
25
//$v-error-indicator-color: #ed473b;
26

    
27
// ================== DARK ================ //
28

    
29
// $v-app-loading-text: "Dark Valo";
30
/*
31
*/
32
$v-background-color: #444d50;
33
$v-focus-color: #07a9ca;
34
$v-focus-style: 0 0 3px 2px $v-focus-color;
35
$v-bevel-depth: 40%;
36
$v-gradient: v-linear 12%;
37
$v-border-radius: 10px;
38
$v-font-family: Roboto, sans-serif;
39
$v-font-weight: 400;
40
$v-font-weight--header: 400;
41
$v-bevel: inset 0 1px 2px v-tint, inset 0 0 1px (v-tint 0.1);
42
$v-shadow: 0 0 0 3px rgba(0,0,0,0.32), 0 1px 0 3px rgba(255,255,255,0.14);
43
$v-textfield-bevel: inset 0 2px 2px v-shade;
44
$v-textfield-shadow: $v-shadow;
45
$v-unit-size: 40px;
46
$v-overlay-shadow: 0 0 0 3px (v-shade 8), 0 5px 10px (v-shade 4);
47
$v-component-group-spacing: 6px;
48

    
49
// ========================================== //
50

    
51
// For more information, see: https://vaadin.com/book/-/page/themes.valo.html
52
// Example variants can be copy/pasted from https://vaadin.com/wiki/-/wiki/Main/Valo+Examples
53

    
54
@import "../valo/valo.scss";
55

    
56
@import "valo-fix.scss";
57

    
58
@import "custom-fields.scss";
59

    
60

    
61
// ========================================== //
62

    
63
// import custom font icons TODO rename font
64
@include v-font(IcoMoon, "../../../../../fonts/icomoon");
65

    
66
.IcoMoon {
67
   font-family: IcoMoon;
68
   font-style: normal;
69
   font-weight: normal;
70
   -webkit-font-smoothing: antialiased;
71
   -moz-osx-font-smoothing: grayscale;
72
   display: inline-block;
73
   text-align: center;
74
}
75

    
76
// ========================================== //
77
// Status colors for the registration
78
// 
79
// change-color cant be used since this is not fully supported by the vaadin sass-compiler
80
// see https://github.com/vaadin/sass-compiler/issues/147
81
$status-reference-color:$v-focus-color;
82
$hue-offset: hue($status-reference-color);
83
$plain-red: adjust-color($status-reference-color, $hue: -1 * $hue-offset);  // red as 0 degree hue
84
$status-rejected-color: adjust-color($plain-red, $hue: 0deg);
85
$status-curation-color: adjust-color($plain-red, $hue: 35deg); 
86
$status-preparation-color: adjust-color($plain-red, $hue: 60deg); 
87
$status-published-color: adjust-color($plain-red, $hue: 105deg); 
88
$status-ready-color: adjust-color($plain-red, $hue: 180deg);
89
// ========================================== //
90

    
91
@mixin registration-status-colors($sub-selector: '') {
92
    .registration-status-REJECTED #{$sub-selector} {
93
        color: $status-rejected-color;
94
    }
95
    .registration-status-CURATION #{$sub-selector} {
96
        color: $status-curation-color;
97
    }
98
    .registration-status-PREPARATION #{$sub-selector} {
99
        color: $status-preparation-color;
100
    }
101
    .registration-status-PUBLISHED #{$sub-selector} {
102
        color: $status-published-color;
103
    }
104
    .registration-status-READY #{$sub-selector} {
105
        color: $status-ready-color;
106
    }
107
}
108

    
109
@mixin registration-status-bg-colors($sub-selector: '') {
110
    .bg-status-REJECTED #{$sub-selector} {
111
        background-color: $status-rejected-color;
112
    }
113
    .bg-status-CURATION #{$sub-selector} {
114
        background-color: $status-curation-color;
115
    }
116
    .bg-status-PREPARATION #{$sub-selector}  {
117
        background-color: $status-preparation-color;
118
    }
119
    .bg-status-PUBLISHED #{$sub-selector} {
120
        background-color: $status-published-color;
121
    }
122
    .bg-status-READY #{$sub-selector} {
123
        background-color: $status-ready-color;
124
    }
125
}
126

    
127

    
128

    
129
@mixin edit-valo {
130
  @include valo;
131

    
132
  // Insert your own theme rules here
133
  
134
  // --- AbstractPageView --- // 
135
  #header {
136
    text-align: center;
137
    margin: round($v-layout-spacing-vertical/2); // corresponds to layout spacing
138
    font-size: $v-font-size--huge; // corresponds to valo style huge (26px)
139
  }
140

    
141
  #subheader {
142
    text-align: center;
143
    margin: round($v-layout-spacing-vertical/2);
144
    font-size: $v-font-size; // valo default font size (16px)
145
  }
146
  // ------------------- // 
147
  
148
  .logo_giant {
149
    font-size: 400%;
150
   }
151
   
152
   .v-button-giant {
153
     font-size: 32px;
154
     .v-icon {
155
       font-size: 64px;
156
       line-height: 50px;
157
     }
158
   }
159
   
160
   .v-button-center-h {
161
    // requires width to be defined 
162
    display: block;
163
    margin: 0 auto;
164
   }
165

    
166
   .v-label .caption {
167
       font-size: $v-font-size--small;
168
   }
169
   
170
   // label with caption and icon horizonatally aligned
171
   // to apply this to a Vaadin Label set 'label-nowrap'
172
   // as style
173

    
174
    .v-caption-label-nowrap, .v-label-label-nowrap {
175
        display: inline;
176
    }
177
    .v-label-label-nowrap {
178
//         margin-left: 8px; // TODO use sass variable here
179
//         vertical-align: baseline;
180
        .v-icon {
181
           display : inline;
182
        }
183
    } 
184

    
185
   .friendly-foreground {
186
        color: $v-friendly-color;
187
    }
188
   
189
   .v-button .button-badge {
190
         @include valo-badge-style($states: inactive, $background-color: lighten($v-background-color, 10%), $active-color: $v-focus-color);
191
    } 
192
   
193
   .dashboard-actions {
194
      margin: 0 10%;
195
    
196
      .dashboard-action-2 {
197
        width: 50%;
198
        .v-label {
199
            white-space: normal;
200
        }
201
      }
202
      .dashboard-action-3 {
203
        width: 33%;
204
        .v-label {
205
            white-space: normal;
206
        }
207
      }
208
      &[width-range~="-650px"] {
209
          .dashboard-action-2, .dashboard-action-3 {
210
              width: 100%;
211
          }
212
      }
213
    }
214
    
215
    // ==== styles in eu.etaxonomy.cdm.vaadin.theme.EditValoTheme ==== // 
216
    
217
    // style for buttons highlighted as being active
218
    .v-button-highlite {
219
        color: $v-focus-color;
220
    }
221
    
222
    .v-panel-padding-left .v-panel-content {
223
        padding-left: round($v-unit-size / 4);
224
    }
225

    
226
    // ===== workflow ==== // 
227
    
228
    #workflow {
229
        .registration-list {
230
                .v-gridlayout-slot {
231
                    border-bottom: valo-border($border: $v-border, $color: $v-background-color, $strength: 1.4);
232
                }
233
            }
234
         .v-gridlayout-registration-list-item {
235
            padding: 0 round($v-unit-size / 4);
236
         }
237
    }
238
    
239
    $workflow-icon-size: 110px;
240
    // can not be set per css as this need to set as property to the component in vaadin
241
    $workflow-timeline-bar-height: 10px; 
242
    // the fator by which the caption should be smaller than the circe
243
    $workflow-caption-shrink: 0.64; 
244

    
245
    $workflow-icon-margin-h: $workflow-icon-size / 5;
246
    $workflow-icon-left: $workflow-icon-margin-h / 2;
247
    $workflow-caption-font-size: $workflow-icon-size * $workflow-caption-shrink;        
248
    
249
    .workflow {
250
        .steps {
251
            z-index: 10;
252
            
253
            .v-csslayout {
254
                width: $workflow-icon-size + 2 * $workflow-icon-margin-h;
255
                .v-label {
256
                    display: block;
257
                    text-align: center;
258
                }
259
            }
260
         }
261
         .timeline {
262
            display: block;
263
            position: relative;
264
            top: ($workflow-icon-size / 2) + $workflow-timeline-bar-height / 2;
265
            padding: 0 $workflow-icon-size / 2;
266
            .timeline-bar {
267
                z-index: 0;
268
                background-color: $v-font-color;
269
            }
270
        }
271
    }
272

    
273
    .workflow-item {
274
        .v-button {
275
            margin: 0 $workflow-icon-margin-h;
276
            font-size: $workflow-icon-size;
277
            height: $workflow-icon-size;
278
            width: $workflow-icon-size;
279
            line-height: $workflow-icon-size;
280
        
281
            .v-icon, .v-button-caption {
282
                position: absolute;
283
                left: $workflow-icon-left;
284
                top: 0px;
285
            }
286
            .v-button-caption {
287
                font-family: monospace;
288
                left: (($workflow-icon-size - $workflow-caption-font-size) / 2) + $workflow-icon-left; // 30px;
289
                top: -2px;
290
                color: $v-background-color;
291
                font-size: $workflow-caption-font-size; // 70px;
292
            }
293
        }
294
    }
295
    
296
   
297
   // --------------------------------------------------- //
298

    
299
    #workingset {
300
            padding: round($v-unit-size / 2);
301
            .registration-list, .registration-list-item {
302
                margin-top: round($v-unit-size / 2);
303
            }
304
        
305
            .v-panel-content {
306
                padding: 0 round($v-unit-size/3);
307
            }
308
            .registration-list .item-footer {
309
                border-bottom: valo-border($border: $v-border, $color: $v-background-color, $strength: 1.4);
310
            }
311
    }
312

    
313
    // --------------------------------------------------- //
314
    .v-caption-submitter {
315
            margin-right: round($v-unit-size / 8);
316
    }
317
        
318
    .registration-list-item {
319
        border-bottom: valo-border($border: $v-border, $color: $v-background-color, $strength: 0.7);
320
        padding-top: 4px; // avoid button group to overlap with border
321
        .v-label-registration-state {
322
            margin-right: round($v-unit-size / 4);
323
        }            
324
        
325
    }
326

    
327
   .registration-workflow-item {
328
       border: valo-border($border: $v-border, $color: $v-background-color, $strength: 0.7);
329
    }
330

    
331
    // tab element being part of a process ----------- //
332
    // use $v-unit-size instead of $v-font-size * 3?
333
    .workflow-step-wrap {
334
        padding-right: 10px;
335
        height: $v-font-size * 3;
336
        background-color: scale-color(lighten($v-app-background-color, 20%), $saturation: -20%);
337
        @include box-shadow(inset 0 0 5px $v-app-background-color);
338
    }
339
    .workflow-step {
340
        line-height: $v-font-size * 3;
341
    }
342
    .v-caption-workflow-step {
343
        vertical-align: top;
344
        padding: 0;
345
         .v-icon {
346
            line-height: $v-font-size * 3;
347
            font-size: $v-font-size * 3.5;
348
            padding-right: 10px;
349
            color: $v-background-color;
350
        }
351
    }
352

    
353
    .workflow-tabsheet {
354
        
355
        table.v-tabsheet-tabs, .v-tabsheet-tabs tr, .v-tabsheet-tabs tbody {
356
          width: 100%; 
357
        }
358
        
359
        .v-tabsheet-tabitemcell {
360
              width: 25%;
361
        }
362

    
363
        .v-tabsheet-tabitem {
364
            
365
            // background-color: scale-color(lighten($v-app-background-color, 20%), $saturation: -20%);
366
            // @include valo-gradient($color: $v-background-color, $gradient: $v-gradient, $fallback: null, $direction: to right);
367
            // @include box-shadow(inset 0 0 5px $v-app-background-color);
368
            // background-color: $v-font-color
369
            
370
            // border: valo-border($border: 2px solid, $color: $v-font-color, $strength: 1);
371
            
372
            background-color: scale-color(lighten($v-app-background-color, 20%), $saturation: -20%);
373
            @include box-shadow(inset 0 0 5px $v-app-background-color);
374
            border: valo-border($border: 2px solid, $color: $v-app-background-color, $strength: 1);
375
            border-color: $v-app-background-color;
376
            .v-caption {
377
                // line-height: $v-unit-size;
378
                margin: 0;
379
                padding: 0;
380
                padding-right: $v-unit-size / 2;
381
                border: 0px none;
382
            }
383
            .v-icon {
384
                line-height: $v-unit-size;
385
                font-size: $v-unit-size * 1.8;
386
                vertical-align: middle;
387
                // padding-right: $v-unit-size / 2;
388
                
389
                //color: $v-font-color;
390
                
391
                color: $v-app-background-color;
392
            }
393
        }
394
    }
395

    
396
    // =============================================== //
397
    .registration-status {
398
        display: block;
399
    }
400
    
401
   @include registration-status-colors();
402
   @include registration-status-bg-colors(); // TODO still needed?
403
   @include registration-status-colors(.v-select-select);
404
   
405
    // ----------------------------------------------- //
406
    
407
    #registration-list {
408
        /* --- for the css layout --- */
409
        overflow: auto;
410
        height: 100%;
411
        padding-left: round($v-unit-size/3);
412
        padding-right: round($v-unit-size/3);
413
        
414
        border: valo-border($border: $v-border, $color: $v-background-color, $strength: 1.4);
415
        border-radius: $v-border-radius - first-number($v-border) $v-border-radius - first-number($v-border) 0 0;
416
        /* ----------------------------------------------- */
417
        // TODO can the mixin registration-status-colors() be used here?
418
        // for grid rows
419
        .status-REJECTED {
420
            color: $status-rejected-color;
421
            td.registrationType, td.status {
422
                color: $status-rejected-color;
423
            }
424
        }
425
        .status-CURATION {
426
            color: $status-curation-color;
427
            td.registrationType, td.status {
428
                color: $status-curation-color;
429
            }
430
        }
431
        .status-PREPARATION {
432
            color: $status-preparation-color;
433
            td.registrationType, td.status {
434
                color: $status-preparation-color;
435
            }
436
        }
437
        .status-PUBLISHED {
438
            color: $status-published-color;
439
            td.registrationType, td.status {
440
                color: $status-published-color;
441
            }
442
        }
443
        .status-READY {
444
            color: $status-ready-color;
445
            td.registrationType, td.status {
446
                color: $status-ready-color;
447
            }
448
        }
449

    
450
    }
451
    
452
    // ---------------- custom components ----------------------- //
453
    
454
    .edit-button-group {
455
        margin-top: round($v-unit-size/10);
456
        .v-button {
457
            padding: 0 round($v-unit-size/4);
458
            height: round(2 * $v-unit-size/3 )
459
            // margin: 0 round($v-unit-size/4);
460
        }
461
        .v-label {
462
            display: inline;
463
            white-space: normal;
464
        }
465
    }
466
    
467
    // ---------- popup editor windows ---------------------------------//
468
    .v-window-top-toolbar {
469
        margin-bottom: round($v-unit-size/4);
470
        .v-component-group {
471
            float: right;
472
        }
473
    }
474

    
475
    // ---------- ---------- //
476

    
477
    .v-slot-message-item {
478
        .date-time {
479
            font-weight: lighter;
480
        }
481
        .user-name {
482
            font-weight: bold;
483
        }
484
    }
485
}
Add picture from clipboard (Maximum size: 40 MB)