2016-11-08 01:57:55 +00:00
|
|
|
<template>
|
2016-11-08 02:48:18 +00:00
|
|
|
<div class="container">
|
2018-08-31 20:34:12 +00:00
|
|
|
<img :src="thumbnailUrl">
|
2018-11-24 18:49:19 +00:00
|
|
|
<p>
|
|
|
|
<NuxtLink to="/">
|
|
|
|
Home
|
|
|
|
</NuxtLink> - About
|
|
|
|
</p>
|
2016-11-08 01:57:55 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import axios from 'axios'
|
|
|
|
|
|
|
|
export default {
|
2019-07-10 10:45:49 +00:00
|
|
|
asyncData () {
|
2017-07-08 18:26:11 +00:00
|
|
|
const nb = Math.max(1, Math.round(Math.random() * 10))
|
|
|
|
return axios.get(`https://jsonplaceholder.typicode.com/photos/${nb}`).then(res => res.data)
|
2016-11-08 01:57:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
2016-11-08 02:48:18 +00:00
|
|
|
|
|
|
|
<style>
|
|
|
|
.container {
|
|
|
|
text-align: center;
|
|
|
|
padding-top: 100px;
|
|
|
|
font-family: sans-serif;
|
|
|
|
}
|
|
|
|
</style>
|