-
-
Notifications
You must be signed in to change notification settings - Fork 4
Language specific examples #68
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
Language specific examples #68
Conversation
Programming language specific toggle example on the OOP file. - Does not include: Listener to remember the selected after page refresh Javascript has to be changed to its own specific file rather than on the .md itself.
Additionally added a feature that adds an event listener and saves the current language to the users local storage, if not defiend previously. If it is defined it loads the selected language from this example Cpp or Csharp. Which will be asked each time a refresh is called or page is reloaded. Additionally Pressing the Button either cpp or Csharp will rewrite the Language Preference and store it to locally. Note: This Requires that the JavaScript would be made globally not for each instance where possible. Make sure that only specified buttons are called so make cases if there are less or more languages. " in the future figure out where to store these as all in the same file would be an overkill potentially ".
|
With the following the layout of the page is as follows: The Current has two available markers with defined ID and content, which by the button is either hidden or updated on the page to show that part of the discussion.
Though note with this both of these will be available if enabled by inspector, but for the default user it would display it as one, which is enabled locally otherwise uses the default first value as to what is displayed. Which is modified to enable or disable by the following Script |
Now the Content has a saved value based on the Path of the URL and the ID selected. When page is refreshed or loaded it would load the value if defined by default it should be on " cpp " Wrote comments to be more clear and understandable what each section actually does. Made an " asset " folder to hold the js file. Additionally in the next commit will include Images and CSS into that specified location. Currently Using " OOP and Memory " as placeholders for these examples.
|
Script has been listed for global use under "asssets/js/script.. " can be called by using the command Within the .md file file as an example:
Other dependencies of the page is a requirement to select the following buttons:
Which must include a " " to be used as an example here are the three specified:
NOTE: You can specify any amount from 0 to 3 As for example you can use:
The specified must be listed with these exact words for ID As these specifications are defined within the -> with the following
Functionality of the feature:
|
JDSherbert
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, raised a question but otherwise fine to go in.



++ PLEASE Read the changes carefully and comments specified under the post ++
[ADDRESSING] - @JDSherbert
Discussion in Issue " #25 ":
In this issue, it was discussed that while the current "Concepts" folder contains examples, there's a need to enhance it by including examples in different languages instead of defaulting to the easiest option. This is particularly relevant where certain languages do not utilize specific concepts, like Object-Oriented Programming (OOP).
Key points of discussion in Issue " #25 " include:
Default Language for Examples:
Folder Structure and Organization:
Implementation of Multiple Language Examples on the Same Page:
The following example implementation aims to address the aforementioned points:
Please note:
Has Been fully addressed in
#68 (comment)