shiffman / learningprocessing.com

New learningprocessing.com site
68 stars 21 forks source link

example and exercise layouts need to deal with multiple JS files #32

Closed shiffman closed 8 years ago

shiffman commented 8 years ago
  <script language="javascript" src="{{ page.js-files }}"></script>

This needs to be written something like (psuedo-code):

for (loop through array of page.js-files with index i) {
   <script language="javascript" src="{{ page.js-files[i] }}"></script>
}

@scottwooden any ideas? I can look into it.

scottwooden commented 8 years ago

Okay best way I can see to do this is to use the YAML array in the posts so need to format posts as follow:

js-file:

pde-file:

I've re-written the code to acomodate this new format. I'm trying to figure out best way to load just the first .JS file on load, and dynamically load others when they click on the tab links. Any suggestions? For now, I've got it to load the first file.

scottwooden commented 8 years ago

This is pushed, so at the moment no exercises / examples work apart from example 9-10 which has the new format in

shiffman commented 8 years ago

This is working now, hooray!