openzim / openedx

Open edX (to zim) scraper
GNU General Public License v3.0
8 stars 7 forks source link

Fetch CSS and JS from instance to have proper layout #92

Closed satyamtg closed 4 years ago

satyamtg commented 4 years ago

This addresses #90 and in turn several other issues (Implements the second option as in #90). It basically gets the CSS and JS from the instance to have proper layout.

This has the following changes -

At this point of time it fixes #71, #72 (except fonts), #74, #80, #84 Also, with this, #78 would be a wontfix as we are only extracting CSS at the vertical level. The navigation bar can be made optional though using a parameter

82 is now fixed. It depended on a MutationObserver observing seq_contents which is not static in the instances (unlike ours). On instances they have HTMLs at sequential level whereas we have it at the vertical level. So, added a small jQuery script to simulate the sequential content change behaviour on loading a HTML.

79 is now fixed. It was due to an inline script that tried to access a tag below it. This has been solved by deferring the scripts and putting them into a separate file when they're in the body of an xblock.

Currently, the following things are yet to be solved -