Project

General

Profile

Download (17.4 KB) Statistics
| Branch: | Tag: | Revision:
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
// $edit-v-shadow-spread-radius: 0px; // default
28
// ================== DARK ================ //
29

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

    
51
// ========================================== //
52

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

    
56
@import "../valo/valo.scss";
57

    
58
@import "valo-fix.scss";
59

    
60
@import "custom-fields.scss";
61

    
62

    
63
// ========================================== //
64

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

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

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

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

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

    
129

    
130

    
131
@mixin edit-valo {
132
  @include valo;
133

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

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

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

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

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

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

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

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

    
305
    #workingset {
306
            padding: round($v-unit-size / 2);
307
            .registration-list, .registration-list-item {
308
                margin-top: round($v-unit-size / 2);
309
            }
310
        
311
            .v-panel-content {
312
                padding: 0 round($v-unit-size/3);
313
            }
314
            .registration-list .item-footer {
315
                border-bottom: valo-border($border: $v-border, $color: $v-background-color, $strength: 1.4);
316
            }
317
            .field-unit-label {
318
                color: scale-color(darken($v-font-color, 40%), $green: 40%);
319
            }
320
    }
321

    
322
    // --------------------------------------------------- //
323
    .v-caption-submitter {
324
            margin-right: round($v-unit-size / 8);
325
    }
326
        
327
    .registration-list-item {
328
        border-bottom: valo-border($border: $v-border, $color: $v-background-color, $strength: 0.7);
329
        padding-top: 4px; // avoid button group to overlap with border
330
        .v-label-registration-state {
331
            margin-right: round($v-unit-size / 4);
332
        }            
333
        
334
    }
335

    
336
   .registration-workflow-item {
337
       border: valo-border($border: $v-border, $color: $v-background-color, $strength: 0.7);
338
    }
339

    
340
    // tab element being part of a process ----------- //
341
    // use $v-unit-size instead of $v-font-size * 3?
342
    .workflow-step-wrap {
343
        padding-right: 10px;
344
        height: $v-font-size * 3;
345
        background-color: scale-color(lighten($v-app-background-color, 20%), $saturation: -20%);
346
        @include box-shadow(inset 0 0 5px $v-app-background-color);
347
    }
348
    .workflow-step {
349
        line-height: $v-font-size * 3;
350
    }
351
    .v-caption-workflow-step {
352
        vertical-align: top;
353
        padding: 0;
354
         .v-icon {
355
            line-height: $v-font-size * 3;
356
            font-size: $v-font-size * 3.5;
357
            padding-right: 10px;
358
            color: $v-background-color;
359
        }
360
    }
361

    
362
    .workflow-tabsheet {
363
        
364
        table.v-tabsheet-tabs, .v-tabsheet-tabs tr, .v-tabsheet-tabs tbody {
365
          width: 100%; 
366
        }
367
        
368
        .v-tabsheet-tabitemcell {
369
              width: 25%;
370
        }
371

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

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

    
459
    }
460
    
461
    // ---------------- custom components ----------------------- //
462
    
463
    .edit-button-group {
464
        margin-top: round($v-unit-size/10);
465
        .v-button {
466
            padding: 0 round($v-unit-size/4);
467
            height: round(2 * $v-unit-size/3 )
468
            // margin: 0 round($v-unit-size/4);
469
        }
470
        .v-label {
471
            display: inline;
472
            white-space: normal;
473
        }
474
    }
475
    
476
    // ---------- popup editor windows ---------------------------------//
477
    .v-window-top-toolbar {
478
        margin-bottom: round($v-unit-size/4);
479
        .v-component-group {
480
            float: right;
481
        }
482
    }
483
    
484
    #context-breadcrumbs .breadcrumbs {
485
      // for an explanation of how the CSS Triangles to work 
486
      // see https://css-tricks.com/triangle-breadcrumbs/
487
    
488
      $crumb-background-color: $v-app-background-color;
489
      $crumb-active-background-color: #3a6972; //TODO calculate using active-color and $v-background-color or $v-app-background-color
490
      $crumb-border-color: $v-textfield-background-color--readonly;
491
      $crumb-height: 10px; 
492
      $triangle-width: 10px; 
493
      
494
      $crumb-border: valo-border($color: $crumb-border-color);
495
      
496
      list-style: none; 
497
      overflow: hidden;
498
      margin: 0; 
499
      padding: 0;
500
      line-height: $crumb-height;
501
      border-radius: $v-border-radius;
502
      border: $crumb-border;
503
      li {
504
          float: left;
505
          span.crumb {
506
            padding: 10px 10px 10px 20px;
507
            background-color: $crumb-background-color;
508
            position: relative;
509
            display: block;
510
            float: left;
511
            &::before {
512
                  content: " "; 
513
                  display: block;
514
                  width: 0; 
515
                  height: 0;
516
                  border-left: $crumb-border;
517
                  border-left-width: $triangle-width;
518
                  border-top: $crumb-height*2 solid transparent;
519
                  border-bottom: $crumb-height*2 solid transparent;
520
                  position: absolute;
521
                  top: 50%;
522
                  margin-top: -$crumb-height*2;
523
                  margin-left: 1px;
524
                  left: 100%;
525
                  z-index: 1; 
526
              }
527
              &::after {
528
                  content: " "; 
529
                  display: block;
530
                  width: 0; 
531
                  height: 0;
532
                  border-left: $triangle-width solid $crumb-background-color;
533
                  border-top: $crumb-height*2 solid transparent;
534
                  border-bottom: $crumb-height*2 solid transparent;
535
                  border-right: none;
536
                  position: absolute;
537
                  top: 50%;
538
                  margin-top: -$crumb-height*2;
539
                  left: 100%;
540
                  z-index: 2; 
541
              }
542
          }
543
          &::first-child span.crumb {
544
            padding-left: 10px;
545
          }
546
          span.active {
547
              background-color: $crumb-active-background-color;
548
          }
549
       }
550
       
551
    }
552
    
553
    // ---------- ---------- //
554

    
555
    .v-slot-message-item {
556
        .date-time {
557
            font-weight: lighter;
558
        }
559
        .user-name {
560
            font-weight: bold;
561
        }
562
    }
563
}
(3-3/5)