-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCSSnavigationSideBar.style.css
More file actions
201 lines (171 loc) · 5.29 KB
/
Copy pathCSSnavigationSideBar.style.css
File metadata and controls
201 lines (171 loc) · 5.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
/*--------------------------*/
/*1) Begining sidenav*/
/*--------------------------*/
/* The sidebar menu */
.sidenav {
height: 100%; /* Full-height: remove this if you want "auto" height */
width: 0px; /* Set the width of the sidebar */
position: fixed; /* Fixed Sidebar (stay in place on scroll) */
z-index: 1; /* Stay on top */
top: 0; /* Stay at the top */
left: 0;
/*Maybe i would like to add here in the future (border-top).*/
border-top: 0px solid rgb(137, 24, 203); /* Add a white top border */
/*Maybe i would like to add here in the future (border-buttom).*/
border-bottom: 0px solid rgb(4, 166, 253); /* Add a white bottom border */
background-color: #46006c; /* Black */
overflow-x: hidden; /* Disable horizontal scroll */
overflow: auto; /* Enable scrolling if the sidenav has too much content */
margin: 0;
padding: 0px; /* Place content 60px from the top */
display: flex; /* Enables flexbox for easy alignment */
flex-direction: column; /* Stacks items vertically */
transition: 0.5s; /* 0.5 second transition effect to slide in the sidebar */
}
.sidenav a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: #164e0a;
display: block;
transition: 0.3s;
}
/* On smaller screens, where height is less than 450px, change the style of the sidebar (less padding and a smaller font size) */
@media screen and (max-height: 450px) {
.sidenav {padding-top: 15px;}
.sidenav a {font-size: 18px;}
}
/*--------------------------*/
/*1) End sidenav*/
/*--------------------------*/
/*--------------------------*/
/*2) Begining navli*/
/*--------------------------*/
/* The navigation menu links */
.navli a {
padding: 8px 16px;
font-size: 25px;
color: #0eb42f;
display: block;
}
/* When you mouse over the navigation links, change their color */
.navli a:hover {
color: #f1f1f1;
}
/*--------------------------*/
/*2) End navli*/
/*--------------------------*/
/*--------------------------*/
/*3) Begining of button section*/
/*--------------------------*/
/* The button used to open the sidebar */
.openbtn {
font-size: 20px;
cursor: pointer;
background-color: #de0808cf;
color: rgba(246, 246, 246, 0.981);
border-radius: 4px; /* Add a border radius */
border: none;
padding: 10px 15px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
transition: background-color 0.3s ease, color 0.3s ease; /* Transitions for hover effects */
outline: none; /* Remove default outline */
}
/* Hover effect on the button */
.openbtn:hover {
background-color: #1a036b;
color: white;
text-decoration: none;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Increased shadow for emphasis */
}
.openbtn:hover {
animation: pulse 1s infinite alternate; /* Pulsating effect */
}
/*@keyframes defines simple pulsing animation over a hover*/
@keyframes pulse {
from {
transform: scale(1);
}
to {
transform: scale(1.05);
}
}
/*For openbtn better visibility on mobile.*/
@media (max-width: 600px) {
.openbtn {
font-size: 18px;
padding: 8px 12px;
}
}
/* Position and style the close button (top right corner) */
.sidenav .closebtn {
position: relative;
font-size: 28px;
margin-left: -40px;
padding: 0 16px !important;
color: white !important;
background-color: #e74c3c; /* Change background color to red */
border-radius: 0%; /* Make circular shape (From square to a round)*/
border: none;
outline: none;
cursor: pointer;
}
.sidenav .closebtn::before {
content: 'Close'; /* Use the chosen word as the symbol */
margin-right: 4px; /* Adjust the margin to position the word */
}
.sidenav .closebtn:hover {
background-color: #0d5d0d; /* Darker shade on hover */
transform: scale(1.05); /* Slightly enlarged for emphasis */
}
/* Style for close button list item " !important; " = run over any applied existing css code. */
.navlibutton {
text-align: right !important;
}
/*--------------------------*/
/*3) End of button section*/
/*--------------------------*/
/*--------------------------*/
/*4) Begining ul*/
/*--------------------------*/
/*Remove dots (ul) - Begining of sentence*/
ul {
list-style-type: none;
width: 100%;
padding: 20px 0 0 0;
margin: 0;
}
/*--------------------------*/
/*4) End ul*/
/*--------------------------*/
/*--------------------------*/
/*5) Begining li*/
/*--------------------------*/
li {
text-align: left;
}
/*Takes the last list item (li) withing an unorder list (ul),
select the last item among it's sibilings
and remove it's buttom border.*/
li:last-child {
border-bottom: none;
}
/*--------------------------*/
/*5) End li*/
/*--------------------------*/
/*--------------------------*/
/*6) Begining main*/
/*--------------------------*/
/* Style page content - use this if you want to push the page content to the right when you open the side navigation */
#main {
margin-left: 0px; /* Will be set by JavaScript */
padding: 20px;
transition: margin-left .5s; /* If you want a transition effect */
}
/*--------------------------*/
/*6) End main*/
/*--------------------------*/
/*--------------------------*/
/*) Begining */
/*) End */
/*--------------------------*/