Skip to content
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

Improve Footer #110

Closed
5 tasks
niccokunzmann opened this issue Oct 26, 2017 · 1 comment
Closed
5 tasks

Improve Footer #110

niccokunzmann opened this issue Oct 26, 2017 · 1 comment

Comments

@niccokunzmann
Copy link
Member

niccokunzmann commented Oct 26, 2017

Website-link: https://coderdojopotsdam.github.io/regex-tutorial/de/02-02.html

Expected Behavior

I expect the language menu to show the selected language and
all code of the page to be running on offline
and fullfilling a purpose.
JavaScript code should be in its own JavaScript file.

Actual Behavior

https://github.com/CoderDojoPotsdam/regex-tutorial/blob/master/_layouts/tutorial.html#L145
In this line, we load a library from the web.
I do not see this resource being loaded, when I click on the page and open the network monitor.

The expected behavior seems to be fulfilled without the code following the library load.
Please remove it an see if this is still working.

Solution Description

  • please move the JavaScript code to its own JavaScript file.
  • test if the code can be removed
  • If it is needed: either add the library to the tutorial or replace the code using jquery with own JavaScript code
  • For having all in one place which belongs together,
    • add a "language" key to the localization with language codes pointing to the name of their language. de -> Deutsch
    • use this in the footer code to reduce the size of the code.

Hints

  • When you move the code, you may want to register an onload handler so part of it are executed when the page is fully loaded and all elements are present.
  • I would vote for removing jquery beause it is a huge dependency which it not required.
@niccokunzmann
Copy link
Member Author

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant