sidebar.less 3.84 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
label#openSidebar {
Aria Givi's avatar
Aria Givi committed
9
10
11
12
13
    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
    top: 0px;
27
28
    right: -260px;
    width: 260px;
29
    height: 100%;
30
    padding-top: 70px;
31
32
    overflow: hidden;
    overflow-y: auto;
Aria Givi's avatar
Aria Givi committed
33
    transition: 0.5s;
34
    z-index: 999;
Aria Givi's avatar
Aria Givi committed
35
    background-color: white;
36
37

    &>label#closeSidebar {
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
        }
    }
Aria Givi's avatar
Aria Givi committed
50

51
52
53
    &>ul {
        padding-top: 20%;
    }
54
55
56
57

    & #metager-static-nav-list > li {
        
        width: 100%;
58
59
60
        padding-top: 3%;
        padding-bottom: 3%;
        border-top: 1px solid LightGray;
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

        &: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-dropdown-menu {
        list-style-type: none;
        z-index: 1000;
        float: left;
        min-width: 160px;
        font-size: 14px;
        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
92
            border-bottom: 1px solid LightGray;
            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
@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;
151
    }
152
153
154
}

@media (max-width: 979px) {
155
156
157
158
    .sideBar {
        right: -90%;
        width: 90%;
        overflow: auto;
159
    }
160

161
162
163
164
165
166
167
168
    #metager-static-nav-list:target {
        max-height: 1000px;
    }
    ul.metager-dropdown-menu {
        position: inherit;
        width: 100%;
    }
}
169

Aria Givi's avatar
Aria Givi committed
170
171
172
input#nav0:checked {
    & ~.sideBar {
        right: 0px;
173
174
    }
}