2016-11-07 12:53:05 +00:00
|
|
|
<template>
|
2016-12-27 15:57:50 +00:00
|
|
|
<div class="container">
|
|
|
|
<h1>User Agent</h1>
|
2016-11-19 21:16:26 +00:00
|
|
|
<p>{{ userAgent }}</p>
|
2018-11-24 18:49:19 +00:00
|
|
|
<p>
|
|
|
|
<NuxtLink to="/posts">
|
|
|
|
Blog
|
|
|
|
</NuxtLink>
|
|
|
|
</p>
|
2016-11-07 12:53:05 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2017-07-08 16:05:44 +00:00
|
|
|
asyncData: ({ req }) => ({
|
2017-08-03 08:47:19 +00:00
|
|
|
userAgent: (req ? req.headers['user-agent'] : (typeof navigator !== 'undefined' ? navigator.userAgent : 'No user agent (generated)'))
|
2017-07-08 16:05:44 +00:00
|
|
|
})
|
2016-11-07 12:53:05 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2016-11-07 13:12:59 +00:00
|
|
|
<style scoped>
|
2016-12-27 15:57:50 +00:00
|
|
|
.container {
|
|
|
|
width: 70%;
|
|
|
|
margin: auto;
|
|
|
|
text-align: center;
|
|
|
|
padding-top: 100px;
|
|
|
|
}
|
2016-11-07 12:53:05 +00:00
|
|
|
p {
|
|
|
|
font-size: 20px;
|
2016-12-27 15:57:50 +00:00
|
|
|
}
|
|
|
|
a {
|
|
|
|
color: #41B883;
|
2016-11-07 12:53:05 +00:00
|
|
|
}
|
|
|
|
</style>
|