1- <!DOCTYPE html>
2- < html lang ="en ">
3- < head >
4- < meta charset ="UTF-8 ">
5- < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6- < title > Random Walker</ title >
1+ ---
2+ tags: [main, random-walker]
3+ title: Random Walker
4+ layout: 'base'
5+ ---
76
8- < link rel ="stylesheet " type ="text/css " href ="{{ '/assets/cssStyle/generic.css' | url }} ">
9- < link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css ">
10- < script src ="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js " defer > </ script >
11- < script src ="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-javascript.min.js " defer > </ script >
12- < script src ="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.7.0/p5.min.js "> </ script >
13- </ head >
14- < body style ="margin:10px ">
15- < h1 > Chapter 2</ h1 >
16- < h1 > Random Walker</ h1 >
17- < hr >
18-
19- <!-- Shared utility function for pausing and resuming any sketch -->
20- < script >
21- let pauseButtonToggle = function ( button , sketch ) {
22- if ( sketch . isLooping ( ) ) {
23- button . innerText = "Play" ;
24- sketch . noLoop ( ) ;
25- } else {
26- button . innerText = "Pause" ;
27- sketch . loop ( ) ;
28- }
7+ < h1 > Chapter 2</ h1 >
8+ < h1 > Random Walker</ h1 >
9+ < hr >
10+ <!-- Shared utility function for pausing and resuming any sketch -->
11+ < script >
12+ let pauseButtonToggle = function ( button , sketch ) {
13+ if ( sketch . isLooping ( ) ) {
14+ button . innerText = "Play" ;
15+ sketch . noLoop ( ) ;
16+ } else {
17+ button . innerText = "Pause" ;
18+ sketch . loop ( ) ;
2919 }
30- </ script >
31-
32- {% for section in collections.chap2 %}
33- {{ section.templateContent | safe }}
34- {% endfor %}
20+ }
21+ </ script >
22+
23+ {% for section in collections.chap2 %}
24+ {{ section.templateContent | safe }}
25+ {% endfor %}
3526
36- <!-- Auto-load section scripts -->
37- {% for section in collections.chap2 %}
38- < script src ="{{ section.data.script | url }} "> </ script >
39- {% endfor %}
40- </ body >
41- </ html >
27+ <!-- Auto-load section scripts -->
28+ {% for section in collections.chap2 %}
29+ < script src ="{{ section.data.script | url }} "> </ script >
30+ {% endfor %}
0 commit comments