Skip to content

Commit

Permalink
added banner and profile photo
Browse files Browse the repository at this point in the history
  • Loading branch information
Nacnus committed Jan 8, 2024
1 parent fb95dcc commit 60a3392
Showing 1 changed file with 92 additions and 4 deletions.
96 changes: 92 additions & 4 deletions pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,101 @@
<template>
<v-container>
<div>
asdsad
</div>
<button @click="logout">
Çıkış Yap
</button>
<v-row>
<v-col>
<v-card
min-height="270"
max-width="225"
class="d-flex mt-4 ml-4 justify-start elevation-0"
>
<v-avatar class="profile-image">
<v-img
:src="usersData.profile_photo"
/>
</v-avatar>
<v-img
:src="usersData.banner_photo"
class="background-image"
/>
</v-card>
</v-col>

<v-col>
<v-card
class="mb-2 mt-4 d-flex justify-start elevation-0"
width="555"
>
Post Kısmı
</v-card>
<v-card
class="fill-height elevation-0"
>
içerik kısmı
</v-card>
</v-col>

<v-col>
<v-card
min-height="268"
class="d-flex mt-4 mr-4 justify-start elevation-0"
width="300"
>
Footer kısmı
</v-card>
</v-col>
</v-row>
</v-container>
</template>

<script>
export default {
import authControl from '@/middleware/authControl'
export default {
middleware: authControl,
data () {
return {
usersData: {}
}
},
mounted () {
this.getUserData()
},
methods: {
getUserData () {
this.$auth.fetchUser()
.then((response) => {
this.usersData = response.data
})
},
logout () {
this.$auth.logout()
.then(() => {
this.$router.push('/auth/login')
})
}
}
}
</script>

<style scoped>
.background-image {
position: relative;
width: 100%;
overflow: hidden;
height: 56px;
display: block;
}
.profile-image{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 200px; /* veya istediğiniz genişlik */
height: auto;
display: block;
border-radius: 50%;
z-index: 1;
}
</style>

0 comments on commit 60a3392

Please sign in to comment.