added store state for json
parent
7ce0795a7b
commit
6cfe95c5ee
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 273 KiB |
|
|
@ -1 +1 @@
|
|||
<!doctype html><html lang="en"><head><meta charset="UTF-8"><link rel="icon" href="./favicon.ico"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Gym Tracker</title><script type="module" crossorigin src="./assets/index-9e856be7.js"></script></head><body><div id="app"></div></body></html>
|
||||
<!doctype html><html lang="en"><head><meta charset="UTF-8"><link rel="icon" href="./logo.ico"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Gym Tracker</title><script type="module" crossorigin src="./assets/index-fc3f27a6.js"></script></head><body><div id="app"></div></body></html>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 162 KiB |
|
|
@ -16,6 +16,7 @@
|
|||
"vue-router": "^4.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-json": "^6.0.0",
|
||||
"@rushstack/eslint-patch": "^1.2.0",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"@vue/eslint-config-prettier": "^7.1.0",
|
||||
|
|
@ -24,7 +25,7 @@
|
|||
"eslint-plugin-vue": "^9.9.0",
|
||||
"jsdom": "^21.1.0",
|
||||
"prettier": "^2.8.4",
|
||||
"sass": "^1.62.0",
|
||||
"sass": "^1.62.1",
|
||||
"vite": "^4.1.4",
|
||||
"vitest": "^0.29.1"
|
||||
}
|
||||
|
|
@ -548,6 +549,48 @@
|
|||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/plugin-json": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-6.0.0.tgz",
|
||||
"integrity": "sha512-i/4C5Jrdr1XUarRhVu27EEwjt4GObltD7c+MkCIpO2QIbojw8MUs+CCTqOphQi3Qtg1FLmYt+l+6YeoIf51J7w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@rollup/pluginutils": "^5.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"rollup": "^1.20.0||^2.0.0||^3.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"rollup": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/plugin-json/node_modules/@rollup/pluginutils": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz",
|
||||
"integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/estree": "^1.0.0",
|
||||
"estree-walker": "^2.0.2",
|
||||
"picomatch": "^2.3.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"rollup": "^1.20.0||^2.0.0||^3.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"rollup": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/pluginutils": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz",
|
||||
|
|
@ -590,6 +633,12 @@
|
|||
"@types/chai": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/estree": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz",
|
||||
"integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "18.15.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz",
|
||||
|
|
@ -3300,9 +3349,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/sass": {
|
||||
"version": "1.62.0",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.62.0.tgz",
|
||||
"integrity": "sha512-Q4USplo4pLYgCi+XlipZCWUQz5pkg/ruSSgJ0WRDSb/+3z9tXUOkQ7QPYn4XrhZKYAK4HlpaQecRwKLJX6+DBg==",
|
||||
"version": "1.62.1",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.62.1.tgz",
|
||||
"integrity": "sha512-NHpxIzN29MXvWiuswfc1W3I0N8SXBd8UR26WntmDlRYf0bSADnwnOjsyMZ3lMezSlArD33Vs3YFhp7dWvL770A==",
|
||||
"devOptional": true,
|
||||
"dependencies": {
|
||||
"chokidar": ">=3.0.0 <4.0.0",
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
"vue-router": "^4.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-json": "^6.0.0",
|
||||
"@rushstack/eslint-patch": "^1.2.0",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"@vue/eslint-config-prettier": "^7.1.0",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"muscle": [
|
||||
"muscle" [
|
||||
{
|
||||
"name": "Legs",
|
||||
"exercises":
|
||||
|
|
@ -761,4 +760,4 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
export default muscleExercise;
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
<router-link to="/Muscles/Chest" class="nav-item nav-link">Chest</router-link>
|
||||
<router-link to="/Muscles/Shoulder" class="nav-item nav-link">Shoulder</router-link>
|
||||
<router-link to="/Muscles/Triceps" class="nav-item nav-link">Triceps</router-link>
|
||||
<router-link to="/Muscles/Bicepts" class="nav-item nav-link">Bicepts</router-link>
|
||||
<router-link to="/Muscles/Biceps" class="nav-item nav-link">Biceps</router-link>
|
||||
</div>
|
||||
</nav>
|
||||
</template>
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
width: 20%;
|
||||
}
|
||||
.logo img {
|
||||
width: 30%;
|
||||
width: 20%;
|
||||
height: 100%;
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
import {defineStore} from 'pinia'
|
||||
import muscleExercise from '../assets/muscleExercise';
|
||||
import { ref } from 'vue'
|
||||
|
||||
export const usePostStore = defineStore('post', () => {
|
||||
const postList = ref([])
|
||||
const currentPost = ref(null)
|
||||
const error = ref(null)
|
||||
|
||||
async function fetchMuscleExercise() {
|
||||
postList.value = muscleExercise
|
||||
error.value = []
|
||||
}
|
||||
|
||||
return {
|
||||
postList,
|
||||
currentPost,
|
||||
error,
|
||||
fetchMuscleExercise
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
export default usePostStore
|
||||
|
|
@ -1,24 +1,26 @@
|
|||
<template>
|
||||
<div class="legs">
|
||||
<h1>Legs</h1>
|
||||
<h2>Search</h2>
|
||||
<div v-for="post in post.postList">
|
||||
<h2>{{post.exercise}}</h2>
|
||||
<p>{{post.body}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { usePostStore } from '@/stores/post.js'
|
||||
import { onMounted } from 'vue';
|
||||
|
||||
</script>
|
||||
const post = usePostStore()
|
||||
|
||||
<style>
|
||||
/* @media (min-width: 1024px) {
|
||||
.about {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: right;
|
||||
onMounted(() => {
|
||||
post.fetchMuscleExercise()
|
||||
}
|
||||
} */
|
||||
.legs {
|
||||
)
|
||||
|
||||
}
|
||||
</style>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue