diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-03-02 15:05:19 +1100 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-03-02 16:18:14 +1100 |
| commit | 7a12c7ffa50d67f550592bf096e6ab4a42732983 (patch) | |
| tree | 6e417687d00b11059e39f1423f8183c332ca93ef /src/App.vue | |
| parent | af1555e223ebb1b1813b9b85f4cf8dddc432189e (diff) | |
Add test data and images
Diffstat (limited to 'src/App.vue')
| -rw-r--r-- | src/App.vue | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/App.vue b/src/App.vue index a8c04d7..0456388 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,20 +1,35 @@ <script> +import tol from './tol.json'; export default { data() { return { - greeting: 'Hello World!' + tol: tol, + tiles: tol.map(e => ({name: e.name})) } } } </script> <template> - <p class="greeting">{{ greeting }}</p> + <div id="grid"> + <img v-for="tile in tiles" :src="'/src/assets/' + tile.name + '.jpg'" :alt="tile.name" :id="tile.name" + @click="$event.target.style.transform = 'translate(20%,30%)'"/> + </div> </template> <style> -.greeting { - color: green; - font-weight: bold; +#app { + background-color: black; +} +#grid { + display: flex; + flex-flow: row wrap; + justify-content: center; +} +img { + margin: 5px; + flex: auto; + transition: transform 1s; + max-width: 100%; } </style> |
