Skip to content

[WIP] - EN/00-01.html Dropdown Menu Select Option to Change Languages #108

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

Merged
merged 7 commits into from
Oct 26, 2017

Conversation

DaricusDuncan
Copy link
Collaborator

[Work In Progress] for EN/00-01.html [Web Page]

Implementation of drop-down menu for the English 00-01.html page.

Please critique and help make better.

Link to live web page is located here: https://daricusduncan.github.io/regex-tutorial/

Adding drop down menu option to change languages
Changed variable naming and href references to change directories and
make code more readable.
removed console.log line of code
@niccokunzmann
Copy link
Member

Hi, this looks nice. If you like to put this into the footer: https://github.com/CoderDojoPotsdam/regex-tutorial/blob/master/_layouts/tutorial.html#L118
then, it can be seen on all pages.

@niccokunzmann
Copy link
Member

Github Pages use Jekyll to generate the web page.
I use this for a reference: https://learn.cloudcannon.com/jekyll-cheat-sheet/ but it does only give an overview and no introduction to Jekyll.

If you set up the Jekyll software locally, you get feedback in under a second if you change something. Github pages are slow and I never know if they show the updated version.

You can have a look what modifying this file and trying out different Jekyll commands does here:
https://github.com/CoderDojoPotsdam/regex-tutorial/blob/master/_layouts/tutorial.html
Maybe there is a Jekyll tutorial.

An other idea, if you like to put this into the footer of every page:
In the page, we can exchange the language part and use {{ page.url }} or something like it to build together the url for all pages.

../en/00-01.html

Implemented JQuery to reset the position of the drop-down language menu
to the selected option.

The back button action will now revert back to the previous page while
keeping the selected option as default value.
@DaricusDuncan
Copy link
Collaborator Author

@niccokunzmann Thank you so much for the advice and materials.

I am making some changes now and will get Jekyll set up locally so that I can implement pages.url or just learn Jekyll and leverage it.

I will encapsulate all of my code so far into a footer like suggested.

I appreciate the Jekyll cheat sheet and will be studying over that now.

en/00-01.html Outdated

}
</script>
<script src="http://code.jquery.com/jquery-3.2.1.min.js"></script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This site shall also work off-line, without any Internet connection.
This is not important now. Before I merge, I would like to make sure that a downloaded version does not load resources from other locations. This is also a privacy concern as I do not want this page to tell jquery.com that the viewer is interested in this site.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@niccokunzmann I can try to figure out a solution to my problem without using JQuery or using the downloaded version of JQuery.

I am still working on this issue and will be continuing the setup of Jekyll locally.

I am one trumpet out of the band here so if there is anything you just do not like, let me know and I can change it.

@niccokunzmann
Copy link
Member

niccokunzmann commented Oct 17, 2017 via email

@DaricusDuncan
Copy link
Collaborator Author

@niccokunzmann It is a figure of speech saying that I am one person helping out the group. The person playing the trumpet has to be in tune with the rest of the band otherwise the band is off.

I am just trying to help the team to the best of my abilities, learn from everyone, and be a team player for the project.

@DaricusDuncan
Copy link
Collaborator Author

@niccokunzmann I am still learning how to add my code to the footer so that I can use {{page.url}}. I am reading and watching videos to help. Just wanted to update you.

Removed the code implemented in the en/00-01.html file to the footer section of _layouts for Jekyll usage across all pages.
Modified tutorial.html footer section to contain the languagemenu div for all pages.
ignoring all Gemfile.lock changes and .lock changes --hopefully this will work right
@niccokunzmann
Copy link
Member

I just checked it out .. cool! This is what I hoped for.
I will merge it since the language feature works online.
It does not work offline but that will be a new issue.

@niccokunzmann niccokunzmann merged commit 1a1140e into CoderDojoPotsdam:master Oct 26, 2017
@niccokunzmann
Copy link
Member

@DaricusDuncan, I invite you to collaborate on this: https://github.com/CoderDojoPotsdam/regex-tutorial/invitations I will be able to merge other people's pull-requests if you accept.

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

Successfully merging this pull request may close these issues.

2 participants