profile-site/main.js

88 lines
2 KiB
JavaScript
Raw Normal View History

let pageLocation = "meet";
2021-01-14 17:46:52 -05:00
let backButton = document.getElementById("back");
let nextButton = document.getElementById("next");
2021-01-14 14:40:08 -05:00
2021-01-14 17:46:52 -05:00
function next() {
if (pageLocation === "meet") {
2021-01-14 17:46:52 -05:00
document.location = "#vegetable-dash";
pageLocation = "vegetable-dash";
2021-01-14 17:46:52 -05:00
}
else if (pageLocation === "vegetable-dash") {
2021-01-14 18:08:14 -05:00
document.location = "#coming-soon";
pageLocation = "coming-soon";
2021-01-14 18:08:14 -05:00
}
buttonVisiblility();
2021-01-14 17:46:52 -05:00
}
function last() {
if (pageLocation === "vegetable-dash") {
2021-01-14 17:46:52 -05:00
document.location = "#meet";
pageLocation = "meet";
2021-01-14 17:46:52 -05:00
}
else if (pageLocation === "coming-soon") {
2021-01-14 18:08:14 -05:00
document.location = "#vegetable-dash";
pageLocation = "vegetable-dash";
}
buttonVisiblility();
}
function buttonVisiblility() {
if (pageLocation != "meet") {
backButton.style.opacity = "1";
}
else {
backButton.style.opacity = "0";
}
if (pageLocation != "coming-soon") {
nextButton.style.opacity = "1";
}
else {
nextButton.style.opacity = "0";
2021-01-14 18:08:14 -05:00
}
2021-01-15 14:09:56 -05:00
where();
2021-01-14 14:40:08 -05:00
}
2021-01-15 14:09:56 -05:00
function where() {
let meetIndicator = document.getElementById("meetIndicator");
let vegIndicator = document.getElementById("vegetable-dashIndicator");
let comingIndicator = document.getElementById("coming-soonIndicator");
if (pageLocation === "meet") {
meetIndicator.style.backgroundColor = "#262626";
}
else {
meetIndicator.style.backgroundColor = "#d6d6d6";
}
if (pageLocation === "vegetable-dash") {
vegIndicator.style.backgroundColor = "#262626";
}
else {
vegIndicator.style.backgroundColor = "#d6d6d6";
}
if (pageLocation === "coming-soon") {
comingIndicator.style.backgroundColor = "#262626";
}
else {
comingIndicator.style.backgroundColor = "#d6d6d6";
}
}
2021-01-15 14:52:34 -05:00
function ind(page) {
document.location = "#" + page;
pageLocation = page;
buttonVisiblility();
}
2021-01-15 14:09:56 -05:00
// Transparent text moving background
/* Links */
/* Should have nice hover that shows some content from link */