summaryrefslogtreecommitdiffstats
path: root/theme/stylesheets/website/progress.less
blob: c67d7e75951ffbf83d159b301fc7da4cfd3fa321 (plain)
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
/* Chrome, Safari, Opera */
@-webkit-keyframes animate-loading {
    from {width: 0%;}
    to {}
}

/* Standard syntax */
@keyframes animate-loading {
    from {width: 0%;}
    to {}
}

.book .book-body {
    .book-progress {
        height: @progress-height;
        width: 100%;
        position: relative;
        background: #fff;
        margin-bottom: 10px;

        .bar {
            height: @bar-height;
            position: @bar-position;
            right: @bar-right;
            left: @bar-left;
            top: @bar-top;

            background: @bar-background;
            border-radius: 5px;
            overflow: hidden;

            .inner {
                height: 100%;
                width: 0%;

                background: @bar-progress-background;
                -webkit-animation: animate-loading 1s; /* Chrome, Safari, Opera */
                animation: animate-loading 1s;

                .in-inner {
                    height: 100%;
                    width: 50%;
                }
            }
        }

        .chapters {
            display: @chapter-display;

            position: absolute;
            right: 20px + @chapter-size;
            left: 20px;
            top: 7px;

            .chapter {
                position: absolute;
                width: @chapter-size;
                height: @chapter-size;
                border-radius: @chapter-size;

                background: @bar-background;
                box-shadow: 0px 0px 1px #bbb;

                &.new-chapter {

                }

                &.done {
                    background: @bar-progress-background;
                    box-shadow: none;
                }

                @media (max-width: 800px) {
                    display: none;

                    &.new-chapter {
                        display: block;
                    }
                }
            }
        }
    }
}
.book.color-theme-1 .book-body {
    .book-progress {
        .bar {
            background: @bar-background-1;
            .inner {
                background: @bar-progress-background-1;
            }
        }
    }
    .chapters .chapter{
        background: @bar-background-1;
        &.done{
            background: @bar-progress-background-1;
        }
    }
}
.book.color-theme-2 .book-body {
    .book-progress {
        .bar {
            background: @bar-background-2;
            .inner {
                background: @bar-progress-background-2;
            }
        }
    }
    .chapters .chapter{
        background: @bar-background-2;
        &.done{
            background: @bar-progress-background-2;
        }
    }
}