sidebar.less 3.77 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
    }
    &>ul {
        padding-top: 20%;
53
54
        padding-left: 3%;
        padding-right: 1%;
55
56
57
58
59
60
    }
    & a {
        font-size: 12px;
        line-height: 20px;
        text-decoration: none;
        text-indent: 12px;
61
        width: 100%;
62
63
64
65
66
        &:visited {
            color: blue;
        }
    }
}
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
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
158
159
160
161
162
/*
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;
        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;
        }
    }
}*/

#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%;
    padding-top: 5%;
    padding-bottom: 5%;
    border-radius: 10px;
    margin-bottom: 1%;
    &>a:hover {
        color: red;
    }
}

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

Aria Givi's avatar
Aria Givi committed
164
165
166
input#nav0:checked {
    & ~.sideBar {
        right: 0px;
167
168
    }
}