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.
158 lines
4.6 KiB
158 lines
4.6 KiB
/** |
|
**- |
|
* JavaScript providing functions for |
|
* creating the button groups seen at |
|
* the bottom of most pages |
|
* |
|
* This function generates buttons for |
|
* the web development courses |
|
* |
|
* Author - Philip Osztromok |
|
* |
|
* 24 March 2024 |
|
*+ |
|
*/ |
|
|
|
import { addButtonGroup, addSmallButtonGroup } from '/scripts/visuals.js'; |
|
|
|
|
|
|
|
function menu(course) { |
|
const menu = getChapters(course); |
|
console.log(menu); |
|
const buttons = addButtonGroup(menu); |
|
|
|
return buttons; |
|
} |
|
|
|
function getChapters(course) { |
|
if (course == "jQuery") return [ |
|
"Chapter 1", "./introduction.html", |
|
"Chapter 2", "./quick.html", |
|
"Chapter 3", "./working.html", |
|
"Chapter 4", "./manipulating.html", |
|
"Chapter 5", "./events.html", |
|
"Chapter 6", "./animations.html", |
|
"Chapter 7", "./ajax.html", |
|
"Conclusion", "./conclusion.html", |
|
"Web Development", "/webdevelopment/webdevelopment.html", |
|
"Home", "/index.html" |
|
] |
|
|
|
else if (course == "csslayouts") return [ |
|
"Float, Display and Position", "./float.html", |
|
"Flexbox", "./flexbox.html", |
|
"Grid", "./grid.html", |
|
"Conclusion", "./conclusion.html", |
|
"Web Development", "/webdevelopment/webdevelopment.html", |
|
"Home", "/index.html" |
|
] |
|
|
|
else if (course == "reactfs") return [ |
|
"Creating A React Front End", "./frontend.html", |
|
"Creating a Node.js Back End", "./backend.html", |
|
"Adding MongoDB to Node.js", "./mongodb.html", |
|
"Connecting the Front End and Back End", "./connecting.html", |
|
"Adding User Authentication with Firebase Auth", "./firebase.html", |
|
"Hosting a Full-Stack React Application", "./hosting.html", |
|
"Conclusion", "./conclusion.html", |
|
"Web Development", "/webdevelopment/webdevelopment.html", |
|
"Home", "/index.html" |
|
] |
|
|
|
else if (course == "apis") return [ |
|
"What is an API?", "./whatisanapi.html", |
|
"Connecting to an API", "./connecting.html", |
|
"Working with an API", "./working.html", |
|
"Working with the Giphy API", "./giphy.html", |
|
"Error Handling and Security", "./error.html", |
|
"What About GraphQL?", "./graphql.html", |
|
"Conclusion", "./conclusion.html", |
|
"Web Development", "/webdevelopment/webdevelopment.html", |
|
"Home", "/index.html" |
|
] |
|
|
|
else if (course == "restapis") return [ |
|
"Chapter 1", "./restapis.html", |
|
"Chapter 2", "./request.html", |
|
"Chapter 3", "./response.html", |
|
"Chapter 4", "./pairs.html", |
|
"Conclusion", "./conclusion.html", |
|
"Web Development", "/webdevelopment/webdevelopment.html", |
|
"Home", "/index.html" |
|
] |
|
|
|
else if (course == "jsonet") return [ |
|
"Introduction", "./introduction.html", |
|
"Understanding JSON", "./understanding.html", |
|
"Processing JSON Data", "./processing.html", |
|
"Using JSON Data", "./using.html", |
|
"Applying Techniques for Working with JSON", "./applying.html", |
|
"Working with JSON Schema", "./working.html", |
|
"Structuring JSON Data with JSON-LD", "./structuring.html", |
|
"Conclusion", "./conclusion.html", |
|
"Web Development", "/webdevelopment/webdevelopment.html", |
|
"Home", "/index.html" |
|
] |
|
|
|
else if (course == "postman") return[ |
|
"Introduction", "./introduction.html", |
|
"Compose Requests", "./compose.html", |
|
"Manage Requests", "./manage.html", |
|
"Environments and Variables", "./environments.html", |
|
"Conclusion", "./conclusion.html", |
|
"Web Development", "/webdevelopment/webdevelopment.html", |
|
"Home", "/index.html" |
|
] |
|
|
|
else if ( course == "ecmascript") return [ |
|
"Chapter 1", "./introduction.html", |
|
"Chapter 2", "./variables.html", |
|
"Chapter 3", "./arrays.html", |
|
"Chapter 4", "./objects.html", |
|
"Chapter 5", "./functions.html", |
|
"Chapter 6", "./asynchronous.html", |
|
"Chapter 8", "./project2.html", |
|
"Chapter 9", "./build.html", |
|
"Chapter 10", "./skills.html", |
|
"Conclusion", "./conclusion.html", |
|
"Web Development", "/webdevelopment/webdevelopment.html", |
|
"Home", "/index.html" |
|
] |
|
|
|
else if ( course == "fullstack") return [ |
|
"Chapter 1", "./introduction.html", |
|
"Chapter 2", "./variables.html", |
|
"Chapter 3", "./arrays.html", |
|
"Chapter 4", "./objects.html", |
|
"Chapter 5", "./functions.html", |
|
"Chapter 6", "./asynchronous.html", |
|
"Chapter 8", "./project2.html", |
|
"Chapter 9", "./build.html", |
|
"Chapter 10", "./skills.html", |
|
"Conclusion", "./conclusion.html", |
|
"Web Development", "/webdevelopment/webdevelopment.html", |
|
"Home", "/index.html" |
|
] |
|
|
|
else if (course == "nomenu") return [ |
|
"Android Development", "/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.html", |
|
"In Progress", "/temp/temp.html", |
|
"Home", "/index.html" |
|
] |
|
|
|
} |
|
|
|
export { menu } |
|
|
|
/* |
|
* |
|
* helper functions |
|
* |
|
*/ |