sidebar.less 4.07 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
        }

        &>label {
            font-size: 16px;
Aria Givi's avatar
Aria Givi committed
52
            font-weight: normal;
53
54
            text-decoration: none;
            text-indent: 12px;
Aria Givi's avatar
Aria Givi committed
55
56
            color: black;
            line-height: 20px;
57
58
            display: inline-block;
            width: 100%;
Aria Givi's avatar
Aria Givi committed
59
            
60
61
62
            &:hover {
                color: red;
            }
63
64
65
66
        }
    }

    & .metager-dropdown-menu {
Aria Givi's avatar
Aria Givi committed
67
68
69
        min-width: 160px;
        max-height: 0px;
        text-align: left;
70
71
72
73
        list-style-type: none;
        z-index: 1000;
        float: left;
        overflow: hidden;
Aria Givi's avatar
Aria Givi committed
74
75
        transition: 0.5s ease;

76
77
78
79
80
81
82
83
        &>li>a {
            display: block;
            font-size: 12px;
            padding: 3px 20px;
            width: 100%;
            clear: both;
            font-weight: normal;
            line-height: 1.42857143;
84
            border-top: 1px solid LightGray;
85
            margin-left: 2px;
Aria Givi's avatar
Aria Givi committed
86

87
88
89
90
            &:hover {
                text-decoration: none;
            }
        }
Aria Givi's avatar
Aria Givi committed
91

92
93
94
95
96
97
98
99
        label:after {
            #navbar-static-pages {
                z-index: 4;
                width: 100%;
            }
        }
    }

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

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

131
132
133
134
135
    & input.sideBarCheckbox {
        display: none;

        &:checked {
            & ~.metager-dropdown-menu {
Aria Givi's avatar
Aria Givi committed
136
137
                max-height: 1000px;
                padding: 5px 0;
138
            }
Aria Givi's avatar
Aria Givi committed
139

140
141
142
143
144
145
            & ~ label > .caret {
                border-top:0 solid;
                border-bottom:4px solid;
                transition:border-top .1s, border-bottom .1s .1s;
            }
        }
146
147
148

        &:not(:checked) {
            & ~.metager-dropdown-menu {
Aria Givi's avatar
Aria Givi committed
149
                padding: 0px 0;
150
151
            }
        }
152
    }
153
154
155

}

Aria Givi's avatar
Aria Givi committed
156
157
158
159
160
161
input#sideBarToggle:checked {
    & ~.sideBar {
        right: 0px;
    }
}

162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
label#openSidebar {
    z-index: 998;
    font-size: 36px;
    position: fixed;
    top: 0px;
    right: 20px;
    color: grey;
    &:after {
        content: "≡";
    }
    &:hover {
        color: rgb(255,128,0);
    }
}

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

184
185
186
187
188
189
190
    #metager-static-nav-list:target {
        max-height: 1000px;
    }
    ul.metager-dropdown-menu {
        position: inherit;
        width: 100%;
    }
Aria Givi's avatar
Aria Givi committed
191
}