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;

Aria Givi's avatar
Aria Givi committed
8
9
10
11
12
13
#closeSidebar {
    z-index: 998;
    font-size: 36px;
    position: fixed;
    top: 0px;
    right: 20px;
14
    color: grey;
Aria Givi's avatar
Aria Givi committed
15
16
17
    &:after {
        content: "≡";
    }
18
19
20
    &:hover {
        color: rgb(255,128,0);
    }
Aria Givi's avatar
Aria Givi committed
21
22
}

23
24
25
.sideBar {
    position: fixed;
    display: block;
26
27
    right: -260px;
    width: 260px;
28
29
30
    height: 100%;
    overflow: hidden;
    overflow-y: auto;
Aria Givi's avatar
Aria Givi committed
31
    transition: 0.5s;
32
    z-index: 999;
Aria Givi's avatar
Aria Givi committed
33
    background-color: white;
34
35
36
    & * {
        display: inline-block;
    }
37
    &>label {
Aria Givi's avatar
Aria Givi committed
38
        position: absolute;
39
40
41
        font-size: 36px;
        top: 0px;
        right: 20px;
42
        color: grey;
43
        &:after {
44
45
46
47
            content: "×";
        }
        &:hover {
            color: rgb(255,128,0);
48
49
50
51
52
53
        }
    }
    &>ul {
        padding-top: 20%;
    }
    & a {
54
        font-size: 16px;
55
56
57
        line-height: 20px;
        text-decoration: none;
        text-indent: 12px;
58
        width: 100%;
59
        color: black;
60
61
        &:hover {
            color: red;
62
63
        }
    }
64
65
66
67

    & p {
        width: 90%;
        text-align: center;
68
69
        font-weight: bold;
        font-style: italic;
70
        font-size: large;
71
72
        background-color: rgb(255,128,0);
        border-radius: .25em;
73
74
75
        color: white;
        cursor: default;
        margin: 5%
76
    }
77
78
79
80
81
    & .caret {
        position: absolute;
        left: 90%;
        margin-top: 8px;
    }
Aria Givi's avatar
Aria Givi committed
82
83
}

84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
ul.metager-dropdown-menu {
    list-style-type: none;
    padding-left: 0;
    top: 100%;
    left: auto;
    z-index: 1000;
    float: left;
    min-width: 160px;
    margin: 2px 0 0;
    margin-top: 0;
    list-style: none;
    font-size: 14px;
    text-align: left;
    background-color: @metager-dropdown-menu-background-color;
    border-radius: 4px;
    box-shadow: 0 6px 12px @metager-dropdown-menu-box-shadow-color;
    background-clip: padding-box;
    max-height: 0px;
    overflow: hidden;
    &>li>a {
        display: block;
105
        font-size: 12px;
106
107
108
109
110
111
112
113
114
115
        padding: 3px 20px;
        width: 100%;
        clear: both;
        font-weight: normal;
        line-height: 1.42857143;
        color: @metager-dropdown-menu-li-a-color;
        &:hover {
            text-decoration: none;
            color: @metager-dropdown-menu-li-a-hover-color;
            background-color: @metager-dropdown-menu-li-a-hover-background-color;
116
        }
Aria Givi's avatar
Aria Givi committed
117
118
119
120
121
    }
    label:after {
        #navbar-static-pages {
            z-index: 4;
            width: 100%;
122
        }
Aria Givi's avatar
Aria Givi committed
123
    }
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
}

@keyframes dropdown-animation {
    0% {
        max-height: 0px;
        padding: 0px 0;
        border: none
    }
    1% {
        padding: 5px 0;
        border: 1px solid @metager-dropdown-toggle-hover-or-focus-color;
    }
    100% {
        max-height: 1000px;
        padding: 5px 0;
        border: 1px solid @metager-dropdown-toggle-hover-or-focus-color;
140
    }
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
}

#metager-static-nav-list > li:hover {
    background-color: @metager-navbar-toggle-hover-background-color;
    &>.metager-dropdown-menu {
        animation-name: dropdown-animation;
        animation-duration: 0.7s;
        animation-timing-function: ease-out;
        animation-fill-mode: forwards;
        animation-delay: 0.1s;
    }
}

#metager-static-nav-list>li {
    width: 100%;
156
157
158
    padding-top: 10%;
    padding-bottom: 10%;
    border-bottom: 1px solid LightGray;
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
}

@media (max-width: 979px) {
    #metager-static-nav-list {
        width: 100%;
        overflow: hidden;
    }
    #metager-static-nav-list:target {
        max-height: 1000px;
    }
    ul.metager-dropdown-menu {
        position: inherit;
        width: 100%;
        border-radius: 0;
        box-shadow: initial;
    }
}
176

Aria Givi's avatar
Aria Givi committed
177
178
179
input#nav0:checked {
    & ~.sideBar {
        right: 0px;
180
181
    }
}