jobdone-shared-files 0.0.1-beta.85 → 0.0.1-beta.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1019 +1,1019 @@
1
- // ====================================
2
- // Plugin
3
- // ====================================
4
-
5
- // Custom Bootstrap
6
- @import "../../../../bootstrap/scss/functions";
7
- @import "../Settings/bs-variables";
8
- @import "../../../../bootstrap/scss/bootstrap.scss";
9
-
10
-
11
- // ====================================
12
- // Helpers
13
- // ====================================
14
-
15
- // Mixins
16
- @import "../Settings/Mixins";
17
-
18
-
19
- // ====================================
20
- // Custom Style
21
- // ====================================
22
-
23
- @import "../Settings/color-mode";
24
- @import "../Settings/custom-variables";
25
-
26
-
27
- @mixin gradient-bg(){
28
- &:before{
29
- content: "";
30
- display: block;
31
- @include position-center();
32
- z-index: 0;
33
- background: $gradient-blue-light;
34
- pointer-events: none;
35
- transition: $transition-base;
36
- }
37
- }
38
-
39
- @mixin gradient-bg-hover-to-show($opacity: 1){
40
- @include gradient-bg();
41
- &:before{ opacity: 0; }
42
- &:hover:before{ opacity: $opacity; }
43
- }
44
-
45
- // general ------------------------------------------
46
- [v-cloak]{
47
- display: none !important;
48
- }
49
-
50
- body,
51
- .overflow-auto, .overflow-scroll,
52
- .overflow-y-auto, .overflow-y-scroll,
53
- .offcanvas-body, textarea{
54
- @include scrollbar();
55
- }
56
-
57
- .overflow-x-auto, .overflow-x-scroll, .scrollbar-sm, .table-responsive{
58
- @include scrollbar();
59
- --scrollbar-width: 6px;
60
- overflow-x: auto;
61
- -webkit-overflow-scrolling: touch;
62
- }
63
-
64
- .scrollbar-gutter-stable{
65
- // Safari 暫不支援
66
- scrollbar-gutter: stable;
67
- }
68
-
69
- body{
70
- background-color: var(--gray-200);
71
- --maz-color-primary: var(--bs-primary);
72
- --maz-color-secondary: var(--bs-secondary);
73
- --maz-color-info: var(--bs-info);
74
- --maz-color-success: var(--bs-success);
75
- --maz-color-warning: var(--bs-warning);
76
- --maz-color-danger: var(--bs-danger);
77
- --maz-color-bg: var(--bs-body-bg);
78
- --maz-color-text: var(--bs-body-color);
79
- --maz-color-muted: var(--bs-secondary-color);
80
- }
81
-
82
- ul, ol{
83
- &.list-reset{
84
- list-style-type: none;
85
- padding-left: 0;
86
- }
87
- }
88
- // general ------------------------------------------
89
-
90
-
91
- // text / link ------------------------------------------
92
- a{
93
- text-decoration: none;
94
- // 如果需要底線使用 <u></u> tag
95
- transition: $transition-base;
96
- &.a-reset-color{
97
- color: inherit;
98
- }
99
- &.a-hover-gradient{
100
- position: relative;
101
- @include gradient-bg-hover-to-show();
102
- }
103
- }
104
-
105
- .text-link{
106
- color: var(--bs-link-color);
107
- &:hover{
108
- color: var(--bs-link-hover-color);
109
- }
110
- }
111
-
112
- .text-pre-wrap{
113
- white-space: pre-wrap;
114
- }
115
-
116
- .fs-min{
117
- font-size: 12px;
118
- }
119
-
120
- .text-overflow{
121
- @include text-overflow();
122
- }
123
-
124
- @for $i from 1 through 5 {
125
- .text-line-clamp-#{$i} {
126
- @include text-line-clamp(#{$i});
127
- }
128
- }
129
-
130
- @for $i from 1 through 5 {
131
- .letter-spacing-#{$i} {
132
- letter-spacing: #{$i}px;
133
- }
134
- }
135
-
136
- // text / link ------------------------------------------
137
-
138
-
139
- // border ------------------------------------------
140
- .hover-border{
141
- transition: $transition-base;
142
- &:hover{
143
- box-shadow: $focus-ring-box-shadow;
144
- }
145
- }
146
- .active-border{
147
- box-shadow: $focus-ring-box-shadow;
148
- }
149
- // border ------------------------------------------
150
-
151
-
152
- // badge outline ------------------------------------------
153
-
154
- @each $color, $value in $colors {
155
- .badge-outline-#{$color}{
156
- color: $value;
157
- border: $border-width solid rgba($value, .5);
158
- background-color: rgba($value, .1);
159
- }
160
- }
161
-
162
- // badge outline ------------------------------------------
163
-
164
-
165
- // input ------------------------------------------
166
- .form-control{
167
- caret-color: $primary;
168
- }
169
- // input ------------------------------------------
170
-
171
-
172
- // checkbox / radio ------------------------------------------
173
-
174
- .check-label{
175
- cursor: pointer;
176
- &, &:before, span{
177
- vertical-align: middle;
178
- transition: $transition-base;
179
- }
180
- &:before{
181
- content: "check_box_outline_blank";
182
- display: inline-block;
183
- margin-right: .1em;
184
- color: var(--gray-500);
185
- font-family: 'Material Icons';
186
- font-size: 120%;
187
- line-height: inherit;
188
- white-space: nowrap;
189
- -webkit-font-feature-settings: 'liga';
190
- -webkit-font-smoothing: antialiased;
191
- }
192
- &:not(.badge):hover{
193
- &, &:before, span{
194
- color: $primary;
195
- }
196
- }
197
- }
198
-
199
- .check-group{
200
- position: relative;
201
- display: inline-block;
202
- vertical-align: middle;
203
- &:not(:last-child){
204
- margin-right: 1em;
205
- }
206
- > input[type="checkbox"], > input[type="radio"]{
207
- position: absolute;
208
- opacity: 0;
209
- pointer-events: none;
210
- &:checked ~ .check-label:before{
211
- color: $primary;
212
- }
213
- // disabled style
214
- &:disabled ~ .check-label{
215
- cursor: not-allowed;
216
- span, &:hover span,
217
- &:before, &:hover &:before{
218
- color: var(--gray-500);
219
- }
220
- }
221
- &:checked:disabled ~ .check-label{
222
- &:before, &:hover &:before{
223
- color: var(--gray-600);
224
- }
225
- }
226
- }
227
- > input[type="checkbox"] ~ .check-label:before{ content: "check_box_outline_blank"; }
228
- > input[type="radio"] ~ .check-label:before{ content: "radio_button_unchecked"; }
229
- > input[type="checkbox"]:checked ~ .check-label:before{ content: "check_box"; }
230
- > input[type="radio"]:checked ~ .check-label:before{ content: "radio_button_checked"; }
231
- }
232
- // checkbox / radio ------------------------------------------
233
-
234
- // star ------------------------------------------
235
- .check-star-group{
236
- > input[type="checkbox"], > input[type="radio"]{
237
- ~ .check-label:before{
238
- content: "star_border";
239
- font-size: 1.5em;
240
- }
241
- ~ .check-label:hover:before{
242
- color: $warning;
243
- }
244
- &:checked ~ .check-label:before{
245
- content: "star";
246
- color: $warning;
247
- }
248
- }
249
- }
250
- // star ------------------------------------------
251
-
252
-
253
- // switch ------------------------------------------
254
-
255
- :root{
256
- --switch-w: 24px;
257
- --switch-h: 12px;
258
- --switch-padding: 2px;
259
- --switch-ball-size: calc( var(--switch-h) - var(--switch-padding)*2);
260
-
261
- }
262
- .check-switch-group{
263
- // reset
264
- .check-label:before{ content: ""; }
265
- .check-label .switch-item{
266
- position: relative;
267
- display: inline-block;
268
- width: var(--switch-w);
269
- height: var(--switch-h);
270
- border-radius: var(--switch-h);
271
- background-color: var(--gray-500);
272
- vertical-align: middle;
273
- &, &:before{
274
- transition: $transition-base;
275
- }
276
- &:before{
277
- content: "";
278
- position: absolute;
279
- top: 0;
280
- left: var(--switch-padding);
281
- bottom: 0;
282
- margin: auto;
283
- @include size(var(--switch-ball-size));
284
- border-radius: 50%;
285
- background-color: $white;
286
- }
287
- }
288
- > input[type="checkbox"], > input[type="radio"]{
289
- // reset
290
- ~ .check-label:before{ content: ""; }
291
- &:checked ~ .check-label:before{ content: ""; }
292
-
293
- &:not(:disabled) ~ .check-label:hover .switch-item:before{
294
- will-change: left;
295
- }
296
-
297
- &:checked ~ .check-label .switch-item:before{
298
- left: calc( var(--switch-w) - var(--switch-padding) - var(--switch-ball-size));
299
- }
300
-
301
- // disabled style
302
- &:disabled ~ .check-label .switch-item{
303
- background-color: var(--gray-400);
304
- }
305
- &:checked:disabled ~ .check-label .switch-item{
306
- background-color: var(--gray-600);
307
- }
308
- }
309
- &-md{
310
- --switch-w: 30px;
311
- --switch-h: 15px;
312
- --switch-padding: 3px;
313
- --switch-ball-size: calc( var(--switch-h) - var(--switch-padding)*2);
314
- }
315
- &-lg{
316
- --switch-w: 36px;
317
- --switch-h: 18px;
318
- --switch-padding: 3px;
319
- --switch-ball-size: calc( var(--switch-h) - var(--switch-padding)*2);
320
- }
321
- &-with-description{
322
- .switch-item{
323
- margin-top: .35em;
324
- }
325
- .check-label{
326
- display: flex;
327
- }
328
- }
329
- &-display .check-label{
330
- cursor: auto;
331
- }
332
- }
333
- @each $color, $value in $colors {
334
- .check-switch-group.check-switch-group-#{$color}{
335
- &:hover .check-label .switch-item{
336
- background-color: rgba($value, .5);
337
- }
338
- > input[type="checkbox"], > input[type="radio"]{
339
- &:checked:not(:disabled) ~ .check-label .switch-item{
340
- background-color: $value;
341
- }
342
- }
343
- &.check-switch-group-display{
344
- pointer-events: none;
345
- }
346
- &.check-switch-group-display.active .check-label .switch-item{
347
- background-color: $value;
348
- &:before{
349
- left: calc( var(--switch-w) - var(--switch-padding) - var(--switch-ball-size));
350
- }
351
- }
352
- }
353
- }
354
-
355
- // badge 版本
356
- .check-label.badge{
357
- --bs-badge-padding-x: 1em;
358
- --bs-badge-padding-y: 0.5em;
359
- --bs-badge-font-size: var(--bs-body-font-size);
360
- --bs-badge-font-weight: --bs-body-font-weight;
361
- }
362
- .check-switch-group.check-switch-group{
363
- input:not(:checked) ~ .check-label.badge{
364
- background-color: var(--gray-100);
365
- border-color: var(--gray-300);
366
- span{
367
- color: var(--gray-500);
368
- }
369
- }
370
- input:not(:checked):disabled ~ .check-label.badge{
371
- &:hover{
372
- background-color: var(--gray-100);
373
- border-color: var(--gray-300);
374
- }
375
- &:hover span, span{
376
- color: var(--gray-400);
377
- }
378
- }
379
- input:checked ~ .check-label.badge{
380
- &:hover span, span{
381
- color: currentColor;
382
- }
383
- .switch-item{
384
- background-color: currentColor;
385
- }
386
- }
387
- }
388
- @each $color, $value in $colors {
389
- .check-switch-group.check-switch-group-#{$color}{
390
- input:not(:disabled):not(:checked) ~ .check-label.badge:hover{
391
- background-color: rgba($value, .05);
392
- border-color: rgba($value, .25);
393
- .switch-item{
394
- background-color: rgba($value, .5);
395
- }
396
- span{
397
- color: rgba($value, .75);
398
- }
399
- }
400
- }
401
- }
402
- // switch ------------------------------------------
403
-
404
-
405
-
406
-
407
- // table ------------------------------------------
408
- th, td{
409
- transition: $transition-base;
410
- }
411
- .table > .thead-default:not(caption) > * > *{
412
- font-size: $font-size-sm;
413
- background-color: var(--gray-200);
414
- letter-spacing: 0.5px;
415
- }
416
-
417
- // firefox 暫不支援
418
- .table tr:has(.dropdown-delete:hover){
419
- th:not([scope="col"]), td:not([scope="col"]){
420
- --bs-table-accent-bg: transparent;
421
- --bs-table-bg: transparent;
422
- background-color: $table-danger-bg;
423
- color: var(--bs-danger);
424
- box-shadow: none;
425
- }
426
- }
427
-
428
- .table .dropdown-menu{
429
- z-index: $zindex-sticky + 1;
430
- }
431
-
432
- // table ------------------------------------------
433
-
434
-
435
-
436
- // icon ------------------------------------------
437
- .text-with-icon > *{
438
- vertical-align: middle;
439
- }
440
-
441
- .material-icons{
442
- $icon-sizes: 14, 18, 24, 28, 32;
443
-
444
- font-size: 24px;
445
- @each $size in $icon-sizes{
446
- &.icon-#{$size} { font-size: #{$size}px; }
447
- }
448
- }
449
- // icon ------------------------------------------
450
-
451
-
452
- // button ------------------------------------------
453
- .btn > *{
454
- vertical-align: middle;
455
- }
456
-
457
- .btn-round-effect{
458
- position: relative;
459
- display: inline-flex;
460
- align-items: center;
461
- justify-content: center;
462
- @include size(2em);
463
- padding: 0;
464
- text-decoration: none;
465
- *{
466
- z-index: 2;
467
- }
468
- &:before{
469
- content: "";
470
- display: block;
471
- @include position-center();
472
- border-radius: 50%;
473
- background-color: var(--bs-link-color);
474
- z-index: 1;
475
- opacity: 0;
476
- transform: scale(0);
477
- transition: $transition-base;
478
- }
479
- &:hover:before{
480
- opacity: .1;
481
- transform: scale(1);
482
- }
483
- }
484
-
485
- .btn-link-light-bg {
486
- text-decoration: none;
487
- &:hover {
488
- color: var(--bs-btn-color);
489
- background-color: rgba(var(--bs-link-color-rgb), .1);
490
- }
491
- }
492
-
493
-
494
- @keyframes gradient-position {
495
- 0% {
496
- transform: translateX(0);
497
- }
498
- 50% {
499
- transform: translateX(-50%);
500
- }
501
- 100% {
502
- transform: translateX(0);
503
- }
504
- }
505
- .btn-gradient-effect{
506
- --bs-btn-color: #fff;
507
- --bs-btn-hover-color: #fff;
508
- --bs-btn-active-color: #fff;
509
-
510
- position: relative;
511
- overflow: hidden;
512
- border: 0;
513
-
514
- &:before{
515
- content: "";
516
- display: block;
517
- position: absolute;
518
- top: 0; left: 0;
519
- width: 200%; height: 100%;
520
- background: linear-gradient(110deg, $cyan 0%, $purple 50%, $cyan 100%);
521
- animation: gradient-position 3s ease-in-out infinite;
522
- animation-fill-mode: both;
523
- z-index: 1;
524
- transition: $transition-base;
525
- }
526
- &, &:hover, &:hover:active{
527
- background-color: $primary;
528
- }
529
- &:hover:before{
530
- opacity: .4;
531
- }
532
- &:focus{
533
- box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
534
- }
535
- > *{
536
- position: relative;
537
- z-index: 2;
538
- }
539
- }
540
- // button ------------------------------------------
541
-
542
-
543
- // input ------------------------------------------
544
- .form-group{
545
- > label, .form-label{
546
- margin-bottom: 0.25rem;
547
- color: var(--gray-500);
548
- font-size: $font-size-sm;
549
- font-weight: $font-weight-bold;
550
- }
551
- }
552
-
553
- .form-group-frame{
554
- padding: 1rem;
555
- border-bottom: $border-width solid $border-color;
556
- }
557
- // input ------------------------------------------
558
-
559
-
560
- // image ------------------------------------------
561
- .thumbnail-content{
562
- $thumbnail-sizes: 32, 50, 100, 150;
563
-
564
- @include size(50px);
565
- background-color: $white;
566
- background-position: 50% 50%;
567
- background-size: cover;
568
- border: $border-width solid var(--#{$prefix}border-color);
569
- border-radius: 50%;
570
- overflow: hidden;
571
- @each $size in $thumbnail-sizes{
572
- &.thumbnail-#{$size} { @include solid-size(#{$size}px); }
573
- }
574
- &.thumbnail-rwd{
575
- @include rwd-square(100%);
576
- }
577
- }
578
- // image ------------------------------------------
579
-
580
-
581
- // dropdown ------------------------------------------
582
- .dropdown-menu{
583
- box-shadow: $box-shadow;
584
- }
585
- .dropdown-delete{
586
- color: $danger;
587
- &:hover{
588
- --bs-dropdown-link-hover-bg: var(--bs-danger);
589
- background-color: $danger;
590
- }
591
- }
592
- .dropdown-menu{
593
- --scrollbar-width: 8px;
594
- --scrollbar-hover-color: rgba(var(--bs-link-color-rgb), 0.5);
595
- overflow: auto;
596
- overscroll-behavior: contain;
597
- @include scrollbar();
598
- }
599
- // dropdown ------------------------------------------
600
-
601
-
602
- // modal ------------------------------------------
603
- .modal{
604
- backdrop-filter: var(--backdrop-blur);
605
- }
606
-
607
- .modal-md{
608
- min-width: 650px;
609
- }
610
-
611
- .modal-long-content .overflow-y-auto{
612
- height: 75vh;
613
- }
614
- // modal ------------------------------------------
615
-
616
-
617
- // offcanvas ------------------------------------------
618
- .offcanvas-backdrop{
619
- background-color: rgba($offcanvas-backdrop-bg, $offcanvas-backdrop-opacity);
620
- &.show{
621
- backdrop-filter: var(--backdrop-blur);
622
- opacity: 1;
623
- }
624
- }
625
- .offcanvas{
626
- &-md-size{
627
- --bs-offcanvas-width: 550px;
628
- }
629
- &-lg-size{
630
- --bs-offcanvas-width: 800px;
631
- }
632
- &-xl-size{
633
- --bs-offcanvas-width: 1000px;
634
- }
635
- }
636
- // offcanvas ------------------------------------------
637
-
638
-
639
- // navbar ------------------------------------------
640
- $navbar-h: 60px;
641
- .navbar-main{
642
- &, .btn.btn-normal, .navbar-line-item {
643
- min-height: $navbar-h;
644
- }
645
- .btn.btn-normal{
646
- @include flex-center();
647
- border-radius: 0;
648
- color: var(--bs-nav-link-color);
649
- &:hover{
650
- color: var(--bs-link-color);
651
- background-color: $primary-bg-light;
652
- }
653
- }
654
- .btn-square{
655
- @include size($navbar-h);
656
- }
657
- }
658
- // navbar ------------------------------------------
659
-
660
-
661
- // 側邊的清單 ------------------------------------------
662
-
663
- $list-highlight-border-w: .4rem;
664
-
665
- @mixin list-group-active(){
666
- font-weight: $font-weight-medium;
667
- border-left-color: currentColor;
668
- --bs-list-group-active-color: var(--bs-link-color);
669
- --bs-list-group-active-bg: transparent;
670
- @include gradient-bg();
671
- }
672
-
673
- .list-group{
674
- overflow: hidden;
675
- > li{
676
- position: relative;
677
- }
678
- .material-icon-more{
679
- transition: $transition-base;
680
- }
681
- }
682
-
683
- // 一般選單 style
684
- $list-item-padding-x: 1rem;
685
-
686
- .list-group-aside{
687
- border-radius: 0;
688
- .list-group-item{
689
- display: flex;
690
- align-items: center;
691
- padding: .8rem $list-item-padding-x;
692
- border-right: 0;
693
- border-color: transparent;
694
- border-left: $list-highlight-border-w solid transparent;
695
- background-color: var(--bs-body-bg);
696
- cursor: pointer;
697
- transition: $transition-base;
698
- &:before{ content: ""; }
699
- &.active{
700
- @include list-group-active();
701
- }
702
- &:not(.active):hover{
703
- border-top-color: var(--bs-body-bg);
704
- border-bottom-color: rgba(var(--bs-link-color-rgb), .1);
705
- border-left-color: $primary-sub-highlight;
706
- --bs-list-group-action-hover-color: rgba(var(--bs-link-color-rgb), .8);
707
- --bs-list-group-action-hover-bg: transparent;
708
- @include gradient-bg-hover-to-show(.7);
709
- }
710
- &:hover .material-icon-more{
711
- color: var(--bs-link-color);
712
- }
713
- }
714
- }
715
-
716
- // 子選單 style
717
- .child-body, .child-container{
718
- width: 100%;
719
- }
720
- .child-body{
721
- background: var(--gray-100);
722
- }
723
- .child-container{
724
- border-left: $list-highlight-border-w solid var(--gray-400);
725
- }
726
- .child-list-head{
727
- padding: .25rem $list-item-padding-x;
728
- color: var(--gray-500);
729
- background-color: var(--gray-200);
730
- font-weight: $font-weight-bold;
731
- border-bottom: $border-width solid var(--gray-400);
732
- }
733
- a.child-list-item{
734
- position: relative;
735
- display: block;
736
- padding: .5rem $list-item-padding-x;
737
- font-size: $font-size-sm;
738
-
739
- &:hover{
740
- color: var(--bs-link-color);
741
- }
742
- &.active{
743
- color: var(--bs-link-color);
744
- @include gradient-bg();
745
- }
746
- &.disabled, &:disabled{
747
- color: var(--bs-list-group-disabled-color);
748
- pointer-events: none;
749
- }
750
- @include gradient-bg-hover-to-show(.7);
751
- }
752
-
753
-
754
- // 子選單開合
755
- // https://stackoverflow.com/questions/3508605/how-can-i-transition-height-0-to-height-auto-using-css
756
- $list-toogle-speed: .35s;
757
- $list-toogle-in-background: $list-toogle-speed linear;
758
-
759
- .list-group-haschild:hover ~ .child-body{
760
- &:after{ will-change: height, max-height; }
761
- > .child-container { will-change: max-height, margin-bottom; }
762
- }
763
-
764
- .child-body{
765
- position: relative;
766
- display: flex;
767
- overflow: hidden;
768
- &:after { content: ''; }
769
- // 關閉 -----------------
770
- &:after{
771
- height: 0;
772
- max-height: 50px;
773
- transition: height $list-toogle-in-background;
774
- }
775
- > .child-container {
776
- margin-bottom: -2000px;
777
- visibility: hidden;
778
- max-height: 0;
779
- transition: margin-bottom $list-toogle-speed cubic-bezier(1, 0, 1, 1),
780
- visibility 0s $list-toogle-speed,
781
- max-height 0s $list-toogle-speed;
782
- }
783
- // 關閉 -----------------
784
- }
785
-
786
- .list-group-haschild-input:checked{
787
- ~ .list-group-item{
788
- @include list-group-active();
789
- .material-icon-more{
790
- transform: rotate(-180deg);
791
- }
792
- }
793
- ~ .child-body{
794
- // 打開 -----------------
795
- &:after {
796
- height: 50px;
797
- transition: height $list-toogle-in-background,
798
- max-height 0s $list-toogle-in-background;
799
- max-height: 0px;
800
- }
801
- > .child-container{
802
- transition: margin-bottom $list-toogle-speed cubic-bezier(0, 0, 0, 1);
803
- margin-bottom: 0;
804
- visibility: visible;
805
- max-height: 1000000px;
806
- }
807
- // 打開 -----------------
808
- }
809
- }
810
-
811
- // 側邊的清單 ------------------------------------------
812
-
813
-
814
-
815
- // navbar ------------------------------------------
816
- .nav-link.active{
817
- font-weight: $font-weight-bold;
818
- }
819
- // navbar ------------------------------------------
820
-
821
-
822
- // 有底線的 tab bar ------------------------------------------
823
- .navbar-line{
824
- &:hover .navbar-line-item{
825
- &:before { will-change: width, left; }
826
- ~ .navbar-line-item:before{ will-change: left; }
827
- }
828
- // LG 版本 (底線較粗)
829
- &.navbar-line-lg .navbar-line-item:before{
830
- border-bottom-width: 4px;
831
- }
832
- }
833
-
834
- a.navbar-line-item{
835
- --bs-link-color-rgb: 100, 122, 241;
836
- }
837
- .navbar-line-item{
838
- position: relative;
839
- @include flex-center();
840
- --bs-navbar-nav-link-padding-x: 1.5rem;
841
- color: var(--bs-nav-link-color);
842
- &:before{
843
- content: "";
844
- position: absolute;
845
- top: 0;
846
- left: 100%;
847
- width: 0;
848
- height: 100%;
849
- border-bottom: 2px solid var(--bs-link-color);
850
- transition: $transition-base;
851
- pointer-events: none;
852
- z-index: 1;
853
- }
854
- &:hover{
855
- background: $primary-bg-light;
856
- &:before {
857
- width: 100%;
858
- left: 0;
859
- }
860
- ~ .navbar-line-item:before{
861
- left: 0;
862
- }
863
- }
864
- &:not(.active):hover:before{
865
- border-color: $primary-sub-highlight;
866
- }
867
- &.active:before{
868
- width: 100%;
869
- left: 0;
870
- }
871
- }
872
- // dropdown 版本
873
- .navbar-line-item.dropdown{
874
- padding: 0;
875
- padding-left: 0 !important;
876
- padding-right: 0 !important;
877
- // (firefox 暫不支援)
878
- &:has(.dropdown-toggle[aria-expanded="true"]){
879
- background: $primary-bg-light;
880
- &:before{
881
- width: 100%;
882
- left: 0;
883
- border-bottom-color: $primary-sub-highlight;
884
- }
885
- }
886
- &:not(.active) .dropdown-link{
887
- color: var(--bs-nav-link-color);
888
- }
889
- .dropdown-link{
890
- @include flex-center();
891
- height: 100%;
892
- padding: var(--bs-nav-link-padding-y) var(--bs-navbar-nav-link-padding-x);
893
- }
894
- .dropdown-toggle[aria-expanded="true"]{
895
- color: $primary;
896
- }
897
- }
898
-
899
-
900
- .navbar[data-bs-theme="dark"]{
901
- --dark-theme-primary: #bec9ff;
902
- .navbar-line-item.dropdown:not(.active) .dropdown-link{
903
- color: var(--dark-theme-primary);
904
- }
905
- .navbar-nav .show > .nav-link, .navbar-nav .nav-link.active{
906
- &, a{
907
- color: $white;
908
- }
909
- }
910
- .navbar-line-item:before{
911
- border-bottom-color: var(--dark-theme-primary);
912
- }
913
- .navbar-line-item.dropdown:not(.active) .dropdown-link,
914
- .navbar-line-item:before{
915
- opacity: .9;
916
- }
917
- }
918
- // 有底線的 tab bar ------------------------------------------
919
-
920
-
921
-
922
- // 固定寬度 ------------------------------------------
923
- .w-33{
924
- width: 33.33%;
925
- }
926
- .w-66{
927
- width: 66.66%;
928
- }
929
- @for $i from 1 through 25 {
930
- .w-#{$i}rem {
931
- width: #{$i}rem;
932
- }
933
- }
934
-
935
- // 固定寬度 ------------------------------------------
936
-
937
-
938
-
939
- // 無內容物 UI ------------------------------------------
940
- .no-content{
941
- padding-top: 10rem;
942
- .content-img > .material-icons, p{
943
- opacity: .7;
944
- }
945
- .content-img > .material-icons{
946
- font-size: 6rem;
947
- margin-bottom: 0.5rem;
948
- opacity: .5;
949
- }
950
- p{
951
- font-size: 1.25rem;
952
- }
953
- }
954
- // 無內容物 UI ------------------------------------------
955
-
956
-
957
-
958
- // 暫定:螢幕寬度小於 991px (含) 不可使用 ------------------------------------------
959
- .mobile-forbidden{
960
- display: none;
961
- }
962
- @media only screen and (max-width: 991px) {
963
- body{
964
- overflow: hidden;
965
- }
966
- .mobile-forbidden{
967
- position: fixed;
968
- top: 0;
969
- left: 0;
970
- right: 0;
971
- bottom: 0;
972
- margin: auto;
973
- @include flex-center();
974
- flex-direction: column;
975
- padding: 2rem;
976
- font-size: $font-size-lg;
977
- text-align: center;
978
- color: var(--gray-500);
979
- background: $white $gradient-blue-light;
980
- z-index: $zindex-max;
981
- img {
982
- width: 20rem;
983
- }
984
- }
985
- }
986
- // 暫定:螢幕寬度小於 991px (含) 不可使用 ------------------------------------------
987
-
988
-
989
-
990
- // sweet alert ------------------------------------------
991
- .swal2-container{
992
- &.swal2-backdrop-show, &.swal2-noanimation{
993
- backdrop-filter: var(--backdrop-blur);
994
- }
995
- }
996
-
997
- div:where(.swal2-container){
998
- .swal2-html-container{
999
- font-size: 1rem !important;
1000
- color: var(--bs-body-color) !important;
1001
- }
1002
- h2:where(.swal2-title){
1003
- font-size: 1.5rem !important;
1004
- color: var(--bs-emphasis-color) !important;
1005
- }
1006
- .swal2-actions{
1007
- flex-direction: row-reverse;
1008
- width: 100%;
1009
- }
1010
- button:where(.swal2-styled){
1011
- margin-left: .5rem !important;
1012
- margin-right: .5rem !important;
1013
- }
1014
-
1015
- button:where(.swal2-styled).swal2-cancel{
1016
- background-color: $secondary !important;
1017
- }
1018
- }
1
+ // ====================================
2
+ // Plugin
3
+ // ====================================
4
+
5
+ // Custom Bootstrap
6
+ @import "../../../../bootstrap/scss/functions";
7
+ @import "../Settings/bs-variables";
8
+ @import "../../../../bootstrap/scss/bootstrap.scss";
9
+
10
+
11
+ // ====================================
12
+ // Helpers
13
+ // ====================================
14
+
15
+ // Mixins
16
+ @import "../Settings/Mixins";
17
+
18
+
19
+ // ====================================
20
+ // Custom Style
21
+ // ====================================
22
+
23
+ @import "../Settings/color-mode";
24
+ @import "../Settings/custom-variables";
25
+
26
+
27
+ @mixin gradient-bg(){
28
+ &:before{
29
+ content: "";
30
+ display: block;
31
+ @include position-center();
32
+ z-index: 0;
33
+ background: $gradient-blue-light;
34
+ pointer-events: none;
35
+ transition: $transition-base;
36
+ }
37
+ }
38
+
39
+ @mixin gradient-bg-hover-to-show($opacity: 1){
40
+ @include gradient-bg();
41
+ &:before{ opacity: 0; }
42
+ &:hover:before{ opacity: $opacity; }
43
+ }
44
+
45
+ // general ------------------------------------------
46
+ [v-cloak]{
47
+ display: none !important;
48
+ }
49
+
50
+ body,
51
+ .overflow-auto, .overflow-scroll,
52
+ .overflow-y-auto, .overflow-y-scroll,
53
+ .offcanvas-body, textarea{
54
+ @include scrollbar();
55
+ }
56
+
57
+ .overflow-x-auto, .overflow-x-scroll, .scrollbar-sm, .table-responsive{
58
+ @include scrollbar();
59
+ --scrollbar-width: 6px;
60
+ overflow-x: auto;
61
+ -webkit-overflow-scrolling: touch;
62
+ }
63
+
64
+ .scrollbar-gutter-stable{
65
+ // Safari 暫不支援
66
+ scrollbar-gutter: stable;
67
+ }
68
+
69
+ body{
70
+ background-color: var(--gray-200);
71
+ --maz-color-primary: var(--bs-primary);
72
+ --maz-color-secondary: var(--bs-secondary);
73
+ --maz-color-info: var(--bs-info);
74
+ --maz-color-success: var(--bs-success);
75
+ --maz-color-warning: var(--bs-warning);
76
+ --maz-color-danger: var(--bs-danger);
77
+ --maz-color-bg: var(--bs-body-bg);
78
+ --maz-color-text: var(--bs-body-color);
79
+ --maz-color-muted: var(--bs-secondary-color);
80
+ }
81
+
82
+ ul, ol{
83
+ &.list-reset{
84
+ list-style-type: none;
85
+ padding-left: 0;
86
+ }
87
+ }
88
+ // general ------------------------------------------
89
+
90
+
91
+ // text / link ------------------------------------------
92
+ a{
93
+ text-decoration: none;
94
+ // 如果需要底線使用 <u></u> tag
95
+ transition: $transition-base;
96
+ &.a-reset-color{
97
+ color: inherit;
98
+ }
99
+ &.a-hover-gradient{
100
+ position: relative;
101
+ @include gradient-bg-hover-to-show();
102
+ }
103
+ }
104
+
105
+ .text-link{
106
+ color: var(--bs-link-color);
107
+ &:hover{
108
+ color: var(--bs-link-hover-color);
109
+ }
110
+ }
111
+
112
+ .text-pre-wrap{
113
+ white-space: pre-wrap;
114
+ }
115
+
116
+ .fs-min{
117
+ font-size: 12px;
118
+ }
119
+
120
+ .text-overflow{
121
+ @include text-overflow();
122
+ }
123
+
124
+ @for $i from 1 through 5 {
125
+ .text-line-clamp-#{$i} {
126
+ @include text-line-clamp(#{$i});
127
+ }
128
+ }
129
+
130
+ @for $i from 1 through 5 {
131
+ .letter-spacing-#{$i} {
132
+ letter-spacing: #{$i}px;
133
+ }
134
+ }
135
+
136
+ // text / link ------------------------------------------
137
+
138
+
139
+ // border ------------------------------------------
140
+ .hover-border{
141
+ transition: $transition-base;
142
+ &:hover{
143
+ box-shadow: $focus-ring-box-shadow;
144
+ }
145
+ }
146
+ .active-border{
147
+ box-shadow: $focus-ring-box-shadow;
148
+ }
149
+ // border ------------------------------------------
150
+
151
+
152
+ // badge outline ------------------------------------------
153
+
154
+ @each $color, $value in $colors {
155
+ .badge-outline-#{$color}{
156
+ color: $value;
157
+ border: $border-width solid rgba($value, .5);
158
+ background-color: rgba($value, .1);
159
+ }
160
+ }
161
+
162
+ // badge outline ------------------------------------------
163
+
164
+
165
+ // input ------------------------------------------
166
+ .form-control{
167
+ caret-color: $primary;
168
+ }
169
+ // input ------------------------------------------
170
+
171
+
172
+ // checkbox / radio ------------------------------------------
173
+
174
+ .check-label{
175
+ cursor: pointer;
176
+ &, &:before, span{
177
+ vertical-align: middle;
178
+ transition: $transition-base;
179
+ }
180
+ &:before{
181
+ content: "check_box_outline_blank";
182
+ display: inline-block;
183
+ margin-right: .1em;
184
+ color: var(--gray-500);
185
+ font-family: 'Material Icons';
186
+ font-size: 120%;
187
+ line-height: inherit;
188
+ white-space: nowrap;
189
+ -webkit-font-feature-settings: 'liga';
190
+ -webkit-font-smoothing: antialiased;
191
+ }
192
+ &:not(.badge):hover{
193
+ &, &:before, span{
194
+ color: $primary;
195
+ }
196
+ }
197
+ }
198
+
199
+ .check-group{
200
+ position: relative;
201
+ display: inline-block;
202
+ vertical-align: middle;
203
+ &:not(:last-child){
204
+ margin-right: 1em;
205
+ }
206
+ > input[type="checkbox"], > input[type="radio"]{
207
+ position: absolute;
208
+ opacity: 0;
209
+ pointer-events: none;
210
+ &:checked ~ .check-label:before{
211
+ color: $primary;
212
+ }
213
+ // disabled style
214
+ &:disabled ~ .check-label{
215
+ cursor: not-allowed;
216
+ span, &:hover span,
217
+ &:before, &:hover &:before{
218
+ color: var(--gray-500);
219
+ }
220
+ }
221
+ &:checked:disabled ~ .check-label{
222
+ &:before, &:hover &:before{
223
+ color: var(--gray-600);
224
+ }
225
+ }
226
+ }
227
+ > input[type="checkbox"] ~ .check-label:before{ content: "check_box_outline_blank"; }
228
+ > input[type="radio"] ~ .check-label:before{ content: "radio_button_unchecked"; }
229
+ > input[type="checkbox"]:checked ~ .check-label:before{ content: "check_box"; }
230
+ > input[type="radio"]:checked ~ .check-label:before{ content: "radio_button_checked"; }
231
+ }
232
+ // checkbox / radio ------------------------------------------
233
+
234
+ // star ------------------------------------------
235
+ .check-star-group{
236
+ > input[type="checkbox"], > input[type="radio"]{
237
+ ~ .check-label:before{
238
+ content: "star_border";
239
+ font-size: 1.5em;
240
+ }
241
+ ~ .check-label:hover:before{
242
+ color: $warning;
243
+ }
244
+ &:checked ~ .check-label:before{
245
+ content: "star";
246
+ color: $warning;
247
+ }
248
+ }
249
+ }
250
+ // star ------------------------------------------
251
+
252
+
253
+ // switch ------------------------------------------
254
+
255
+ :root{
256
+ --switch-w: 24px;
257
+ --switch-h: 12px;
258
+ --switch-padding: 2px;
259
+ --switch-ball-size: calc( var(--switch-h) - var(--switch-padding)*2);
260
+
261
+ }
262
+ .check-switch-group{
263
+ // reset
264
+ .check-label:before{ content: ""; }
265
+ .check-label .switch-item{
266
+ position: relative;
267
+ display: inline-block;
268
+ width: var(--switch-w);
269
+ height: var(--switch-h);
270
+ border-radius: var(--switch-h);
271
+ background-color: var(--gray-500);
272
+ vertical-align: middle;
273
+ &, &:before{
274
+ transition: $transition-base;
275
+ }
276
+ &:before{
277
+ content: "";
278
+ position: absolute;
279
+ top: 0;
280
+ left: var(--switch-padding);
281
+ bottom: 0;
282
+ margin: auto;
283
+ @include size(var(--switch-ball-size));
284
+ border-radius: 50%;
285
+ background-color: $white;
286
+ }
287
+ }
288
+ > input[type="checkbox"], > input[type="radio"]{
289
+ // reset
290
+ ~ .check-label:before{ content: ""; }
291
+ &:checked ~ .check-label:before{ content: ""; }
292
+
293
+ &:not(:disabled) ~ .check-label:hover .switch-item:before{
294
+ will-change: left;
295
+ }
296
+
297
+ &:checked ~ .check-label .switch-item:before{
298
+ left: calc( var(--switch-w) - var(--switch-padding) - var(--switch-ball-size));
299
+ }
300
+
301
+ // disabled style
302
+ &:disabled ~ .check-label .switch-item{
303
+ background-color: var(--gray-400);
304
+ }
305
+ &:checked:disabled ~ .check-label .switch-item{
306
+ background-color: var(--gray-600);
307
+ }
308
+ }
309
+ &-md{
310
+ --switch-w: 30px;
311
+ --switch-h: 15px;
312
+ --switch-padding: 3px;
313
+ --switch-ball-size: calc( var(--switch-h) - var(--switch-padding)*2);
314
+ }
315
+ &-lg{
316
+ --switch-w: 36px;
317
+ --switch-h: 18px;
318
+ --switch-padding: 3px;
319
+ --switch-ball-size: calc( var(--switch-h) - var(--switch-padding)*2);
320
+ }
321
+ &-with-description{
322
+ .switch-item{
323
+ margin-top: .35em;
324
+ }
325
+ .check-label{
326
+ display: flex;
327
+ }
328
+ }
329
+ &-display .check-label{
330
+ cursor: auto;
331
+ }
332
+ }
333
+ @each $color, $value in $colors {
334
+ .check-switch-group.check-switch-group-#{$color}{
335
+ &:hover .check-label .switch-item{
336
+ background-color: rgba($value, .5);
337
+ }
338
+ > input[type="checkbox"], > input[type="radio"]{
339
+ &:checked:not(:disabled) ~ .check-label .switch-item{
340
+ background-color: $value;
341
+ }
342
+ }
343
+ &.check-switch-group-display{
344
+ pointer-events: none;
345
+ }
346
+ &.check-switch-group-display.active .check-label .switch-item{
347
+ background-color: $value;
348
+ &:before{
349
+ left: calc( var(--switch-w) - var(--switch-padding) - var(--switch-ball-size));
350
+ }
351
+ }
352
+ }
353
+ }
354
+
355
+ // badge 版本
356
+ .check-label.badge{
357
+ --bs-badge-padding-x: 1em;
358
+ --bs-badge-padding-y: 0.5em;
359
+ --bs-badge-font-size: var(--bs-body-font-size);
360
+ --bs-badge-font-weight: --bs-body-font-weight;
361
+ }
362
+ .check-switch-group.check-switch-group{
363
+ input:not(:checked) ~ .check-label.badge{
364
+ background-color: var(--gray-100);
365
+ border-color: var(--gray-300);
366
+ span{
367
+ color: var(--gray-500);
368
+ }
369
+ }
370
+ input:not(:checked):disabled ~ .check-label.badge{
371
+ &:hover{
372
+ background-color: var(--gray-100);
373
+ border-color: var(--gray-300);
374
+ }
375
+ &:hover span, span{
376
+ color: var(--gray-400);
377
+ }
378
+ }
379
+ input:checked ~ .check-label.badge{
380
+ &:hover span, span{
381
+ color: currentColor;
382
+ }
383
+ .switch-item{
384
+ background-color: currentColor;
385
+ }
386
+ }
387
+ }
388
+ @each $color, $value in $colors {
389
+ .check-switch-group.check-switch-group-#{$color}{
390
+ input:not(:disabled):not(:checked) ~ .check-label.badge:hover{
391
+ background-color: rgba($value, .05);
392
+ border-color: rgba($value, .25);
393
+ .switch-item{
394
+ background-color: rgba($value, .5);
395
+ }
396
+ span{
397
+ color: rgba($value, .75);
398
+ }
399
+ }
400
+ }
401
+ }
402
+ // switch ------------------------------------------
403
+
404
+
405
+
406
+
407
+ // table ------------------------------------------
408
+ th, td{
409
+ transition: $transition-base;
410
+ }
411
+ .table > .thead-default:not(caption) > * > *{
412
+ font-size: $font-size-sm;
413
+ background-color: var(--gray-200);
414
+ letter-spacing: 0.5px;
415
+ }
416
+
417
+ // firefox 暫不支援
418
+ .table tr:has(.dropdown-delete:hover){
419
+ th:not([scope="col"]), td:not([scope="col"]){
420
+ --bs-table-accent-bg: transparent;
421
+ --bs-table-bg: transparent;
422
+ background-color: $table-danger-bg;
423
+ color: var(--bs-danger);
424
+ box-shadow: none;
425
+ }
426
+ }
427
+
428
+ .table .dropdown-menu{
429
+ z-index: $zindex-sticky + 1;
430
+ }
431
+
432
+ // table ------------------------------------------
433
+
434
+
435
+
436
+ // icon ------------------------------------------
437
+ .text-with-icon > *{
438
+ vertical-align: middle;
439
+ }
440
+
441
+ .material-icons{
442
+ $icon-sizes: 14, 18, 24, 28, 32;
443
+
444
+ font-size: 24px;
445
+ @each $size in $icon-sizes{
446
+ &.icon-#{$size} { font-size: #{$size}px; }
447
+ }
448
+ }
449
+ // icon ------------------------------------------
450
+
451
+
452
+ // button ------------------------------------------
453
+ .btn > *{
454
+ vertical-align: middle;
455
+ }
456
+
457
+ .btn-round-effect{
458
+ position: relative;
459
+ display: inline-flex;
460
+ align-items: center;
461
+ justify-content: center;
462
+ @include size(2em);
463
+ padding: 0;
464
+ text-decoration: none;
465
+ *{
466
+ z-index: 2;
467
+ }
468
+ &:before{
469
+ content: "";
470
+ display: block;
471
+ @include position-center();
472
+ border-radius: 50%;
473
+ background-color: var(--bs-link-color);
474
+ z-index: 1;
475
+ opacity: 0;
476
+ transform: scale(0);
477
+ transition: $transition-base;
478
+ }
479
+ &:hover:before{
480
+ opacity: .1;
481
+ transform: scale(1);
482
+ }
483
+ }
484
+
485
+ .btn-link-light-bg {
486
+ text-decoration: none;
487
+ &:hover {
488
+ color: var(--bs-btn-color);
489
+ background-color: rgba(var(--bs-link-color-rgb), .1);
490
+ }
491
+ }
492
+
493
+
494
+ @keyframes gradient-position {
495
+ 0% {
496
+ transform: translateX(0);
497
+ }
498
+ 50% {
499
+ transform: translateX(-50%);
500
+ }
501
+ 100% {
502
+ transform: translateX(0);
503
+ }
504
+ }
505
+ .btn-gradient-effect{
506
+ --bs-btn-color: #fff;
507
+ --bs-btn-hover-color: #fff;
508
+ --bs-btn-active-color: #fff;
509
+
510
+ position: relative;
511
+ overflow: hidden;
512
+ border: 0;
513
+
514
+ &:before{
515
+ content: "";
516
+ display: block;
517
+ position: absolute;
518
+ top: 0; left: 0;
519
+ width: 200%; height: 100%;
520
+ background: linear-gradient(110deg, $cyan 0%, $purple 50%, $cyan 100%);
521
+ animation: gradient-position 3s ease-in-out infinite;
522
+ animation-fill-mode: both;
523
+ z-index: 1;
524
+ transition: $transition-base;
525
+ }
526
+ &, &:hover, &:hover:active{
527
+ background-color: $primary;
528
+ }
529
+ &:hover:before{
530
+ opacity: .4;
531
+ }
532
+ &:focus{
533
+ box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
534
+ }
535
+ > *{
536
+ position: relative;
537
+ z-index: 2;
538
+ }
539
+ }
540
+ // button ------------------------------------------
541
+
542
+
543
+ // input ------------------------------------------
544
+ .form-group{
545
+ > label, .form-label{
546
+ margin-bottom: 0.25rem;
547
+ color: var(--gray-500);
548
+ font-size: $font-size-sm;
549
+ font-weight: $font-weight-bold;
550
+ }
551
+ }
552
+
553
+ .form-group-frame{
554
+ padding: 1rem;
555
+ border-bottom: $border-width solid $border-color;
556
+ }
557
+ // input ------------------------------------------
558
+
559
+
560
+ // image ------------------------------------------
561
+ .thumbnail-content{
562
+ $thumbnail-sizes: 32, 50, 100, 150;
563
+
564
+ @include size(50px);
565
+ background-color: $white;
566
+ background-position: 50% 50%;
567
+ background-size: cover;
568
+ border: $border-width solid var(--#{$prefix}border-color);
569
+ border-radius: 50%;
570
+ overflow: hidden;
571
+ @each $size in $thumbnail-sizes{
572
+ &.thumbnail-#{$size} { @include solid-size(#{$size}px); }
573
+ }
574
+ &.thumbnail-rwd{
575
+ @include rwd-square(100%);
576
+ }
577
+ }
578
+ // image ------------------------------------------
579
+
580
+
581
+ // dropdown ------------------------------------------
582
+ .dropdown-menu{
583
+ box-shadow: $box-shadow;
584
+ }
585
+ .dropdown-delete{
586
+ color: $danger;
587
+ &:hover{
588
+ --bs-dropdown-link-hover-bg: var(--bs-danger);
589
+ background-color: $danger;
590
+ }
591
+ }
592
+ .dropdown-menu{
593
+ --scrollbar-width: 8px;
594
+ --scrollbar-hover-color: rgba(var(--bs-link-color-rgb), 0.5);
595
+ overflow: auto;
596
+ overscroll-behavior: contain;
597
+ @include scrollbar();
598
+ }
599
+ // dropdown ------------------------------------------
600
+
601
+
602
+ // modal ------------------------------------------
603
+ .modal{
604
+ backdrop-filter: var(--backdrop-blur);
605
+ }
606
+
607
+ .modal-md{
608
+ min-width: 650px;
609
+ }
610
+
611
+ .modal-long-content .overflow-y-auto{
612
+ height: 75vh;
613
+ }
614
+ // modal ------------------------------------------
615
+
616
+
617
+ // offcanvas ------------------------------------------
618
+ .offcanvas-backdrop{
619
+ background-color: rgba($offcanvas-backdrop-bg, $offcanvas-backdrop-opacity);
620
+ &.show{
621
+ backdrop-filter: var(--backdrop-blur);
622
+ opacity: 1;
623
+ }
624
+ }
625
+ .offcanvas{
626
+ &-md-size{
627
+ --bs-offcanvas-width: 550px;
628
+ }
629
+ &-lg-size{
630
+ --bs-offcanvas-width: 800px;
631
+ }
632
+ &-xl-size{
633
+ --bs-offcanvas-width: 1000px;
634
+ }
635
+ }
636
+ // offcanvas ------------------------------------------
637
+
638
+
639
+ // navbar ------------------------------------------
640
+ $navbar-h: 60px;
641
+ .navbar-main{
642
+ &, .btn.btn-normal, .navbar-line-item {
643
+ min-height: $navbar-h;
644
+ }
645
+ .btn.btn-normal{
646
+ @include flex-center();
647
+ border-radius: 0;
648
+ color: var(--bs-nav-link-color);
649
+ &:hover{
650
+ color: var(--bs-link-color);
651
+ background-color: $primary-bg-light;
652
+ }
653
+ }
654
+ .btn-square{
655
+ @include size($navbar-h);
656
+ }
657
+ }
658
+ // navbar ------------------------------------------
659
+
660
+
661
+ // 側邊的清單 ------------------------------------------
662
+
663
+ $list-highlight-border-w: .4rem;
664
+
665
+ @mixin list-group-active(){
666
+ font-weight: $font-weight-medium;
667
+ border-left-color: currentColor;
668
+ --bs-list-group-active-color: var(--bs-link-color);
669
+ --bs-list-group-active-bg: transparent;
670
+ @include gradient-bg();
671
+ }
672
+
673
+ .list-group{
674
+ overflow: hidden;
675
+ > li{
676
+ position: relative;
677
+ }
678
+ .material-icon-more{
679
+ transition: $transition-base;
680
+ }
681
+ }
682
+
683
+ // 一般選單 style
684
+ $list-item-padding-x: 1rem;
685
+
686
+ .list-group-aside{
687
+ border-radius: 0;
688
+ .list-group-item{
689
+ display: flex;
690
+ align-items: center;
691
+ padding: .8rem $list-item-padding-x;
692
+ border-right: 0;
693
+ border-color: transparent;
694
+ border-left: $list-highlight-border-w solid transparent;
695
+ background-color: var(--bs-body-bg);
696
+ cursor: pointer;
697
+ transition: $transition-base;
698
+ &:before{ content: ""; }
699
+ &.active{
700
+ @include list-group-active();
701
+ }
702
+ &:not(.active):hover{
703
+ border-top-color: var(--bs-body-bg);
704
+ border-bottom-color: rgba(var(--bs-link-color-rgb), .1);
705
+ border-left-color: $primary-sub-highlight;
706
+ --bs-list-group-action-hover-color: rgba(var(--bs-link-color-rgb), .8);
707
+ --bs-list-group-action-hover-bg: transparent;
708
+ @include gradient-bg-hover-to-show(.7);
709
+ }
710
+ &:hover .material-icon-more{
711
+ color: var(--bs-link-color);
712
+ }
713
+ }
714
+ }
715
+
716
+ // 子選單 style
717
+ .child-body, .child-container{
718
+ width: 100%;
719
+ }
720
+ .child-body{
721
+ background: var(--gray-100);
722
+ }
723
+ .child-container{
724
+ border-left: $list-highlight-border-w solid var(--gray-400);
725
+ }
726
+ .child-list-head{
727
+ padding: .25rem $list-item-padding-x;
728
+ color: var(--gray-500);
729
+ background-color: var(--gray-200);
730
+ font-weight: $font-weight-bold;
731
+ border-bottom: $border-width solid var(--gray-400);
732
+ }
733
+ a.child-list-item{
734
+ position: relative;
735
+ display: block;
736
+ padding: .5rem $list-item-padding-x;
737
+ font-size: $font-size-sm;
738
+
739
+ &:hover{
740
+ color: var(--bs-link-color);
741
+ }
742
+ &.active{
743
+ color: var(--bs-link-color);
744
+ @include gradient-bg();
745
+ }
746
+ &.disabled, &:disabled{
747
+ color: var(--bs-list-group-disabled-color);
748
+ pointer-events: none;
749
+ }
750
+ @include gradient-bg-hover-to-show(.7);
751
+ }
752
+
753
+
754
+ // 子選單開合
755
+ // https://stackoverflow.com/questions/3508605/how-can-i-transition-height-0-to-height-auto-using-css
756
+ $list-toogle-speed: .35s;
757
+ $list-toogle-in-background: $list-toogle-speed linear;
758
+
759
+ .list-group-haschild:hover ~ .child-body{
760
+ &:after{ will-change: height, max-height; }
761
+ > .child-container { will-change: max-height, margin-bottom; }
762
+ }
763
+
764
+ .child-body{
765
+ position: relative;
766
+ display: flex;
767
+ overflow: hidden;
768
+ &:after { content: ''; }
769
+ // 關閉 -----------------
770
+ &:after{
771
+ height: 0;
772
+ max-height: 50px;
773
+ transition: height $list-toogle-in-background;
774
+ }
775
+ > .child-container {
776
+ margin-bottom: -2000px;
777
+ visibility: hidden;
778
+ max-height: 0;
779
+ transition: margin-bottom $list-toogle-speed cubic-bezier(1, 0, 1, 1),
780
+ visibility 0s $list-toogle-speed,
781
+ max-height 0s $list-toogle-speed;
782
+ }
783
+ // 關閉 -----------------
784
+ }
785
+
786
+ .list-group-haschild-input:checked{
787
+ ~ .list-group-item{
788
+ @include list-group-active();
789
+ .material-icon-more{
790
+ transform: rotate(-180deg);
791
+ }
792
+ }
793
+ ~ .child-body{
794
+ // 打開 -----------------
795
+ &:after {
796
+ height: 50px;
797
+ transition: height $list-toogle-in-background,
798
+ max-height 0s $list-toogle-in-background;
799
+ max-height: 0px;
800
+ }
801
+ > .child-container{
802
+ transition: margin-bottom $list-toogle-speed cubic-bezier(0, 0, 0, 1);
803
+ margin-bottom: 0;
804
+ visibility: visible;
805
+ max-height: 1000000px;
806
+ }
807
+ // 打開 -----------------
808
+ }
809
+ }
810
+
811
+ // 側邊的清單 ------------------------------------------
812
+
813
+
814
+
815
+ // navbar ------------------------------------------
816
+ .nav-link.active{
817
+ font-weight: $font-weight-bold;
818
+ }
819
+ // navbar ------------------------------------------
820
+
821
+
822
+ // 有底線的 tab bar ------------------------------------------
823
+ .navbar-line{
824
+ &:hover .navbar-line-item{
825
+ &:before { will-change: width, left; }
826
+ ~ .navbar-line-item:before{ will-change: left; }
827
+ }
828
+ // LG 版本 (底線較粗)
829
+ &.navbar-line-lg .navbar-line-item:before{
830
+ border-bottom-width: 4px;
831
+ }
832
+ }
833
+
834
+ a.navbar-line-item{
835
+ --bs-link-color-rgb: 100, 122, 241;
836
+ }
837
+ .navbar-line-item{
838
+ position: relative;
839
+ @include flex-center();
840
+ --bs-navbar-nav-link-padding-x: 1.5rem;
841
+ color: var(--bs-nav-link-color);
842
+ &:before{
843
+ content: "";
844
+ position: absolute;
845
+ top: 0;
846
+ left: 100%;
847
+ width: 0;
848
+ height: 100%;
849
+ border-bottom: 2px solid var(--bs-link-color);
850
+ transition: $transition-base;
851
+ pointer-events: none;
852
+ z-index: 1;
853
+ }
854
+ &:hover{
855
+ background: $primary-bg-light;
856
+ &:before {
857
+ width: 100%;
858
+ left: 0;
859
+ }
860
+ ~ .navbar-line-item:before{
861
+ left: 0;
862
+ }
863
+ }
864
+ &:not(.active):hover:before{
865
+ border-color: $primary-sub-highlight;
866
+ }
867
+ &.active:before{
868
+ width: 100%;
869
+ left: 0;
870
+ }
871
+ }
872
+ // dropdown 版本
873
+ .navbar-line-item.dropdown{
874
+ padding: 0;
875
+ padding-left: 0 !important;
876
+ padding-right: 0 !important;
877
+ // (firefox 暫不支援)
878
+ &:has(.dropdown-toggle[aria-expanded="true"]){
879
+ background: $primary-bg-light;
880
+ &:before{
881
+ width: 100%;
882
+ left: 0;
883
+ border-bottom-color: $primary-sub-highlight;
884
+ }
885
+ }
886
+ &:not(.active) .dropdown-link{
887
+ color: var(--bs-nav-link-color);
888
+ }
889
+ .dropdown-link{
890
+ @include flex-center();
891
+ height: 100%;
892
+ padding: var(--bs-nav-link-padding-y) var(--bs-navbar-nav-link-padding-x);
893
+ }
894
+ .dropdown-toggle[aria-expanded="true"]{
895
+ color: $primary;
896
+ }
897
+ }
898
+
899
+
900
+ .navbar[data-bs-theme="dark"]{
901
+ --dark-theme-primary: #bec9ff;
902
+ .navbar-line-item.dropdown:not(.active) .dropdown-link{
903
+ color: var(--dark-theme-primary);
904
+ }
905
+ .navbar-nav .show > .nav-link, .navbar-nav .nav-link.active{
906
+ &, a{
907
+ color: $white;
908
+ }
909
+ }
910
+ .navbar-line-item:before{
911
+ border-bottom-color: var(--dark-theme-primary);
912
+ }
913
+ .navbar-line-item.dropdown:not(.active) .dropdown-link,
914
+ .navbar-line-item:before{
915
+ opacity: .9;
916
+ }
917
+ }
918
+ // 有底線的 tab bar ------------------------------------------
919
+
920
+
921
+
922
+ // 固定寬度 ------------------------------------------
923
+ .w-33{
924
+ width: 33.33%;
925
+ }
926
+ .w-66{
927
+ width: 66.66%;
928
+ }
929
+ @for $i from 1 through 25 {
930
+ .w-#{$i}rem {
931
+ width: #{$i}rem;
932
+ }
933
+ }
934
+
935
+ // 固定寬度 ------------------------------------------
936
+
937
+
938
+
939
+ // 無內容物 UI ------------------------------------------
940
+ .no-content{
941
+ padding-top: 10rem;
942
+ .content-img > .material-icons, p{
943
+ opacity: .7;
944
+ }
945
+ .content-img > .material-icons{
946
+ font-size: 6rem;
947
+ margin-bottom: 0.5rem;
948
+ opacity: .5;
949
+ }
950
+ p{
951
+ font-size: 1.25rem;
952
+ }
953
+ }
954
+ // 無內容物 UI ------------------------------------------
955
+
956
+
957
+
958
+ // 暫定:螢幕寬度小於 991px (含) 不可使用 ------------------------------------------
959
+ .mobile-forbidden{
960
+ display: none;
961
+ }
962
+ @media only screen and (max-width: 991px) {
963
+ body{
964
+ overflow: hidden;
965
+ }
966
+ .mobile-forbidden{
967
+ position: fixed;
968
+ top: 0;
969
+ left: 0;
970
+ right: 0;
971
+ bottom: 0;
972
+ margin: auto;
973
+ @include flex-center();
974
+ flex-direction: column;
975
+ padding: 2rem;
976
+ font-size: $font-size-lg;
977
+ text-align: center;
978
+ color: var(--gray-500);
979
+ background: $white $gradient-blue-light;
980
+ z-index: $zindex-max;
981
+ img {
982
+ width: 20rem;
983
+ }
984
+ }
985
+ }
986
+ // 暫定:螢幕寬度小於 991px (含) 不可使用 ------------------------------------------
987
+
988
+
989
+
990
+ // sweet alert ------------------------------------------
991
+ .swal2-container{
992
+ &.swal2-backdrop-show, &.swal2-noanimation{
993
+ backdrop-filter: var(--backdrop-blur);
994
+ }
995
+ }
996
+
997
+ div:where(.swal2-container){
998
+ .swal2-html-container{
999
+ font-size: 1rem !important;
1000
+ color: var(--bs-body-color) !important;
1001
+ }
1002
+ h2:where(.swal2-title){
1003
+ font-size: 1.5rem !important;
1004
+ color: var(--bs-emphasis-color) !important;
1005
+ }
1006
+ .swal2-actions{
1007
+ flex-direction: row-reverse;
1008
+ width: 100%;
1009
+ }
1010
+ button:where(.swal2-styled){
1011
+ margin-left: .5rem !important;
1012
+ margin-right: .5rem !important;
1013
+ }
1014
+
1015
+ button:where(.swal2-styled).swal2-cancel{
1016
+ background-color: $secondary !important;
1017
+ }
1018
+ }
1019
1019
  // sweet alert ------------------------------------------