sidebar.less 4.08 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
31
    height: 100%;
    background-color: #FFF;
    overflow: hidden;
    overflow-y: auto;
Aria Givi's avatar
Aria Givi committed
32
    transition: 0.5s;
33
34
    z-index: 999;
    border-left: 1px solid LightGray;
35
36
37
    & * {
        display: inline-block;
    }
38
    &>label {
Aria Givi's avatar
Aria Givi committed
39
        position: absolute;
40
41
42
        font-size: 36px;
        top: 0px;
        right: 20px;
43
44
45
46
47
48
49
        color: grey;
        &:after {
            content: "×";
        }
        &:hover {
            color: rgb(255,128,0);
        }
50
51
52
53
54
    }
    &>ul {
        padding-top: 20%;
    }
    & a {
55
        font-size: 16px;
56
57
58
        line-height: 20px;
        text-decoration: none;
        text-indent: 12px;
59
        width: 100%;
60
        color: black;
61
62
63
        &:hover {
            color: red;
        }
64
65
66
67
68
    }

    & p {
        width: 90%;
        text-align: center;
69
70
        font-weight: bold;
        font-style: italic;
71
        font-size: large;
72
73
        background-color: rgb(255,128,0);
        border-radius: .25em;
74
75
76
        color: white;
        cursor: default;
        margin: 5%
77
    }
78
79
80
81
82
83

    & .caret {
        position: absolute;
        left: 90%;
        margin-top: 8px;
    }
84
}
85

86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
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;
107
        font-size: 12px;
108
109
110
111
112
113
114
115
116
117
118
119
120
        padding: 3px 20px;
        width: 100%;
        clear: both;
        font-weight: normal;
        line-height: 1.42857143;
        color: @metager-dropdown-menu-li-a-color;
        white-space: nowrap;
        &:hover {
            text-decoration: none;
            color: @metager-dropdown-menu-li-a-hover-color;
            background-color: @metager-dropdown-menu-li-a-hover-background-color;
        }
    }
121
}
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157

#navbar-static-pages {
    z-index: 4;
    width: 100%;
}

@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;
    }
}

#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%;
158
159
160
    padding-top: 10%;
    padding-bottom: 10%;
    border-bottom: 1px solid LightGray;
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
}

@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;
    }
}
178

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