/** **- * 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 == "fullstack") return[ "Chapter 1", "./mark.html", "Chapter 3", "./show.html", "Chapter 4", "./programming.html", "Chapter 5", "./project.html", "Chapter 6", "./safely.html", "Chapter 7", "./connect.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 == "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 == "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 * */