-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
339 lines (292 loc) · 9.35 KB
/
styles.css
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.container {
display: flex;
height: 100vh;
}
.sidebar {
top: 0;
position: sticky;
width: 20%;
max-width: 200px; /* Maximum width of sidebar */
background-color: rgb(226, 223, 223); /* Sidebar background color */
display: flex; /* Use Flexbox for layout */
flex-direction: column; /* Arrange children in a column */
justify-content: flex-start;
padding: 1%;
max-height: 100vh; /* Full height */
overflow-y: auto;
overflow-x: hidden;
transition: width 0.1s ease-out; /* Transition for width */
}
.sidebar header{
margin-bottom: 50px;
}
.main-content {
flex: 1; /* Main area takes up remaining space */
padding: 20px;
overflow-y: auto;
}
header {
font-size: 36px;
justify-items: center;
}
.sidebar-content {
color: black;
text-align: center;
margin-top: 15px;
}
.sidebar-button {
display: flex; /* Use flexbox for button layout */
align-items: center; /* Center items vertically */
width: 100%; /* Button takes full width of sidebar */
padding: 10px; /* Adds padding inside the button */
margin: 5% 0; /* Adds space between buttons */
background-color: white;
color: black;
border-width: 2px;
border-radius: 10px;
border-style: dotted;
text-align: left;
cursor: pointer; /* Changes cursor to pointer on hover */
}
.sidebar-button:last-child {
margin-top: auto;
}
.sidebar i {
margin-right: 15px;
}
.sidebar-content i {
font-size: 30px;
}
.sidebar-button:hover {
background-color: black;
color: azure;
}
/* Collapsed state styles */
.sidebar.collapsed {
width: 3em; /* Width of collapsed sidebar */
}
.sidebar.collapsed .sidebar-content {
margin-left: 10%;;
margin-top: 10px;
justify-content: center; /* Center icons when collapsed */
padding-left: 0; /* Remove left padding to avoid shifting */
padding-right: 0; /* Remove right padding to avoid shifting */
height: auto;
}
/* Center icons when collapsed, adjust padding accordingly */
.sidebar.collapsed .sidebar-button {
justify-content: center; /* Center icons when collapsed */
margin-top: 15px;
padding-left: 0; /* Remove left padding to avoid shifting */
padding-right: 0; /* Remove right padding to avoid shifting */
height: auto; /* Allow height to adjust based on content */
}
.sidebar.collapsed .sidebar-button:last-child {
margin-top: auto;
}
.sidebar.collapsed .sidebar-button span,
.sidebar.collapsed .sidebar-content span {
display: none;
}
.sidebar.collapsed .sidebar-button i {
font-size: 20px; /* Set icon size in collapsed state */
margin-right: 0; /* Remove margin for better centering */
}
/* Increase icon size when collapsed without affecting layout */
.sidebar.collapsed .sidebar-content i {
font-size: 42px;
}
/* Note modal styles remain unchanged */
.note-modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
top: 0;
left: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
background-color: rgba(0, 0, 0, 0.5); /* Black background with transparency */
justify-content: center; /* Center content vertically */
align-items: center; /* Center content horizontally */
z-index: 1000;
transition: opacity ease 1s;
opacity: 1;
}
.modal-content {
display: block;
background-color: white; /* Modal background color */
border-radius: 8px; /* Rounded corners */
padding: 20px; /* Padding inside modal */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Shadow effect */
width: 90%; /* Responsive width */
max-width: 500px; /* Maximum width for larger screens */
}
textarea {
width: 95%; /* Full width of modal content */
height: 250px; /* Fixed height for textarea */
margin-bottom: 20px; /* Space between textarea and buttons */
border-radius: 4px; /* Rounded corners */
border: 1px solid #ccc; /* Border color */
padding: 10px; /* Padding inside textarea */
resize: none; /* Disable resizing the textarea */
}
.note-textarea {
border: 1px solid #ccc; /* Border around the editable area */
border-radius: 4px; /* Rounded corners */
padding: 10px; /* Padding inside */
min-height: 150px; /* Minimum height for the editable area */
margin-bottom: 10px; /* Space below the editable area */
overflow-y: auto; /* Allow vertical scrolling if content exceeds height */
}
.modal-buttons {
display: flex; /* Use flexbox for button layout */
justify-content: space-between;
align-items: center; /* Align buttons vertically in the center */
margin-top: 10px; /* Space above buttons */
}
.text-style-options {
display: flex; /* Use flexbox for text style buttons */
justify-content: space-between;
margin: 0 10px; /* Margin on left and right for spacing */
}
.text-style-options button {
padding: 15px; /* Padding inside text style buttons */
border: none; /* Remove default border */
border-radius: 4px; /* Rounded corners */
margin: 0 10px;
cursor: pointer; /* Pointer cursor on hover */
}
.text-style-options button:hover {
background-color: #f0f0f0; /* Light gray background on hover */
}
button {
padding: 10px 20px; /* Padding inside save and cancel buttons */
border: none; /* Remove default border */
border-radius: 4px; /* Rounded corners for buttons */
cursor: pointer; /* Pointer cursor on hover */
}
#saveNote {
background-color: #4CAF50; /* Green background for save button */
color: white; /* White text color */
}
#cancelNote {
background-color: #f44336; /* Red background for cancel button */
color: white; /* White text color */
}
#saveNote:hover {
background-color: #45a049; /* Darker green on hover */
}
#cancelNote:hover {
background-color: #e53935; /* Darker red on hover */
}
/* Notes grid styles */
.notes-grid {
display:grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* Responsive columns */
grid-auto-rows:200px; /* Default row height */
gap :16px; /* Space between grid items */
padding :20px;
}
.note-card {
background-color:#f9f9f9;
border-radius :5px;
padding :10px;
box-shadow :0 2px 5px rgba(0,0,0,0.1);
font-family:Verdana, Geneva, Tahoma, sans-serif;
font-size: larger;
overflow:hidden; /* Prevent overflow */
}
.note-card p {
margin :0; /* Remove default margin */
display:-webkit-box; /* For older browsers support */
display :box; /* For modern browsers support */
-webkit-box-orient :vertical;
-webkit-line-clamp :5; /* Limit number of lines displayed */
overflow:hidden;
text-overflow :ellipsis;
word-wrap :break-word;
}
.note-card {
position: relative; /* To position buttons absolutely */
background-color: #f9f9f9;
border-radius: 5px;
padding: 10px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: larger;
}
.edit-button,
.delete-button {
position: absolute; /* Position them relative to the note card */
bottom: 10px; /* Position from the bottom */
right: 10px; /* Position from the right */
width: 40px; /* Set width */
height: 40px; /* Set height */
border-radius: 100%; /* Make them circular */
border: none; /* Remove default border */
background-color: rgba(255, 255, 255, 0.8); /* Slightly transparent background for visibility */
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Shadow effect */
cursor: pointer; /* Change cursor on hover */
display: none; /* Initially hide buttons */
font-size: small;
align-items: center;
}
.edit-button i,
.delete-button i{
position:absolute ;
left: 30%;
top: 30%;
}
.edit-button {
margin-right: 40px; /* Space between edit and delete buttons */
}
.note-card:hover .edit-button,
.note-card:hover .delete-button {
display: block; /* Show buttons on hover */
}
@media only screen and (max-width: 600px) {
.sidebar {
position: sticky;
overflow-x: hidden;
width: 3em; /* Set the width for the collapsed state */
}
.sidebar span {
opacity: 0; /* Hide text when collapsed */
}
.sidebar .sidebar-content {
margin-left: 10%;;
margin-top: 10px;
justify-content: center; /* Center icons when collapsed */
padding-left: 0; /* Remove left padding to avoid shifting */
padding-right: 0; /* Remove right padding to avoid shifting */
height: auto;
}
/* Center icons when collapsed, adjust padding accordingly */
.sidebar .sidebar-button {
justify-content: center; /* Center icons when collapsed */
margin-top: 15px;
padding-left: 0; /* Remove left padding to avoid shifting */
padding-right: 0; /* Remove right padding to avoid shifting */
height: auto; /* Allow height to adjust based on content */
}
.sidebar .sidebar-button:last-child {
display: none;
margin-top: auto;
}
.sidebar .sidebar-button span,
.sidebar .sidebar-content span {
display: none; /* Hide text when collapsed */
}
.sidebar .sidebar-button i {
font-size: 20px; /* Set icon size in collapsed state */
margin-right: 0; /* Remove margin for better centering */
}
/* Increase icon size when collapsed without affecting layout */
.sidebar .sidebar-content i {
font-size: 42px;
}
}