Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
traderd65 committed Dec 18, 2019
2 parents c5712f7 + 3465a83 commit a85f77b
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ typings/

# dotenv environment variables file
.env
.env.*

# parcel-bundler cache (https://parceljs.org/)
.cache
Expand Down
3 changes: 3 additions & 0 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export default {
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
],
script: [
{ src: 'https://widget.cloudinary.com/v2.0/global/all.js' }
]
},

Expand Down
45 changes: 24 additions & 21 deletions pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
<template>
<section class="container">
<div>
<logo />
<h1 class="title">
thbc-cloudybadge
<h1>
Welcome to CloudyBadge
</h1>
<h2 class="subtitle">
CloudyBadge
</h2>
<div class="links">
<a
href="https://nuxtjs.org/"
target="_blank"
class="button--green"
>Documentation</a>
<a
href="https://github.com/nuxt/nuxt.js"
target="_blank"
class="button--grey"
>GitHub</a>
</div>
<form @submit="register" class="flex flex-col text-left mt-5">
<label for="name">Name</label>
<input name="name" v-model="name" type="text" required class="p-3 border-b mt-2"/>
<label for="company" class=" mt-3">Company</label>
<input name="company" v-model="company" type="text" required class="p-3 border-b mt-2"/>
<label for="title" class=" mt-3">Title</label>
<input name="title" v-model="title" type="text" required class="p-3 border-b mt-2"/>
<label for="email" class=" mt-3">Email</label>
<input name="email" v-model="email" type="text" required class="p-3 border-b mt-2"/>
<button type="submit" class="button--green m-4">Register me!</button>
</form>
</div>
</section>
</template>

<script>
import Logo from '~/components/Logo.vue'
export default {
components: {
Logo
data() {
return {
name: '',
company: '',
email: ''
}
},
methods: {
register() {
console.log('register');
}
}
}
</script>
Expand Down
23 changes: 23 additions & 0 deletions pages/upload/_id.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<template>
<div>
<button id="upload_widget" class="cloudinary-button">Upload files</button>
</div>
</template>
<script>
export default {
mounted() {
var myWidget = cloudinary.createUploadWidget({
cloudName: 'cdemo',
}, (error, result) => {
if (!error && result && result.event === "success") {
console.log('Done! Here is the image info: ', result.info);
}
}
)
document.getElementById("upload_widget").addEventListener("click", function(){
myWidget.open();
}, false);
}
}
</script>
Empty file added pages/vote/_id.vue
Empty file.

0 comments on commit a85f77b

Please sign in to comment.