sidebar.less 4.29 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: -260px;
    width: 260px;
14
    height: 100%;
15
    padding-top: 70px;
16
17
    overflow: hidden;
    overflow-y: auto;
Aria Givi's avatar
Aria Givi committed
18
    transition: 0.5s;
19
    z-index: 999;
Aria Givi's avatar
Aria Givi committed
20
    background-color: white;
21
22

    &>label#closeSidebar {
Aria Givi's avatar
Aria Givi committed
23
        position: absolute;
24
25
26
        font-size: 36px;
        top: 0px;
        right: 20px;
27
        color: grey;
28
        &:after {
29
30
31
32
            content: "×";
        }
        &:hover {
            color: rgb(255,128,0);
33
34
        }
    }
Aria Givi's avatar
Aria Givi committed
35

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

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

        &:hover {
            background-color: @metager-navbar-toggle-hover-background-color;
49
            /* 
50
51
52
53
54
55
56
            &>.metager-dropdown-menu {
                animation-name: dropdown-animation;
                animation-duration: 0.7s;
                animation-timing-function: ease-out;
                animation-fill-mode: forwards;
                animation-delay: 0.1s;
            }
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
            */ 
        }

        &>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;
            }
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
        }
    }

    & .metager-dropdown-menu {
        list-style-type: none;
        z-index: 1000;
        float: left;
        min-width: 160px;
        text-align: left;
        max-height: 0px;
        overflow: hidden;
        &>li>a {
            display: block;
            font-size: 12px;
            padding: 3px 20px;
            width: 100%;
            clear: both;
            font-weight: normal;
            line-height: 1.42857143;
91
            border-top: 1px solid LightGray;
92
            margin-left: 2px;
93
94
95
96
97
98
99
100
101
102
103
104
            &:hover {
                text-decoration: none;
            }
        }
        label:after {
            #navbar-static-pages {
                z-index: 4;
                width: 100%;
            }
        }
    }

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

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

137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
input.sideBarCheckbox {
    display: none;
}

input.sideBarCheckbox: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#openSidebar {
    z-index: 998;
    font-size: 36px;
    position: fixed;
    top: 0px;
    right: 20px;
    color: grey;
    &:after {
        content: "≡";
    }
    &:hover {
        color: rgb(255,128,0);
    }
}

164
165
166
167
168
169
170
171
172
173
174
@keyframes dropdown-animation {
    0% {
        max-height: 0px;
        padding: 0px 0;
    }
    1% {
        padding: 5px 0;
    }
    100% {
        max-height: 1000px;
        padding: 5px 0;
175
    }
176
177
178
}

@media (max-width: 979px) {
179
180
181
182
    .sideBar {
        right: -90%;
        width: 90%;
        overflow: auto;
183
    }
184

185
186
187
188
189
190
191
192
    #metager-static-nav-list:target {
        max-height: 1000px;
    }
    ul.metager-dropdown-menu {
        position: inherit;
        width: 100%;
    }
}
193

Aria Givi's avatar
Aria Givi committed
194
195
196
input#nav0:checked {
    & ~.sideBar {
        right: 0px;
197
198
    }
}