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

142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
@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%;
157 158
        }
    }
159 160 161 162 163 164 165 166 167 168
    .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
169 170
}

171 172
/* Sidebar opener */

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

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

200 201 202 203 204
/* Sidebar toggle checkbox */

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