Skip to content

Commit

Permalink
SliderItems component done
Browse files Browse the repository at this point in the history
  • Loading branch information
nayarahilton committed Nov 13, 2017
1 parent b0c2e46 commit ffe71df
Show file tree
Hide file tree
Showing 7 changed files with 194 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export default {
body
margin 0
overflow-x hidden
main
overflow hidden
Expand All @@ -32,6 +33,7 @@ export default {
font-family 'Cairo', sans-serif
-webkit-font-smoothing antialiased
-moz-osx-font-smoothing grayscale
overflow hidden
a
text-decoration none
Expand Down
3 changes: 3 additions & 0 deletions src/components/MainHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
</li>
<li>
<router-link class="nav-link" to="/register" @click.native="hideMenu">Cadastro</router-link>
</li>
<li>
<router-link class="nav-link" to="/profession" @click.native="hideMenu">Profession</router-link>
</li>
</ul>
<div class="ofuscator" @click="hideMenu"></div>
Expand Down
4 changes: 3 additions & 1 deletion src/components/ProfileResume.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export default {

<style scoped lang="stylus">
$border-radius = 10px
@import '../assets/styles/_colors'
p
margin 0
Expand All @@ -35,7 +37,7 @@ export default {
border-radius 50%
overflow hidden
position relative
border 3px solid black
border 3px solid $blue
img
height 150%
Expand Down
78 changes: 78 additions & 0 deletions src/components/SliderItems.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<template>
<div class="slider">
<ul class="list">
<li class="list-item" v-for="item in items">
<div class="img-holder">
<img class="img" src="nada" />
</div>
<p class="text">{{item.text}}</p>
</li>
</ul>
</div>
</template>

<script>
export default {
data() {
return {
items: [
{ text: '@nayarahilton' },
{ text: '@prisantos' },
{ text: '@lucasilva' },
{ text: '@lilisantos' },
{ text: '@vinicuisbueno' },
{ text: '@gabriellopes' },
{ text: '@rachelaquino' },
{ text: 'Outro' },
{ text: 'Outro' },
],
};
},
};
</script>

<style lang="stylus" scoped>
@import '../assets/styles/*'
.slider
padding 20px 0
box-sizing border-box
background #eee
.list
list-style none
white-space nowrap
margin 0 auto
padding 0
display flex
overflow-x scroll
max-width 500px
.list-item
display inline-flex
flex-direction column
white-space normal
text-align center
margin-left 20px
min-width 60px
max-width 100px
overflow hidden
&:last-child
padding-right 20px
.text
margin-bottom 0
margin-top 0px
font-size 12px
.img-holder
width 50px
height 50px
border-radius 50%
border 3px solid $blue
background #fff
</style>

6 changes: 6 additions & 0 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import RegisterView from '@/views/RegisterView';
import ProfileView from '@/views/ProfileView';
import FeedbackView from '@/views/FeedbackView';
import CameraView from '@/views/CameraView';
import ProfessionView from '@/views/ProfessionView';

Vue.use(Router);

Expand Down Expand Up @@ -42,6 +43,11 @@ export default new Router({
name: 'profile',
component: ProfileView,
},
{
path: '/profession',
name: 'profession',
component: ProfessionView,
},
{
path: '/feedback',
name: 'feedback',
Expand Down
13 changes: 10 additions & 3 deletions src/views/HomeView.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<div class="home">
<div class="home">
<main-header />
<slider-items />
<div
v-for="picture in this.getCats()"
class="card"
Expand Down Expand Up @@ -31,6 +32,7 @@

<script>
import MainHeader from '../components/MainHeader';
import SliderItems from '../components/SliderItems';
import ProfileResume from '../components/ProfileResume';
import PostReactions from '../components/PostReactions';
Expand All @@ -47,6 +49,7 @@ export default {
'main-header': MainHeader,
'profile-resume': ProfileResume,
'post-reactions': PostReactions,
'slider-items': SliderItems,
},
methods: {
displayDetails(id) {
Expand Down Expand Up @@ -83,7 +86,7 @@ export default {
@import '../assets/styles/_colors'
.home
background #f4f4f4
background #f9f9f9
.add-picture-button
position fixed
Expand Down Expand Up @@ -130,7 +133,7 @@ export default {
margin-left auto
margin-right auto
.card-picture > img
.card-picture img
width 100%
.card-info
Expand All @@ -145,4 +148,8 @@ export default {
color #222
font-size 15px
@media screen and (min-width 480px)
.card
margin-top 40px
</style>
92 changes: 92 additions & 0 deletions src/views/ProfessionView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<template>
<div class="profile">

</profile-resume>
<div class="follows">
<span class="followers">100 seguidores</span> <span class="following">53 seguindo</span>
</div>
<div class="card">
<div class="card-picture">
<img :src="'https://image.freepik.com/free-vector/triangle-cat-design_23-2147495379.jpg'" />
</div>
<div class="card-info">
<div class="Texto">
<span>Texto</span>
</div>
<div class="card-info">
<post-reactions></post-reactions>
</div>
</div>
</div>
</div>
</template>

<script>
import ProfileResume from '../components/ProfileResume';
import PostReactions from '../components/PostReactions';
export default {
data() {
return {
cat: null,
};
},
components: {
'profile-resume': ProfileResume,
'post-reactions': PostReactions,
},
};
</script>

<style lang="stylus" scoped>
@import '../assets/styles/_colors'
.profile
background #fff
padding 20px
.add-picture-button
position fixed
right 24px
bottom 24px
z-index 998
color $primary-color
height 50px
width 50px
border-radius 20px 20px 20px 0
background #fff
display flex
align-items center
justify-content center
box-shadow -3px 0px 4px 1px rgba(0,0,0,0.3)
span
font-size 40px
line-height 40px
height 45px
.card
padding-bottom 10px
border-bottom 1px solid #eee
margin-bottom 40px
background #fff
max-width 500px
margin-left auto
margin-right auto
.card-picture > img
width 100%
.card-info
padding 5px 15px
display flex
justify-content space-between
.card-comment
padding 0 20px
> span
color #222
font-size 15px
</style>

0 comments on commit ffe71df

Please sign in to comment.