Skip to content

Commit

Permalink
added proper logo, implemented initial/placeholder profile pic in posts
Browse files Browse the repository at this point in the history
  • Loading branch information
clr14003 committed May 7, 2020
1 parent c5ba9da commit 1b018c1
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 12 deletions.
33 changes: 28 additions & 5 deletions final/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<!--
COLORS FOR STYLING
Logo Blues
-Lightest: #1e7daf
-Middle: #1d6ba8
-Darkest: #20659b

Logo Green: #7eca41


-->

<template>
<div id="app">
<div id="nav">
Expand All @@ -7,11 +19,11 @@
<router-link to="/login" v-if="!authenticated">Log in</router-link>
<a href="#" v-if="authenticated" @click="$store.dispatch('signOut')"><img class="navImg" src="./assets/logout-placeholder.png"></a>
<div id="navSidebar">
<img id ="logo" src="./assets/logo-placeholder.png">
<img id ="logo" src="./assets/slice-o-life-logo.png">
<div id="profPreview">
<img id="profPreviewPic" src="./assets/prof-pic-placeholder.png">
<img id="profPreviewPic" v-bind:src="$store.state.user.photoURL">
<div>
<span>Profile Name</span>
<span>{{ $store.state.user.displayName }}</span>
</div>
</div>

Expand Down Expand Up @@ -52,7 +64,8 @@ export default {
}
#nav {
padding: 23px;
width: 30%;
width: 30%;
min-width: 30%;
a {
font-weight: bold;
color: #2c3e50;
Expand All @@ -71,8 +84,9 @@ export default {
display: flex;
width: 100%;
img {
width: 30%;
width: 20%;
max-width:200px;
height: auto;
}
div {
padding-left: 5%;
Expand All @@ -92,5 +106,14 @@ export default {
width: 100%;
}

#postList {
text-align: left;
}

.postPFP {
height: 100px;
width: 100px;
object-fit: cover;
}

</style>
Binary file added final/src/assets/ph-pfp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added final/src/assets/slice-o-life-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 10 additions & 6 deletions final/src/views/Home.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
<template>
<div class="home">

<ul id="postList">
<li v-for="(post, name, index) in posts" :key=index>{{ post.message }}</li>
</ul>
<div id="postList">
<div v-for="(post, name, index) in posts" :key=index>
<img v-if="post.hasOwnProperty('img')" class="postPFP" v-bind:src="post.img">
<img v-else class="postPFP" src="../assets/ph-pfp.png">
{{ post.username }}
<br>
{{ post.message }}</div>
</div>

<!-- <PlaceholderTweets msg="still works?"/> -->
<button @click="getPosts()">update</button>

</div>

Expand All @@ -24,7 +29,6 @@ export default {
}
},
components: {
// PlaceholderTweets
},
methods: {
Expand All @@ -33,7 +37,7 @@ export default {
querySnapshot.forEach( doc => {
// doc.data() is never undefined for query doc snapshots
console.log(doc.id, " => ", doc.data());
this.posts.unshift(doc.data())
this.posts.push(doc.data())
});
});
}
Expand Down
3 changes: 2 additions & 1 deletion final/src/views/Profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{{ $store.state.user }}

</div>
<img v-bind:src="$store.state.user.photoURL">
</div>

</template>
Expand All @@ -31,7 +32,7 @@ export default {
// This runs when the page loads
mounted() {
// console.log(db);
console.log(this.$store.state.user)
console.log(this.$store.state.user.photoURL)
}
};
Expand Down

0 comments on commit 1b018c1

Please sign in to comment.