Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@RoySegall
Created May 24, 2019 07:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RoySegall/c08025a9d77a1404c65ebec858e56a06 to your computer and use it in GitHub Desktop.
Save RoySegall/c08025a9d77a1404c65ebec858e56a06 to your computer and use it in GitHub Desktop.
<template>
<div id="wrapper">
<main>
<b>Welcome!</b>
<ul>
<li v-for="file in files">{{file}}</li>
</ul>
</main>
</div>
</template>
<script>
import fs from 'fs'
export default {
name: 'landing-page',
data () {
return {
'files': []
}
},
created () {
fs.readFile('/tmp/open-with', 'utf8', (err, data) => {
if (err) {
throw err
}
const files = JSON.parse(data)
if (files.length === 0) {
return
}
this.files = files
})
},
methods: {}
}
</script>
<style lang="scss">
#wrapper {
text-align: center;
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment