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.
57 lines
1.2 KiB
57 lines
1.2 KiB
3 months ago
|
/**
|
||
|
**-
|
||
|
* JavaScript providing functions for
|
||
|
* creating the button groups seen at
|
||
|
* the bottom of most pages
|
||
|
*
|
||
|
* This function generates buttons for
|
||
|
* my Japanese Pages
|
||
|
*
|
||
|
* 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 == "japanese_language") return [
|
||
|
"Hiragana", "/japan/language/hiragana.html",
|
||
|
"Homework", "/japan/language/homework.html",
|
||
|
"Useful Phrases", "/japan/language/useful_phrases",
|
||
|
"Japan", "/japan/japan.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
|
||
|
*
|
||
|
*/
|