|
23 | 23 | <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> |
24 | 24 | <script src=https://unpkg.com/compare-versions/lib/umd/index.js></script> |
25 | 25 | <script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script> |
26 | | - <style> |
27 | | - .toggle-switch { |
28 | | - display: flex; |
29 | | - flex-wrap: wrap; |
30 | | - justify-content: space-between; |
31 | | - padding: 10px; |
32 | | - } |
33 | | - |
34 | | - .toggle-label { |
35 | | - cursor: pointer; |
36 | | - flex-basis: calc(10%); /* Subtract gap size */ |
37 | | - text-align: center; |
38 | | - } |
39 | | - |
40 | | - .toggle-label input[type="radio"] { |
41 | | - display: none; |
42 | | - } |
43 | | - |
44 | | - .toggle-label input[type="radio"] + span { |
45 | | - display: block; |
46 | | - padding: 8px 12px; |
47 | | - background-color: #f1f1f1; |
48 | | - border: 1px solid #ccc; |
49 | | - border-radius: 5px; |
50 | | - transition: all 0.3s ease; |
51 | | - } |
52 | | - |
53 | | - .toggle-label input[type="radio"]:checked + span { |
54 | | - background-color: #4CAF50; |
55 | | - color: white; |
56 | | - border: 1px solid #4CAF50; |
57 | | - } |
58 | | - .switch { |
59 | | - position: relative; |
60 | | - display: inline-block; |
61 | | - width: 100px; /* Increased width to accommodate labels */ |
62 | | - height: 34px; |
63 | | - } |
64 | | - |
65 | | - .switch input { |
66 | | - opacity: 0; |
67 | | - width: 0; |
68 | | - height: 0; |
69 | | - } |
70 | | - |
71 | | - .slider { |
72 | | - position: absolute; |
73 | | - cursor: pointer; |
74 | | - top: 0; |
75 | | - left: 0; |
76 | | - right: 0; |
77 | | - bottom: 0; |
78 | | - background-color: #ccc; |
79 | | - transition: .4s; |
80 | | - border-radius: 34px; |
81 | | - display: flex; |
82 | | - align-items: center; |
83 | | - justify-content: right; |
84 | | - padding: 0 10px; |
85 | | - color: black; |
86 | | - font-size: 12px; |
87 | | - } |
88 | | - |
89 | | - .slider:before { |
90 | | - position: absolute; |
91 | | - content: ""; |
92 | | - height: 26px; |
93 | | - width: 26px; |
94 | | - left: 4px; |
95 | | - bottom: 4px; |
96 | | - background-color: white; |
97 | | - transition: .4s; |
98 | | - border-radius: 50%; |
99 | | - } |
100 | | - |
101 | | - input:checked + .slider { |
102 | | - background-color: limegreen; |
103 | | - justify-content: left; |
104 | | - } |
105 | | - |
106 | | - input:checked + .slider:before { |
107 | | - transform: translateX(56px); /* Adjusted for wider switch */ |
108 | | - } |
109 | | - |
110 | | - .label { |
111 | | - pointer-events: none; /* Disable events on labels to avoid interference */ |
112 | | - } |
113 | | - |
114 | | - .daily { |
115 | | - display: block; |
116 | | - order: 2; /* Ensures it goes to the right when unchecked */ |
117 | | - } |
118 | | - |
119 | | - .aggregate { |
120 | | - display: none; |
121 | | - } |
122 | | - |
123 | | - input:checked + .slider .aggregate { |
124 | | - display: block; |
125 | | - order: 1; /* Ensures it goes to the left when checked */ |
126 | | - } |
127 | | - |
128 | | - input:checked + .slider .daily { |
129 | | - display: none; |
130 | | - } |
131 | | - |
132 | | - </style> |
| 26 | + <link rel="stylesheet" href="download-graphs.css"> |
133 | 27 | </head> |
134 | 28 | <body> |
135 | 29 | <h1>Version Selector</h1> |
136 | | -<select id="versionSelector"></select> |
137 | | -<label class="switch"> |
138 | | - <input type="checkbox" id="toggleButton"> |
139 | | - <span class="slider"> |
| 30 | +<div style="display: flex; width: 192px; justify-content: space-between;"> |
| 31 | + <select id="versionSelector"></select> |
| 32 | + <label class="switch"> |
| 33 | + <input type="checkbox" id="toggleButton" /> |
| 34 | + <span class="slider"> |
140 | 35 | <span class="label daily">Daily</span> |
141 | 36 | <span class="label aggregate">Aggregate</span> |
142 | 37 | </span> |
143 | | -</label> |
| 38 | + </label> |
| 39 | +</div> |
144 | 40 | <h2>Show Last</h2> |
145 | 41 | <div class="toggle-switch"> |
146 | 42 | <label class="toggle-label"> |
|
0 commit comments