sidebar.less 4.63 KB
Newer Older
1
2
3
4
5
6
7
@metager-dropdown-toggle-hover-or-focus-color: fade(@static-pages-color-black, 15%);
@metager-dropdown-menu-background-color: @static-pages-color-white;
@metager-dropdown-menu-box-shadow-color: fade(@static-pages-color-black, 17.5%);
@metager-dropdown-menu-li-a-color: @static-pages-color-almost-black;
@metager-dropdown-menu-li-a-hover-color: @static-pages-color-strong-grey;
@metager-dropdown-menu-li-a-hover-background-color: @static-pages-color-almost-white;

8
9
10
.sideBar {
    position: fixed;
    display: block;
11
    top: 0px;
12
13
    right: -270px;
    width: 270px;
14
    height: 100%;
15
    padding-top: 70px;
16
17
18
    overflow: hidden;
    overflow-y: auto;
    z-index: 999;
Aria Givi's avatar
Aria Givi committed
19
    background-color: white;
20
    transition: 0.5s;
21
    &>label#closeSidebar {
Aria Givi's avatar
Aria Givi committed
22
        position: absolute;
23
24
25
        font-size: 36px;
        top: 0px;
        right: 20px;
26
        color: grey;
27
        &:after {
28
29
30
31
            content: "×";
        }
        &:hover {
            color: rgb(255,128,0);
32
33
        }
    }
Aria Givi's avatar
Aria Givi committed
34

35
36
37
    &>ul {
        padding-top: 20%;
    }
38
39
40
41

    & #metager-static-nav-list > li {
        
        width: 100%;
42
43
        padding-top: 3%;
        padding-bottom: 3%;
44
        border-bottom: 1px solid LightGray;
45
46
47

        &:hover {
            background-color: @metager-navbar-toggle-hover-background-color;
48
49
50
51
52
53
54
55
56
57
58
59
60
61
        }

        &>label {
            font-size: 16px;
            line-height: 20px;
            text-decoration: none;
            text-indent: 12px;
            display: inline-block;
            width: 100%;
            color: black;
            font-weight: normal;
            &:hover {
                color: red;
            }
62
63
64
65
66
67
68
69
70
71
72
        }
    }

    & .metager-dropdown-menu {
        list-style-type: none;
        z-index: 1000;
        float: left;
        min-width: 160px;
        text-align: left;
        max-height: 0px;
        overflow: hidden;
73
74
75
76
        animation-name: reverse-dropdown-animation;
        animation-duration: 0.3s;
        animation-timing-function: linear;
        animation-fill-mode: forwards;
77
78
79
80
81
82
83
84
        &>li>a {
            display: block;
            font-size: 12px;
            padding: 3px 20px;
            width: 100%;
            clear: both;
            font-weight: normal;
            line-height: 1.42857143;
85
            border-top: 1px solid LightGray;
86
            margin-left: 2px;
87
88
89
90
91
92
93
94
95
96
97
98
            &:hover {
                text-decoration: none;
            }
        }
        label:after {
            #navbar-static-pages {
                z-index: 4;
                width: 100%;
            }
        }
    }

99
    & a {
100
        font-size: 16px;
101
102
103
        line-height: 20px;
        text-decoration: none;
        text-indent: 12px;
Aria Givi's avatar
Aria Givi committed
104
        display: inline-block;
105
        width: 100%;
106
        color: black;
107
108
        &:hover {
            color: red;
109
110
        }
    }
111
112
113
114

    & p {
        width: 90%;
        text-align: center;
115
116
        font-weight: bold;
        font-style: italic;
117
        font-size: large;
118
119
        background-color: rgb(255,128,0);
        border-radius: .25em;
120
121
122
        color: white;
        cursor: default;
        margin: 5%
123
    }
124
125
126
127
128
    & .caret {
        position: absolute;
        left: 90%;
        margin-top: 8px;
    }
Aria Givi's avatar
Aria Givi committed
129

130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
    & input.sideBarCheckbox {
        display: none;

        &:checked {
            & ~.metager-dropdown-menu {
                animation-name: dropdown-animation;
                animation-duration: 0.7s;
                animation-timing-function: ease-out;
                animation-fill-mode: forwards;
                animation-delay: 0.1s;
            }
            & ~ label > .caret {
                border-top:0 solid;
                border-bottom:4px solid;
                transition:border-top .1s, border-bottom .1s .1s;
            }
        }
    }
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165

}

label#openSidebar {
    z-index: 998;
    font-size: 36px;
    position: fixed;
    top: 0px;
    right: 20px;
    color: grey;
    &:after {
        content: "≡";
    }
    &:hover {
        color: rgb(255,128,0);
    }
}

166
@media (max-width: 979px) {
167
168
169
170
    .sideBar {
        right: -90%;
        width: 90%;
        overflow: auto;
171
    }
172

173
174
175
176
177
178
179
180
    #metager-static-nav-list:target {
        max-height: 1000px;
    }
    ul.metager-dropdown-menu {
        position: inherit;
        width: 100%;
    }
}
181

Aria Givi's avatar
Aria Givi committed
182
183
184
input#nav0:checked {
    & ~.sideBar {
        right: 0px;
185
    }
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
}

@keyframes dropdown-animation {
    0% {
        max-height: 0px;
        padding: 0px 0;
    }
    1% {
        padding: 5px 0;
    }
    100% {
        max-height: 1000px;
        padding: 5px 0;
    }
}

@keyframes reverse-dropdown-animation {
    0% {
        max-height: 1000px;
        padding: 5px 0;
    }
    1% {
        padding: 5px 0;
    }
    100% {
        max-height: 0px;
        padding: 0px 0;
    }
}