Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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
niccokunzmann merged 7 commits into CoderDojoPotsdam:master from DaricusDuncan:master
Oct 26, 2017

Conversation

Copy link
Collaborator

@DaricusDuncan DaricusDuncan commented Oct 14, 2017

[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
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.

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.
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

@niccokunzmann niccokunzmann Oct 16, 2017

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

@DaricusDuncan DaricusDuncan Oct 17, 2017

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.

Copy link
Member

niccokunzmann commented Oct 17, 2017 via email

All is fine so far. What does "one trumpet out of the band" mean?
...
On 10/17/2017 07:58 PM, DaricusDuncan wrote: ***@***.**** commented on this pull request. ------------------------------------------------------------------------ In en/00-01.html <#108 (comment)>: > + + <option id = "English" selected href="../en/00-01.html" value="EN_00_01">English</option> + <option id = "Deutsch" href="../de/00-01.html" value="DE_00_01" >Deutsch</option> + <option id = "Svenska" href="../sv/00-01.html" value="SV_00_01">Svenska</option> + +</select> + +<script> +function changeLanguage() { + var getLanguageMenu = document.getElementById('languageMenu'); + var getLanguageHref = getLanguageMenu.options[getLanguageMenu.selectedIndex].getAttribute('href'); + window.location.assign(getLanguageHref); + +} +</script> +<script src="http://code.jquery.com/jquery-3.2.1.min.js"></script> @niccokunzmann <https://github.com/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. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#108 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAieICCF67Cz-OM30D6XmWy5TJ0auHf0ks5stOrFgaJpZM4P5UW0>.

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.

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
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
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
Reviewers

@niccokunzmann niccokunzmann niccokunzmann left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /