-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/html resources #81
Feature/html resources #81
Conversation
2febb0b
to
ddacb61
Compare
For the purposes of review, you can ignore all the images and .html files. The HTML/img files are replacing the previous PDFs - they were provided by Tufts, so the content should be fine. That reduces the number of files to review to about 25! |
ping @rschamp @mewtaylor it would be good to have a review on this and the other scratchjr PRs this week so I have time to make changes before the freeze if needed. thx |
curricular/full.css contains styles for printing any curriculum. moved added print-footer to teach to share between all curricula. May be able to share print css between curricula and assessment pages, but not counting on it.
Change curricula from static PDF files to webpages with print styles. Also update pattern for webpack url-loader to ignore case when matching file extensions (Tufts sends us things that were made on Windows, so images are .JPG, .PNG etc)
Also moved the full.css from curricula to print.css at the teach level. It’s shared by all the teach printable pages.
ddacb61
to
4e8d465
Compare
|
||
// router location does not include basename, since this function is setting | ||
// window.location later, pathname needs basename prepended | ||
if (typeof (this.props.basename) === 'string') { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
// history.replace loop | ||
const historyState = window.history.state || {}; | ||
const { | ||
state = {} |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
window.removeEventListener('scroll', this.debouncedScroll, {passive: true}); | ||
} | ||
|
||
onPush ({location}) { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
|
||
.student_answer_sheet img.small-image{ | ||
width:30%; | ||
} |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
On OSX 10.12, Chrome 60:
|
@mewtaylor yes, Tufts hasn't done an HTML version of the blocks yet, so they're still PDF. Just the curricula were converted to HTML. |
Converted curricula and assessment resources from PDFs to HTML so they can be translated.
One of the main items was the ScrollManager component. react-router v4 does not scroll the page when loading new components, and basically they decided to punt because browsers are starting to do the right thing: remix-run/react-router#3950
Unfortunately not all browsers are doing the right thing now, so I found examples from other people. It needed a little bit of modification because scratchjr views use a 'basename' and that wasn't handled.
All of this was only needed because the new HTML resources tend to be quite long, and to have #hash locations.
Testing: