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

144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
@media (max-width: @screen-mobile) {
    .sidebar {
        padding-top: 15px;
        right: -90%;
        width: 90%;
        overflow: auto;
        .sidebar-list {
            max-height: 1000px;
        }
        .sidebar-logo {
            display: none;
        }
        ul.metager-dropdown-content {
            position: inherit;
            width: 100%;
159 160
        }
    }
161 162 163 164 165 166 167 168 169 170
    .sidebar-opener {
        // Make the open and close button bigger, so it is easier to hit
        @sidebar-opener-mobile-magnification: 10px;
        margin: @sidebar-opener-mobile-magnification;
        top: (@sidebar-opener-position-top - @sidebar-opener-mobile-magnification);
        right: (@sidebar-opener-position-right - @sidebar-opener-mobile-magnification);
    }
    .sidebar-opener-placeholder {
        display: initial;
    }
Aria Givi's avatar
Aria Givi committed
171 172
}

173 174
/* Sidebar opener */

175
// Top right starting position of the sidebar icon
Dominik Hebeler's avatar
Dominik Hebeler committed
176
@sidebar-opener-position-top: 22px;
177
@sidebar-opener-position-right: 25px;
178 179
.sidebar-opener {
    position: fixed;
180 181
    top: @sidebar-opener-position-top;
    right: @sidebar-opener-position-right;
182 183
    margin: 0px;
    z-index: 20;
184
    font-size: 36px;
185
    line-height: 23px;
186
    border-radius: 5px;
187
    color: grey;
188
    background-color: white;
189 190 191 192
    &:after {
        content: "≡";
    }
    &:hover {
Karl Hasselbring's avatar
Karl Hasselbring committed
193
        color: @metager-orange;
194 195 196
    }
}

197 198 199 200 201
.sidebar-opener-placeholder {
    display: none;
    width: 45px;
}

202 203 204 205 206
/* Sidebar toggle checkbox */

#sidebarToggle:checked {
    &~.sidebar {
        right: 0px;
207
    }
208 209 210 211
    &~.sidebar-opener {
        &:after {
            content: "×";
        }
212
    }
Aria Givi's avatar
Aria Givi committed
213
}