aboutsummaryrefslogtreecommitdiff
path: root/src/scss/statusline.scss
blob: cf5f8f26e1443c9850c992291c7f722045b3c177 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
.statusline {
    position: absolute;
    display: flex;
    bottom: 0;
    left: 0;
    height: 40px;
    /* padding-left: 5px; */
    width: calc(100%);
    font-size: 12px;
    margin: 0;
    align-items: center;
    z-index: 2;

    background-color: $background-z1;
    i {
        font-size: 14px;
        margin-right: 5px;
    }

    &-item {
        display: none;
        align-items: flex-start;
        margin-left: 5px;
        margin-right: 5px;
        font-size: 13px;

        color: $foreground-z1;

        .connected & { display: flex; }
    }

    &-item:first-child {
        margin-left: 10px;
        margin-left: calc(env(safe-area-inset-left) + 10px);
    }

    &-item:last-child {
        margin-right: 10px;
        margin-right: calc(env(safe-area-inset-right) + 10px);
    }
}

.connection {
    display: flex;
    color: $color-danger;

    &:after {
        display: block;
        content: "DISCONNECTED";
    }

    .connected & { color: $color-success; }
    .connected &:after {
        display: block;
        content: "CONNECTED";
    }
}

.ping {
    margin-left: auto;

    i {
        -webkit-animation: ping-fade-out 2s forwards; /* Safari 4+ */
        -moz-animation:    ping-fade-out 2s forwards; /* Fx 2+ */
        -o-animation:      ping-fade-out 2s forwards; /* Opera 12+ */
        animation:         ping-fade-out 2s forwards; /* IE 10+, Fx 29+ */
    }

    @-webkit-keyframes ping-fade-out {
      0%   { opacity: 1; }
      100% { opacity: 0; }
    }
}

.notification {
    background-color: $background-z2;
    color: $foreground-z2;
    overflow: hidden;
    display: flex;
    align-items: baseline;

    &-area {
        background-color: $background-z2;
        height: 100%;
        width: 0;
        overflow: hidden;
        margin-left: 5px;
        margin-left: auto;
        transition: all 1s ease;
    }

    &-area.show {
        width: 100%;
    }

    &-content {
        margin-left: 5px;
        margin-right: 5px;
        width: 100%;
        overflow: hidden;
    }

    i {
        margin-left: 5px;
        margin-right: 5px;
    }

    i.alert   { color: $color-danger; }
    i.info    { color: $color-info; }
    i.success { color: $color-success; }
    i.warning { color: $color-warning; }

    p {
        width: max-content;
        -webkit-animation: scroll-text 10s linear forwards; /* Safari 4+ */
        -moz-animation:    scroll-text 10s linear forwards; /* Fx 2+ */
        -o-animation:      scroll-text 10s linear forwards; /* Opera 12+ */
        animation:         scroll-text 10s linear forwards; /* IE 10+, Fx 29+ */
    }

    @-webkit-keyframes scroll-text {
      0%   { margin-left:  100%; }
      100% { margin-left: -100%; }
    }

    @-webkit-keyframes fade-in {
      0%   { opacity: 1; }
      100% { opacity: 0; }
    }
}