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

Add a basic language switcher #30

Merged
merged 11 commits into from
Jan 28, 2016
Merged

Add a basic language switcher #30

merged 11 commits into from
Jan 28, 2016

Conversation

ozan
Copy link
Contributor

@ozan ozan commented Dec 22, 2015

@quackingduck can you review the implementation here please?

Fixes #14

Adds functionality to enable switching between languages.

To add language-specific content, wrap in a tag with data-language="clojure" for example. These tags are identified and the language switcher populated at runtime.

To test, play with the dynamic programming example

@ozan
Copy link
Contributor Author

ozan commented Dec 22, 2015

TODO: fix this

screenshot 2015-12-22 19 17 10

@ozan ozan deployed to algos-book-pr-30 January 3, 2016 06:32 Active
@ozan ozan deployed to algos-book-pr-30 January 28, 2016 16:39 Active
@ozan ozan deployed to algos-book-pr-30 January 28, 2016 16:44 Active
@ozan ozan deployed to algos-book-pr-30 January 28, 2016 20:52 Active
@quackingduck
Copy link
Member

This looks great. From a user's perspective it would be nice if the code samples were labelled with the language they were written in. For example a little light gray py in the top right corner of each python sample. Because, at least the way I understand it, it's possible to be reading a chapter where not all the code samples are in the language the user picked from the dropdown.

quackingduck pushed a commit that referenced this pull request Jan 28, 2016
@quackingduck quackingduck merged commit d8cf1df into master Jan 28, 2016
@quackingduck quackingduck deleted the 14-language-switcher branch January 28, 2016 20:54
@ozan
Copy link
Contributor Author

ozan commented Jan 28, 2016

it's possible to be reading a chapter where not all the code samples are in the language the user picked from the dropdown.

Yeah that's true. Something to add down the line.

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.

None yet

2 participants