You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
130 lines
5.5 KiB
130 lines
5.5 KiB
/** |
|
**- |
|
* JavaScript providing functions for |
|
* creating the button groups seen at |
|
* the bottom of most pages |
|
* |
|
* Author - Philip Osztromok |
|
* |
|
* 27 March 2022 |
|
*+ |
|
*/ |
|
|
|
import { addButtonGroup } from '/scripts/visuals.js'; |
|
|
|
function menu(course) { |
|
const menu = getChapters(course); |
|
console.log("This is what was passed to the function, menu!"); |
|
console.log(course); |
|
const buttons = addButtonGroup(menu); |
|
|
|
return buttons; |
|
} |
|
|
|
function getChapters(course) { |
|
if (course == "home") return [ |
|
"Android Development", "android/android.html", |
|
"Linux", "linux/linux.html", |
|
"Programming", "programming/programming.html", |
|
"Raspberry Pi", "raspberrypi/raspberrypi.html", |
|
"Web Development", "webdevelopment/webdevelopment.html", |
|
"Hungary", "hungary/hungary.html", |
|
"Japan", "japan/japan.html", |
|
] |
|
|
|
else if (course == "japan") return [ |
|
"Language", "language/language.html", |
|
"Home", "/index.html", |
|
] |
|
|
|
else if (course == "linux") return [ |
|
"AWK Essential Training", "/linux/awkessentialtraining/basics.html", |
|
"Compile the Kernel", "/linux/compile_the_kernel.html", |
|
"Kali Linux on Windows 10 First Look", "/linux/kaliwindows10/kaliwindows10.html", |
|
"Learning Linux Command Line", "/linux/learninglinuxcommandline/environment.html" , |
|
"Learning SSH", "/linux/learningssh/configuring.html", |
|
"Linux Overview and Installation 2016", "/linux/linuxoverview2016/linuxoverview2016.html", |
|
"Up & Running with Vi", "upandrunningwithvi/exploring.html", |
|
"Linux Courses In Progress", "/linux/linuxIP.html", |
|
"Home", "/index.html" |
|
] |
|
|
|
else if (course == "linuxIP") return [ |
|
"Advanced Linux: The Linux Kernel", "linuxkernel/surveying.html", |
|
"Learning Ansible", "/linux/learningansible/learningansible.html", |
|
"Learning Bash Scripting", "learningbashscripting/introduction.html", |
|
"Linux Performance Tuning", "linuxperformancetuning/overview.html", |
|
"Linux Storage Systems", "linuxstoragesystems/partitions.html", |
|
"Linux", "/linux/linux.html", |
|
"Home", "/index.html" |
|
] |
|
|
|
else if (course == "programming") return [ |
|
"Perl5 Essential Training", "perl5essentialtraining/perl5essentialtraining.html", |
|
"Programming Foundations: Version Control with Git", |
|
"versioncontrolwithgit/introduction.html", |
|
"Ruby Notes", "ruby/ruby.html", |
|
"Programming Links", "programminglinks/programminglinks.html", |
|
"Programming Courses In Progress", "/programming/programmingIP.html", |
|
"Home", "/index.html" |
|
] |
|
|
|
else if (course == "programmingIP") return [ |
|
"Build a Modern Computer from First Principles", "buildacomputer/buildacomputer.html", |
|
"Docker For Windows", "dockerforwindows/introduction.html", |
|
"Learning C++", "learningc++/gettingstarted.html", |
|
"Learning Docker", "learningdocker/installing.html", |
|
"Programming Fundamentals", "programming_fundamentals/fundamentals.html", |
|
"Search Techniques for Web Developers", "seachtechniques/searchtechniques.html", |
|
"Programming", "/programming/programming.html", |
|
"Home", "/index.html" |
|
] |
|
|
|
else if (course == "webdev") return [ |
|
"Preply JavaScript", "preply_javascript/preply_javascript.html", |
|
"HTML Essential Training", "htmlessentialtraining/formattingtext.html", |
|
"Introduction to CSS", "introductiontocss/introductiontocss.html", |
|
"Introduction to CSS 2022", "introductiontocss2022/introductiontocss2022.html", |
|
"CSS Essential Training", "cssessentialtraining/introduction.html", |
|
"CSS Layouts: From Float to Flexbox and Grid", "csslayouts/float.html", |
|
"CSS Advanced Layouts - Grid", "/webdevelopment/cssadvancedlayouts/core.html", |
|
"Learning ReactJS", "learningreactjs/gettingstarted.html", |
|
"React: Creating and Hosting a Full-Stack Site", "reactfullstacksite/frontend.html", |
|
"Getting Started in Full Stack Development", "gsfullstack/mark.html", |
|
"Learning REST APIs", "learningrestapis/restapis.html", |
|
"Introducing Postman", "introducingpostman/introduction.html", |
|
"Apache Web Server Admin", "apachewebserveradmin/introduction.html", |
|
"Linux Web Services", "linuxwebservices/servewebcontent.html", |
|
"Web Development Courses in Progress", "webdevelopmentIP.html", |
|
"Web Development Links", "webdevelopmentlinks/webdevelopmentlinks.html", |
|
"JavaScript Functions", "javascriptfunctions/javascriptfunctions.html", |
|
"Home", "/index.html", |
|
] |
|
|
|
else if (course == "webdevIP") return [ |
|
"Building Modern Projects with React", "buildingmodernprojectswithreact/scratch.html", |
|
"Designing RESTful APIs", "designingrestfulapis/needs.html", |
|
"HTTP Essential Training", "httpessentialtraining/http.html", |
|
"Introduction to Web APIs", "introductiontowebapis/whatisanapi.html", |
|
"JavaScript Essential Training 2017", "javascriptessentialtraining2021/javascriptessentialtraining2017.html", |
|
"JavaScript Essential Training 2021", "javascriptessentialtraining2021/javascriptessentialtraining2021.html", |
|
"jQuery Essential Training", "jqueryessentialtraining/introduction.html", |
|
"JSON Essential Training", "jsonessentialtraining/introduction.html", |
|
"Learning ECMAScript 6+", "learningecmascript6/ecmascript.html", |
|
"Learning the JavaScript Language", "learningthejavascriptlanguage/gettingstarted.html", |
|
"Python Essential Training", "pythonessentialtraining/introduction.html", |
|
"React: Creating and Hosting a Full-Stack Site", "reactfullstacksite/frontend.html", |
|
"Successding in Web Development", "succeedinginwebdevelopment/developer.html", |
|
"Web Development", "webdevelopment.html", |
|
"Home", "/index.html", |
|
] |
|
} |
|
|
|
|
|
/* |
|
* |
|
* helper functions |
|
* |
|
*/ |
|
|
|
export { menu } |