-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
141 lines (120 loc) · 3.28 KB
/
style.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
/* Basic Reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Arial', sans-serif;
background-color: #f4f4f4;
color: #333;
display: flex;
flex-direction: row; /* Side-by-side layout */
flex-wrap: wrap; /* Wrap items to new line if not enough space */
align-items: start;
justify-content: center;
min-height: 100vh;
padding: 20px;
}
canvas {
border: 2px solid #555;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.controls {
background-color: #fff;
border: 1px solid #ddd;
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
width: 250px; /* Fixed width for controls */
margin-right: 20px; /* Space between controls and canvas */
}
.controls fieldset {
border: none;
margin-bottom: 10px;
}
.controls legend {
font-size: 1.2em;
margin-bottom: 10px;
}
label {
display: block;
margin-bottom: 5px;
}
input[type="number"] {
width: 100%;
padding: 8px;
margin-bottom: 10px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 1em;
}
/* Responsive Design */
@media (max-width: 768px) {
body {
flex-direction: column; /* Stack vertically on smaller screens */
align-items: center; /* Center align items */
}
.controls {
width: 100%; /* Full width for controls */
margin-right: 0; /* Remove margin-right */
margin-bottom: 20px; /* Add margin-bottom for spacing */
}
canvas {
max-width: 100%; /* Canvas takes full width */
}
}
#waveCanvas {
max-width: calc(100% - 220px); /* Adjust width to leave space for controls */
height: auto; /* Auto-adjust height */
}
#graphCanvas {
position: relative; /* Necessary for the absolute positioning of axis labels */
margin-top: 20px; /* Add space between the wave canvas and the graph */
}
#waveContainer {
display: flex;
flex-direction: row; /* Set elements side-by-side */
align-items: start;
justify-content: center;
width: 100%;
}
.axis-label {
position: absolute;
color: #000;
font-size: 16px;
}
#xAxisLabel {
bottom: -60px; /* Adjust as necessary to place below the canvas */
right: 0;
width: 100%; /* Ensure the label is centered with respect to the canvas width */
text-align: center; /* Center the text within the label's width */
}
#yAxisLabel {
top: 50%;
left: -20px; /* Adjust as necessary to place to the left of the canvas */
transform: translate(-50%, -50%) rotate(-90deg); /* Adjust the rotation point to the label's center */
transform-origin: center; /* Ensures the rotation is around the center of the label */
}
#graphContainer {
position: relative; /* This makes it the positioning context for its children */
width: 400px; /* Set to match the width of your canvas */
height: 400px; /* Set to match the height of your canvas */
margin: 40px; /* To accommodate axis labels */
}
.parameters-panel {
background-color: #fff;
border: 1px solid #ddd;
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
margin-top: 20px;
width: 300px; /* Adjust as needed */
}
.parameters-panel h3 {
margin-bottom: 10px;
}
.parameters-panel p {
margin-bottom: 5px;
font-size: 0.9em;
}