Skip to content

Commit fe24205

Browse files
committed
polls
1 parent 7e8a006 commit fe24205

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

src/components/item.vue

-9
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,6 @@
2323
color $gray
2424
.subtext a:hover
2525
text-decoration underline
26-
.poll-options
27-
padding-left 30px
28-
list-style-type disc
29-
li
30-
margin 12px 0
31-
p
32-
margin 8px 0
33-
&.current
34-
background-color darken($bg, 5%)
3526
</style>
3627

3728
<template>

src/views/item-view.vue

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
<style lang="stylus">
2-
.view.items
2+
@import "src/shared.styl"
3+
.item-view
34
.item
45
padding-left 0
56
margin-bottom 30px
67
.index, .comments-link
78
display none
9+
.poll-options
10+
margin-left 30px
11+
margin-bottom 40px
12+
li
13+
margin 12px 0
14+
p
15+
margin 8px 0
16+
.subtext
17+
color $gray
18+
font-size 11px
819
</style>
920

1021
<template>
11-
<div class="view items" v-with="id:params.itemId" v-show="item">
22+
<div class="view item-view" v-with="id:params.itemId" v-show="item">
1223
<div class="item" v-component="item" v-with="item"></div>
1324
<ul class="poll-options" v-if="pollOptions">
1425
<li v-repeat="pollOptions">
@@ -56,7 +67,9 @@ module.exports = {
5667
}.bind(this))
5768
},
5869
fetchPollOptions: function () {
59-
70+
store.fetchItems(this.item.parts, function (options) {
71+
this.pollOptions = options
72+
}.bind(this))
6073
}
6174
},
6275
components: {

src/views/news-view.vue

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
<style lang="stylus">
2-
.view.news
2+
.news-view
33
padding-left 0
44
padding-right 0
5-
65
&.loading:before
76
content "Loading..."
87
position absolute
98
top 16px
109
left 20px
11-
1210
.nav
1311
padding 10px 10px 10px 40px
1412
margin-top 10px
@@ -20,7 +18,7 @@
2018
</style>
2119

2220
<template>
23-
<div class="view news" v-with="page:params.page" v-class="loading:!items.length">
21+
<div class="view news-view" v-with="page:params.page" v-class="loading:!items.length">
2422
<!-- item list -->
2523
<ul>
2624
<li class="item" v-repeat="items" v-component="item" trackby="id"></li>

src/views/user-view.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<style lang="stylus">
2-
.view.user
2+
.user-view
33
color $gray
44
li
55
margin 5px 0
@@ -13,7 +13,7 @@
1313
</style>
1414

1515
<template>
16-
<div class="view user" v-with="id:params.userId" v-show="user">
16+
<div class="view user-view" v-with="id:params.userId" v-show="user">
1717
<ul>
1818
<li><span class="label">user:</span> {{user.id}}</li>
1919
<li><span class="label">created:</span> {{user.created | fromNow}} ago</li>

0 commit comments

Comments
 (0)