Skip to content

added bootstrap, vue resource, deleted HelloWorld, and added our logo… #2

Merged
merged 1 commit into from Apr 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
362 changes: 325 additions & 37 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions package.json
Expand Up @@ -7,10 +7,15 @@
"build": "vue-cli-service build"
},
"dependencies": {
"bootstrap": "^4.4.1",
"bootstrap-vue": "^2.13.0",
"core-js": "^3.6.4",
"firebase": "^7.13.1",
"firebaseui": "^4.5.0",
"jquery": "^3.5.0",
"popper.js": "^1.16.1",
"vue": "^2.6.11",
"vue-resource": "^1.5.1",
"vue-router": "^3.0.3",
"vuex": "^3.0.1"
},
Expand Down
1 change: 1 addition & 0 deletions public/index.html
Expand Up @@ -5,6 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Vollkorn:400,400i,700,900&display=swap" rel="stylesheet">
<title>web-three-twitter-boilerplate</title>
</head>
<body>
Expand Down
9 changes: 8 additions & 1 deletion src/App.vue
Expand Up @@ -11,6 +11,12 @@
</template>

<script>
import Vue from 'vue'
import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'
Vue.use(BootstrapVue)
Vue.use(IconsPlugin)
import addBark from './components/addBark.vue';
export default {
name: 'app',
Expand All @@ -26,6 +32,7 @@ export default {
</script>

<style lang="scss">
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
Expand All @@ -39,7 +46,7 @@ export default {
font-weight: bold;
color: #2c3e50;
&.router-link-exact-active {
color: #42b983;
color: #0d5c9c;
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions src/assets/app.scss
@@ -0,0 +1,7 @@
@import 'node_modules/bootstrap/scss/bootstrap';
@import 'node_modules/bootstrap-vue/src/index.scss';


.motherfont {
font-family: 'Vollkorn', serif;
}
Binary file added src/assets/dog.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/dogbark.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 0 additions & 57 deletions src/components/HelloWorld.vue

This file was deleted.

65 changes: 65 additions & 0 deletions src/components/addBark.vue
@@ -0,0 +1,65 @@
<template>
<div class="motherfont" id="add-bark">
<h2>Compose a Bark</h2>
<form v-if="!submitted">
<input type="text" placeholder="Write your Bark here..." v-model.lazy="bark.content" required />
<button @click.prevent="post" once>Add Bark</button>
</form>
<div v-if="submitted">
<h3>Thanks for adding your post</h3>
</div>
</div>
</template>

<script>
// Imports
export default {
data () {
return {
bark: {
content: '',
},
submitted: false
}
},
methods: {
post(){
db.collection('barks').add({
user: this.$store.state.user, // object with: { uid, displayName, photoURL, email, phoneNumber }
content:this.bark.content,
createdAt: new Date()
})
this.content=null;
// Update the list
this.display();
}
}
}
// post: function(){
// this.$http.post('https://dmd4470-50f92.firebaseio.com/tweets.json',this.bark).then(function(data){
// console.log(data);
// this.submitted = true;
// });
// }
// }
</script>

<style scoped>
#add-blog *{
box-sizing: border-box;
}
#add-blog{
margin: 20px auto;
max-width: 500px;
}
label{
display: block;
margin: 20px 0 10px;
}
input[type="text"], textarea{
display: block;
width: 100%;
padding: 8px;
}
18 changes: 12 additions & 6 deletions src/main.js
@@ -1,10 +1,16 @@
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';

import firebase from '@/plugins/firebase-init'
import ui from '@/plugins/firebaseui-init'
import VueResource from'vue-resource'
Vue.use(VueResource);

import firebase from '@/plugins/firebase-init';
import ui from '@/plugins/firebaseui-init';

import 'bootstrap';
import './assets/app.scss';

Vue.config.productionTip = false;

Expand Down
5 changes: 4 additions & 1 deletion src/views/About.vue
@@ -1,5 +1,8 @@
<template>
<div class="about">
<h1>This is an about page</h1>
<h1 class="motherfont">Welcome to the Dog Park, Where anyone can Bark!</h1>
<b-button variant="outline-primary">Boot</b-button>


</div>
</template>
10 changes: 5 additions & 5 deletions src/views/Home.vue
@@ -1,18 +1,18 @@
<template>
<div class="home">
<img alt="Vue logo" src="../assets/logo.png">
<HelloWorld msg="Welcome to Your Vue.js App"/>
<img alt="Bark Logo" src="../assets/dog.png" width="200px">
<add-bark> </add-bark>
</div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'
import addBark from '@/components/addBark.vue';
export default {
name: 'home',
components: {
HelloWorld
'add-bark':addBark
},
mounted() {
// console.log(db);
Expand Down