Quellcode durchsuchen

add tracer pics to openchrono. make additional photos section collapsible.

Thomas Buck vor 2 Jahren
Ursprung
Commit
01e4cc9d84

+ 22
- 3
input/projects/openchrono.md Datei anzeigen

@@ -4,7 +4,7 @@ parent: projects
4 4
 git: https://git.xythobuz.de/thomas/OpenChrono
5 5
 github: https://github.com/xythobuz/OpenChrono
6 6
 date: 2022-06-26
7
-update: 2022-06-29
7
+update: 2022-07-01
8 8
 comments: true
9 9
 ---
10 10
 
@@ -246,6 +246,8 @@ Other thread profiles can be added easily.
246 246
 
247 247
 If you don't need to customize anything you can also get pre-rendered STL files from [Printables](https://www.printables.com/model/232238-openchrono-airsoft-chronograph-and-tracer) or [Thingiverse](https://www.thingiverse.com/thing:5419855).
248 248
 
249
+### Left Half
250
+
249 251
 Print the parts, remove supports and do some sanding as needed.
250 252
 Then put in the heat-melt inserts.
251 253
 I recommend using a spare thick soldering iron tip.
@@ -321,6 +323,22 @@ lightgallery([
321 323
 ])
322 324
 %-->
323 325
 
326
+### Tracer Option
327
+
328
+If you want to build the left half with the UV LED tracer option included I recommend using the existing ground connections of the IR LEDs and phototransistors.
329
+That way you only need to run two additional wires.
330
+I placed the 30Ω resistor on the underside of the Arduino, shielding it with some heat-shrink tubing.
331
+
332
+<!--%
333
+lightgallery([
334
+    [ "img/chrono_tracer_1.jpg", "Tracer option, unfinished wiring" ],
335
+    [ "img/chrono_tracer_2.jpg", "Resistor below Arduino" ],
336
+    [ "img/chrono_tracer_3.jpg", "Completed UV tracer wiring" ],
337
+])
338
+%-->
339
+
340
+### Right Half
341
+
324 342
 Next we're going to prepare the right half.
325 343
 
326 344
 **Beware:** If you use the TP4056 LiPo charger board, they normally come with the charge current set to 1A with a 1.2kΩ resistor on position R3.
@@ -625,8 +643,8 @@ OpenChrono is licensed under the [GNU General Public License](https://www.gnu.or
625 643
 ## More Pictures
626 644
 <a class="anchor" name="more_pictures"></a>
627 645
 
628
-Here are some more photographs I didn't use above.
629
-
646
+<div class="collapse">Some more photographs I didn't use above.</div>
647
+<div class="collapsecontent">
630 648
 <!--%
631 649
 lightgallery([
632 650
     [ "img/OpenChrono_bb.png", "AA 'Breadboard' wiring plan" ],
@@ -659,3 +677,4 @@ lightgallery([
659 677
     [ "img/chrono_m11_measurement_26.jpg", "" ],
660 678
 ])
661 679
 %-->
680
+</div>

+ 29
- 9
page.html Datei anzeigen

@@ -224,17 +224,37 @@ else:
224 224
         });
225 225
     </script>
226 226
     <script>
227
+        var coll = document.getElementsByClassName("collapse");
228
+        var i;
229
+        for (i = 0; i < coll.length; i++) {
230
+            coll[i].addEventListener("click", function() {
231
+                this.classList.toggle("collapseactive");
232
+                var content = this.nextElementSibling;
233
+                if (content.style.maxHeight) {
234
+                    content.style.maxHeight = null;
235
+
236
+                    setTimeout(function() {
237
+                        content.style.borderWidth = null;
238
+                    }, 800);
239
+                } else {
240
+                    content.style.maxHeight = content.scrollHeight + "px";
241
+                    content.style.borderWidth = "2px";
242
+                }
243
+            });
244
+        }
245
+    </script>
246
+    <script>
227 247
         (function(f, a, t, h, o, m){
228 248
             a[h]=a[h]||function(){
229 249
                 (a[h].q=a[h].q||[]).push(arguments)
230
-        	};
231
-			o=f.createElement('script'),
232
-			m=f.getElementsByTagName('script')[0];
233
-			o.async=1; o.src=t; o.id='fathom-script';
234
-			m.parentNode.insertBefore(o,m)
235
-		})(document, window, '//stats.xythobuz.de/tracker.js', 'fathom');
236
-		fathom('set', 'siteId', 'APYRK');
237
-		fathom('trackPageview');
238
-	</script>
250
+            };
251
+            o=f.createElement('script'),
252
+            m=f.getElementsByTagName('script')[0];
253
+            o.async=1; o.src=t; o.id='fathom-script';
254
+            m.parentNode.insertBefore(o,m)
255
+        })(document, window, '//stats.xythobuz.de/tracker.js', 'fathom');
256
+        fathom('set', 'siteId', 'APYRK');
257
+        fathom('trackPageview');
258
+    </script>
239 259
 </body>
240 260
 </html>

+ 40
- 5
static/css/style.css Datei anzeigen

@@ -203,9 +203,36 @@ span.font-small {
203 203
     cursor: zoom-in;
204 204
 }
205 205
 
206
+.collapse {
207
+    cursor: pointer;
208
+    padding: 15px;
209
+}
210
+
211
+.collapse:after {
212
+    content: '\002B';
213
+    font-weight: bold;
214
+    float: right;
215
+    margin-left: 5px;
216
+}
217
+
218
+.collapseactive:after {
219
+    content: "\2212";
220
+}
221
+
222
+.collapsecontent {
223
+    padding: 0;
224
+    margin: 15px;
225
+    max-height: 0;
226
+    overflow: hidden;
227
+    transition: max-height 0.8s ease-out;
228
+    border-width: 0px;
229
+    border-style: solid;
230
+    border-radius: 10px;
231
+}
232
+
206 233
 /* colors */
207 234
 
208
-body, #nav {
235
+body, #nav, .collapsecontent {
209 236
     background-color: #FFFFFF;
210 237
 }
211 238
 
@@ -233,11 +260,11 @@ hr {
233 260
     color: #32CD32;
234 261
 }
235 262
 
236
-table, th, td, pre, .border, .releasecard, #index-avatar {
263
+table, th, td, pre, .border, .releasecard, #index-avatar, .collapsecontent {
237 264
     border-color: #32CD32;
238 265
 }
239 266
 
240
-.releasecard {
267
+.releasecard, .collapse {
241 268
     background-color: #C0C0C0;
242 269
 }
243 270
 
@@ -250,9 +277,13 @@ table, th, td, pre, .border, .releasecard, #index-avatar {
250 277
     margin-left: 1em;
251 278
 }
252 279
 
280
+.collapseactive, .collapse:hover {
281
+    background-color: #999999;
282
+}
283
+
253 284
 /* dark mode */
254 285
 @media (prefers-color-scheme: dark) {
255
-    body, #nav {
286
+    body, #nav, .collapsecontent {
256 287
         background-color: #111111;
257 288
     }
258 289
 
@@ -268,7 +299,7 @@ table, th, td, pre, .border, .releasecard, #index-avatar {
268 299
         color: #BA55D3;
269 300
     }
270 301
 
271
-    .releasecard {
302
+    .releasecard, .collapse {
272 303
         background-color: #232323;
273 304
     }
274 305
 
@@ -311,4 +342,8 @@ table, th, td, pre, .border, .releasecard, #index-avatar {
311 342
     .commento-name, .commento-permalink, [id^=commento-comment-text] p {
312 343
         color: #FFFFFF !important;
313 344
     }
345
+
346
+    .collapseactive, .collapse:hover {
347
+        background-color: #424242;
348
+    }
314 349
 }

BIN
static/img/chrono_tracer_1.jpg Datei anzeigen


BIN
static/img/chrono_tracer_1_small.jpg Datei anzeigen


BIN
static/img/chrono_tracer_2.jpg Datei anzeigen


BIN
static/img/chrono_tracer_2_small.jpg Datei anzeigen


BIN
static/img/chrono_tracer_3.jpg Datei anzeigen


BIN
static/img/chrono_tracer_3_small.jpg Datei anzeigen


Laden…
Abbrechen
Speichern