-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
506 lines (444 loc) · 13.3 KB
/
Copy pathstyle.css
File metadata and controls
506 lines (444 loc) · 13.3 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
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
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
.github-link {
position: absolute;
top: 20px; /* Adjust as needed */
right: 20px; /* Adjust as needed */
z-index: 100;
display: flex; /* To align icon and text */
align-items: center; /* Vertically align icon and text */
text-decoration: none;
color: #333; /* Default text color */
font-size: 0.9em; /* Adjust text size */
}
.github-icon {
fill: #333; /* Icon color */
width: 24px; /* Matched to SVG attribute */
height: 24px; /* Matched to SVG attribute */
margin-right: 8px; /* Space between icon and text */
transition: fill 0.3s ease;
}
.github-link:hover .github-icon {
fill: #007bff; /* Icon color on hover */
}
.github-link:hover span {
color: #007bff; /* Text color on hover */
text-decoration: underline;
}
body {
font-family: sans-serif;
line-height: 1.6;
margin: 20px;
background-color: #f4f4f4;
}
h1, h2, h3 {
color: #333;
}
/* CIDR legend */
.cidr-legend-compact {
background-color: #f8f9fa;
border: 1px solid #dee2e6;
border-radius: 5px;
padding: 8px 12px; /* Reduced padding */
margin-bottom: 20px;
font-size: 0.9em; /* Even smaller font size */
color: #495057;
text-align: center; /* Center title and table */
}
.cidr-legend-compact .legend-title {
font-weight: 500;
margin-right: 8px; /* Space between title and table if they wrap */
display: inline-block; /* Keep title on same line as table if space allows */
margin-bottom: 5px; /* Add some space below if it wraps */
}
.cidr-legend-compact table {
display: inline-block; /* Allow table to sit next to title */
border-collapse: collapse;
text-align: center;
vertical-align: middle; /* Align table nicely with title */
}
/* Remove cell borders or make very light */
.cidr-legend-compact th,
.cidr-legend-compact td {
border: none; /* Remove cell borders */
padding: 2px 6px; /* Adjust padding */
white-space: nowrap; /* Prevent wrapping within cells */
}
.cidr-legend-compact th { /* Mask row */
font-weight: 500;
font-family: monospace;
border-bottom: 1px solid #dee2e6; /* Separator line */
}
.cidr-legend-compact td { /* IP count row */
font-weight: normal;
}
/* Input Section */
.input-section, .results-section {
background-color: #fff;
padding: 20px;
margin-bottom: 20px;
border-radius: 5px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
label {
display: inline-block;
width: 200px; /* Adjust as needed */
margin-bottom: 10px;
}
.input-group input[type="number"] {
padding: 8px; /* Increased padding */
border: 1px solid #ccc;
border-radius: 4px;
width: 80px; /* Slightly wider if needed, or adjust based on new padding */
margin: 0;
font-size: 1.05em; /* Slightly larger font */
}
button#calculateBtn {
padding: 10px 20px; /* Increased padding */
background-color: #007bff;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 1.05em; /* Slightly larger font */
display: inline-flex; /* For aligning icon and text */
align-items: center; /* For aligning icon and text */
gap: 8px; /* Space between icon and text */
}
button:hover {
background-color: #0056b3;
}
#results h3 {
margin-top: 25px;
margin-bottom: 10px;
border-bottom: 1px solid #eee;
padding-bottom: 5px;
}
#results p {
margin: 5px 0 10px 0;
}
#summary strong {
color: #28a745; /* Green for key results */
}
#summary .warning {
color: orange;
font-weight: bold;
}
/* === Add or Modify these styles in style.css === */
.input-section {
display: flex; /* Use flexbox to arrange the groups */
flex-wrap: wrap; /* Allow items to wrap onto the next line */
align-items: flex-end; /* Align items based on their bottom edge */
gap: 20px 25px; /* Vertical and Horizontal gap between groups */
padding: 20px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
margin-bottom: 20px;
}
.input-group {
/* Structure for label + input */
display: flex;
flex-direction: column; /* Stack label above input */
gap: 4px; /* Small space between label and its input */
}
.input-group label {
/* Reset previous label styles if they conflict */
width: auto; /* Remove fixed width */
margin-bottom: 0; /* Remove default margin */
font-weight: 500; /* Optional: Make labels slightly bolder */
font-size: 0.9em; /* Optional: Adjust font size */
color: #333;
text-align: left; /* Ensure labels align left */
}
.input-group input[type="number"] {
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
width: 75px; /* Adjust width as needed, or use 'auto' */
margin: 0; /* Reset margins */
font-size: 1em; /* Ensure consistent font size */
}
button#calculateBtn { /* Be specific if needed */
padding: 10px 20px;
background-color: #007bff;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 1em;
/* margin-top: 10px; Remove this if using align-items: flex-end */
}
button#calculateBtn:hover {
background-color: #0056b3;
}
#results {
display: grid; /* Use CSS Grid */
grid-template-columns: 1fr 1.2fr; /* Define two columns. Right slightly wider (adjust ratio as needed) */
gap: 30px; /* Gap between columns */
/* Keep existing background, padding, etc. */
background-color: #fff;
padding: 20px;
margin-bottom: 20px;
border-radius: 5px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* Optional: Style the columns if needed, but often not necessary */
.results-left-column {
/* Takes up the first grid column */
}
.results-right-column {
/* Takes up the second grid column */
display: flex; /* Use flexbox to stack allocation groups vertically */
flex-direction: column;
gap: 1px; /* Space between the allocation groups */
}
/* Optional: Style for the allocation groups in the right column */
.allocation-group h3 {
margin-top: 0; /* Remove default top margin if needed */
margin-bottom: 8px;
border-bottom: 1px solid #eee;
padding-bottom: 5px;
font-size: 1.1em;
}
/* --- Make sure other styles for summary, viz-container, etc., are still present --- */
/* Example: Ensure summary paragraphs have reasonable margins */
#summary p {
margin: 8px 0 12px 0;
line-height: 1.5;
}
#summary strong {
color: #28a745;
}
#summary .warning {
color: orange;
font-weight: bold;
}
/* --- Visualization Styles --- */
.viz-container {
width: 100%;
height: 30px; /* Height of the bar */
background-color: #e9ecef; /* Background of the container (represents total) */
border-radius: 4px;
margin-bottom: 5px;
overflow: hidden; /* Hide text overflow */
position: relative; /* For positioning text */
border: 1px solid #ccc;
}
.viz-bar {
height: 100%;
background-color: #28a745; /* Color of the used portion */
width: 0%; /* Start with 0 width, JS will set this */
transition: width 0.5s ease-in-out; /* Animate the width change */
text-align: center;
color: white;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.9em;
font-weight: bold;
}
/* Make text viewable even if bar is small */
.viz-text {
position: absolute; /* Position text relative to container */
width: 100%; /* Span the whole container */
left: 0;
text-align: center;
line-height: 30px; /* Match container height */
color: #333; /* Dark text color */
text-shadow: 1px 1px 1px #fff, -1px -1px 1px #fff; /* Basic outline for readability */
}
.viz-bar .viz-text {
/* Style for text when it's inside the colored bar (optional override) */
color: white; /* White text when inside the bar */
text-shadow: none;
}
#nodeVizBar { background-color: #007bff; } /* Blue for Nodes */
#podVizBar { background-color: #fd7e14; } /* Orange for Pods */
#serviceVizBar { background-color: #6f42c1; } /* Purple for Services */
#nodeVizLegend, #podVizLegend, #serviceVizLegend {
font-size: 0.9em;
color: #555;
margin-bottom: 15px;
}
/* Cluster Visualization */
.cluster-viz-section {
background-color: #fff;
padding: 20px;
margin-top: 20px; /* Space below previous results */
border-radius: 5px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.cluster-viz-section h2 {
text-align: center;
margin-bottom: 25px;
color: #333;
}
.cluster-container {
border: 2px solid #6c757d; /* Dark grey border for cluster */
border-radius: 8px;
padding: 40px 20px 20px 20px; /* More padding top for label */
position: relative; /* For positioning the cluster label */
min-height: 300px; /* Give it some minimum height */
display: flex; /* Use flex to position node/service areas */
gap: 20px;
align-items: flex-start; /* Align areas to the top */
flex-wrap: wrap; /* Allow wrapping on small screens */
}
.cluster-label {
position: absolute;
top: -12px; /* Position label slightly overlapping the top border */
left: 15px;
background-color: #fff; /* Background to cover the border */
padding: 0 10px;
font-weight: bold;
color: #6c757d;
}
/* Node Area Styles */
.node-area {
border: 1px dashed #007bff; /* Blue dashed border for node area */
padding: 15px;
border-radius: 6px;
background-color: #e7f3ff; /* Light blue background */
flex: 2; /* Allow node area to take more space */
min-width: 250px;
transition: border-color 0.5s ease; /* Smooth color transition */
}
.area-label {
font-size: 0.9em;
font-weight: 500;
color: #555;
margin-bottom: 10px;
display: block; /* Make it block for margin */
}
.area-label small {
font-weight: normal;
color: #777;
}
.node-box {
border: 2px solid #007bff; /* Solid blue border for the node */
background-color: #fff;
border-radius: 4px;
padding: 10px;
margin-bottom: 10px; /* Space between node boxes if showing more */
min-height: 100px; /* Ensure node box has some height */
position: relative;
transition: border-color 0.5s ease; /* For color change effect */
}
.element-label {
font-weight: bold;
font-size: 0.85em;
color: #0056b3;
}
.node-details {
font-size: 0.8em;
color: #666;
margin-bottom: 10px;
}
/* Pod Area Styles inside Node */
.pod-area {
border: 1px solid #fd7e14; /* Orange border for pod area */
background-color: #fff9f3; /* Light orange background */
border-radius: 3px;
padding: 8px;
margin-top: 5px;
transition: border-color 0.5s ease;
}
.pod-icons {
margin-bottom: 5px;
}
.pod-icon {
display: inline-block;
width: 12px;
height: 12px;
background-color: #fd7e14; /* Orange pod */
border-radius: 2px; /* Slightly rounded square */
margin-right: 4px;
}
.pods-label {
margin-bottom: 0; /* Reset margin */
font-size: 0.85em;
}
.pods-label small { font-size: 0.9em; }
/* Service Area Styles */
.service-area {
border: 1px dashed #6f42c1; /* Purple dashed border */
padding: 15px;
border-radius: 6px;
background-color: #f4eFFF; /* Light purple background */
flex: 1; /* Allow service area to take less space */
min-width: 150px;
}
.service-icon-container {
text-align: center; /* Center icons */
}
.service-icon {
display: inline-block;
width: 15px;
height: 15px;
background-color: #6f42c1; /* Purple service */
border-radius: 50%; /* Circle */
margin: 5px;
}
/* Faded elements to indicate 'more' */
.faded-icon {
opacity: 0.4;
}
.faded-box {
border-style: dashed; /* Use dashed border for faded look */
opacity: 0.5; /* Make it semi-transparent */
text-align: center;
padding-top: 15px; /* Adjust padding as needed */
min-height: 50px; /* Give it some minimum height */
margin-top: 10px; /* Add margin if needed */
/* Inherits .node-box border-color, padding etc. unless overridden */
}
.faded-box .element-label {
color: #666; /* Lighter color for the text */
font-weight: normal; /* Less emphasis */
}
/* Styles when a resource has unused capacity */
.has-room {
border-width: 2px; /* Make border slightly thicker */
border-color: #28a745 !important; /* Green border - use !important if needed to override default */
}
.has-room > .area-label { /* Style label within the area */
/* color: #19692c; */ /* Optional: Change label color */
}
/* Styles when a resource is the limiting factor */
.is-limited {
border-width: 2px;
border-color: #dc3545 !important; /* Red border */
}
.is-limited > .area-label {
/* color: #a71d2a; */ /* Optional: Change label color */
}
/* Style for the small text indicating unused IPs */
.unused-info {
display: block; /* Put it on its own line */
font-size: 0.8em;
font-style: italic;
color: #555;
margin-top: 4px;
}
.unused-info.has-room-text { /* Style when showing room */
color: #19692c; /* Dark green text */
}
/* footer */
footer {
text-align: center;
padding: 20px;
margin-top: 30px; /* Space above the footer */
font-size: 0.85em;
color: #6c757d; /* Muted text color */
border-top: 1px solid #dee2e6; /* Separator line */
background-color: #f8f9fa; /* Optional: Light background for footer */
}
footer p {
margin: 5px 0;
}
footer a {
color: #007bff;
text-decoration: none;
}
footer a:hover {
text-decoration: underline;
}