sidebar.less 4.82 KB
Newer Older
1
2
/* Navigations-Seitenleiste */

3
4
5
6
.sidebar {
    border-left: 1px solid #ccc;
    box-shadow: 0px 1px 1.5px 1px #c0c0c0;
    /**/
7
8
    position: fixed;
    display: block;
9
    top: 0px;
10
11
    right: -270px;
    width: 270px;
12
    height: 100%;
13
    padding-top: 55px;
14
15
    overflow: hidden;
    overflow-y: auto;
16
    z-index: 10;
Aria Givi's avatar
Aria Givi committed
17
    background-color: white;
18
    transition: 0.5s;
19
    border-left: none;
20
21
22
23
    .sidebar-logo {
        margin-bottom: 20px;
    }
    .sidebar-list {
24
25
26
        padding-left: 0;
        list-style: none;
        margin-left: -5px;
27
        &>li {
28
            width: 100%;
29
            padding: 10px 0px;
30
            &:hover {
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
                background-color: @color-almost-white;
            }
            &>label,
            &>a {
                &:focus {
                    outline: none;
                }
                &>i.fa {
                    width: 30px;
                    text-align: center;
                    margin-right: 7px;
                }
            }
            &>label {
                font-size: 16px;
                font-weight: normal;
                text-decoration: none;
                text-indent: 12px;
                color: black;
                line-height: 20px;
                display: inline-block;
                width: 100%;
                &:hover {
                    color: red;
                }
56
            }
57
58
        }
    }
59
    .metager-dropdown-content {
Aria Givi's avatar
Aria Givi committed
60
61
62
        min-width: 160px;
        max-height: 0px;
        text-align: left;
63
        list-style-type: none;
64
        z-index: 30;
65
        overflow: hidden;
Aria Givi's avatar
Aria Givi committed
66
        transition: 0.5s ease;
67
68
        &>li>a {
            display: block;
69
70
            font-size: 13px;
            padding: 6px 20px;
71
72
73
74
            width: 100%;
            clear: both;
            font-weight: normal;
            line-height: 1.42857143;
75
            margin-left: 2px;
76
77
78
79
80
81
            &:hover {
                text-decoration: none;
            }
        }
        label:after {
            #navbar-static-pages {
82
                z-index: 40;
83
84
85
86
                width: 100%;
            }
        }
    }
87
    a {
88
        font-size: 16px;
89
90
91
        line-height: 20px;
        text-decoration: none;
        text-indent: 12px;
Aria Givi's avatar
Aria Givi committed
92
        display: inline-block;
93
        width: 100%;
94
        color: black;
95
96
        &:hover {
            color: red;
97
98
        }
    }
99
    p {
100
101
        width: 90%;
        text-align: center;
102
103
        font-weight: bold;
        font-style: italic;
104
        font-size: large;
Karl Hasselbring's avatar
Karl Hasselbring committed
105
        background-color: @metager-orange;
106
        border-radius: .25em;
Aria Givi's avatar
Aria Givi committed
107
108
109
110
        margin: 5%;
        color: white;
        font-size: 30px;
        line-height: 35px;
111
    }
112
    .caret {
113
114
115
116
        position: absolute;
        left: 90%;
        margin-top: 8px;
    }
117
    input.sidebarCheckbox {
118
119
        display: none;
        &:checked {
120
            &~.metager-dropdown-content {
Aria Givi's avatar
Aria Givi committed
121
                max-height: 1000px;
122
                padding: 5px 0px 0px 0px;
123
            }
124
125
126
127
            &~label>.caret {
                border-top: 0 solid;
                border-bottom: 4px solid;
                transition: border-top .1s, border-bottom .1s .1s;
128
129
            }
        }
130
        &:not(:checked) {
131
            &~.metager-dropdown-content {
Aria Givi's avatar
Aria Givi committed
132
                padding: 0px 0;
133
134
            }
        }
135
    }
136
137
138
    input#nav0:checked~& {
        border-left: 1px solid LightGray;
    }
139
140
141
142
    hr {
        margin: 0px;
        border-color: #e0e0e0;
    }
143
144
}

145
146
input#sidebarToggle:checked {
    &~.sidebar {
Aria Givi's avatar
Aria Givi committed
147
148
        right: 0px;
    }
149
    &~.sidebar-opener {
150
151
152
153
        &:after {
            content: "×";
        }
    }
Aria Givi's avatar
Aria Givi committed
154
155
}

156
157
158
159
160
161
162
163
164
// Top right starting position of the sidebar icon
@sidebar-opener-top: 23px;
@sidebar-opener-right: 25px;
.sidebar-opener {
    position: fixed;
    top: @sidebar-opener-top;
    right: @sidebar-opener-right;
    margin: 0px;
    z-index: 20;
165
    font-size: 36px;
166
    line-height: 23px;
167
    border-radius: 5px;
168
    color: grey;
169
    background-color: white;
170
171
172
173
    &:after {
        content: "≡";
    }
    &:hover {
Karl Hasselbring's avatar
Karl Hasselbring committed
174
        color: @metager-orange;
175
176
177
    }
}

178
179
180
181
182
.sidebar-opener-placeholder {
    display: none;
    width: 45px;
}

183
@media (max-width: @screen-xs-max) {
184
    .sidebar {
185
        padding-top: 15px;
186
187
188
189
190
191
        right: -90%;
        width: 90%;
        overflow: auto;
        .sidebar-list {
            max-height: 1000px;
        }
192
193
194
195
196
197
        .sidebar-logo {
            display: none;
        }
        ul.metager-dropdown-content {
            position: inherit;
            width: 100%;
198
        }
199
    }
200
201
202
    .sidebar-opener {
        // Make the open and close button bigger, so it is easier to hit
        @sidebar-opener-mobile-magnification: 10px;
203
        margin: @sidebar-opener-mobile-magnification;
204
205
206
        top: (@sidebar-opener-top - @sidebar-opener-mobile-magnification);
        right: (@sidebar-opener-right - @sidebar-opener-mobile-magnification);
    }
207
208
    .sidebar-opener-placeholder {
        display: initial;
209
    }
Aria Givi's avatar
Aria Givi committed
210
}