Skip to content

Commit

Permalink
abi: fixed the loading prob, and aded the workout object
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyHubert committed Jul 25, 2024
1 parent 440f7db commit 2a82b43
Show file tree
Hide file tree
Showing 3 changed files with 128 additions and 6 deletions.
7 changes: 6 additions & 1 deletion abi/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<html>
<head>
<style>
.hide {
display: none !important;
}
</style>
<script>

const myScript = document.createElement('script')
Expand All @@ -15,7 +20,7 @@
</head>
<body>

<div id="screen-buttons" class="screen">
<div id="screen-buttons" class="screen hide">

<button class="main-button" id="do-legs">Do Legs Workout</button>
<button class="main-button" id="do-arms">Do Arms Workout</button>
Expand Down
4 changes: 0 additions & 4 deletions abi/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ body {
justify-content: center;
}

.hide {
display: none;
}

button {
padding: 30px;
margin: 5px;
Expand Down
123 changes: 122 additions & 1 deletion abi/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,109 @@
setTimeout(
() => {
document.querySelector('#screen-buttons').classList.remove('hide')
},
300
)
const WORKOUT_OPTIONS = {
legs: [
{
name: "squat",
workout: [
`
move 1
`
`
move 2
`
`
move 3
`
]

},
{
name: "lunge",
workout: [
`
move 1
`
`
move 2
`
`
move 3
`
]

},
{
name: "walking squat",
workout: [
`
move 1
`
`
move 2
`
`
move 3
`
]

},
]
arms: [
{
name: "pushup",
workout: [
`
move 1
`
`
move 2
`
`
move 3
`
]

},
{
name: "turning plank",
workout: [
`
move 1
`
`
move 2
`
`
move 3
`
]

},
{
name: "cobra pushups",
workout: [
`
move 1
`
`
move 2
`
`
move 3
`
]

},
]




}
let startWorkoutFunction = () => {
document.querySelector('#screen-buttons').classList.add('hide')
document.querySelector('#screen-workout').classList.remove('hide')
Expand Down Expand Up @@ -38,7 +143,23 @@ document.querySelector('#back').addEventListener('click',
}
)

// document.querySelector('#stick-figure').innerHTML = ""
document.querySelector('#stick-figure').innerHTML = `
_____
| |
| |
-----
|
|
-----|-----
|
|
/ \\
/ \\
/ \\
`




// Things my program needs to do:
// if buttin is pushed start the workout chosen
Expand Down

0 comments on commit 2a82b43

Please sign in to comment.