Skip to content

Commit

Permalink
massive docs update!
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider committed Aug 12, 2017
1 parent bc14757 commit 611eaea
Show file tree
Hide file tree
Showing 31 changed files with 586 additions and 274 deletions.
7 changes: 7 additions & 0 deletions components/ComponentParameters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
default: this.makeSlot(),
theme: this.makeTheme(),
input: this.makeInput(),
label: this.makeLabel(),
overlay: this.makeOverlay(),
detachable: this.makeDetach(),
positionable: this.makePosition(),
Expand Down Expand Up @@ -137,6 +138,12 @@
return [ c, 'Boolean', 'False', `Applies the ${c} contextual color` ]
})
},
makeLabel () {
return [[
'label',
'Label slot'
]]
},
makeTheme () {
return [
[
Expand Down
11 changes: 8 additions & 3 deletions components/ComponentView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
v-card-actions
v-btn(
tag="a"
v-bind:href="'https://github.com/vuetifyjs/vuetify/tree/master/src/components/'+doc.component"
v-bind:href="'https://github.com/vuetifyjs/vuetify/tree/master/src/'+componentLink"
target="_blank"
icon
light
v-tooltip:right="{ html: 'View component' }"
v-if="doc.component"
v-tooltip:right="{ html: `View ${doc.directive ? 'Directive' : 'Component'}` }"
v-if="componentLink"
v-bind:class="[`${currentColor}--text`]"
)
v-icon widgets
Expand Down Expand Up @@ -112,6 +112,11 @@
},
computed: {
componentLink () {
if (this.doc.component) return `components/${this.doc.component}`
if (this.doc.directive) return `directives/${this.doc.directive}`
return false
},
currentColor () {
return this.$store.state.currentColor
}
Expand Down
5 changes: 3 additions & 2 deletions components/MainNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,11 @@
group: '/directives',
items: [
{ href: '/directives/badges', title: 'Badges' },
{ href: '/directives/touch-support', title: 'Touch Support' },
{ href: '/directives/resizing', title: 'Resizing' },
{ href: '/directives/ripples', title: 'Ripples' },
{ href: '/directives/tooltips', title: 'Tooltips' }
{ href: '/directives/scrolling', title: 'Scrolling' },
{ href: '/directives/tooltips', title: 'Tooltips' },
{ href: '/directives/touch-support', title: 'Touch Support' }
]
},
{ divider: true },
Expand Down
27 changes: 27 additions & 0 deletions examples/resize/1.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<template>
<v-layout v-resize="onResize" column align-center justify-center>
<v-subheader>Window Size</v-subheader>
{{ windowSize }}
</v-layout>
</template>

<script>
export default {
data: () => ({
windowSize: {
x: 0,
y: 0
}
}),
mounted () {
this.onResize()
},
methods: {
onResize () {
this.windowSize = { x: window.innerWidth, y: window.innerHeight }
}
}
}
</script>
20 changes: 20 additions & 0 deletions examples/scroll/1.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<template>
<v-layout column align-center justify-center v-scroll="onScroll">
<v-subheader>Offset Top</v-subheader>
{{ offsetTop }}
</v-layout>
</template>

<script>
export default {
data: () => ({
offsetTop: 0
}),
methods: {
onScroll (e) {
this.offsetTop = window.pageYOffset || document.documentElement.scrollTop
}
}
}
</script>
39 changes: 39 additions & 0 deletions examples/scroll/2.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<template>
<div>
<v-layout column justify-center align-center>
<v-subheader>Offset Top</v-subheader>
{{ offsetTop }}
</v-layout>
<v-container
style="max-height: 400px"
class="scroll-y"
id="scroll-target"
>
<v-layout
column
align-center
justify-center
v-scroll="{
target: '#scroll-target',
callback: this.onScroll
}"
style="height: 1000px"
>
</v-layout>
</v-container>
</div>
</template>

<script>
export default {
data: () => ({
offsetTop: 0
}),
methods: {
onScroll (e) {
this.offsetTop = e.target.scrollTop
}
}
}
</script>
156 changes: 156 additions & 0 deletions examples/tables/9.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
<template>
<v-data-table
v-bind:headers="headers"
:items="items"
class="elevation-1"
hide-actions
dark
>
<template slot="items" scope="props">
<td>{{ props.item.name }}</td>
<td class="text-xs-right">{{ props.item.calories }}</td>
<td class="text-xs-right">{{ props.item.fat }}</td>
<td class="text-xs-right">{{ props.item.carbs }}</td>
<td class="text-xs-right">{{ props.item.protein }}</td>
<td class="text-xs-right">{{ props.item.sodium }}</td>
<td class="text-xs-right">{{ props.item.calcium }}</td>
<td class="text-xs-right">{{ props.item.iron }}</td>
</template>
</v-data-table>
</template>

<script>
export default {
data () {
return {
headers: [
{
text: 'Dessert (100g serving)',
align: 'left',
sortable: false,
value: 'name'
},
{ text: 'Calories', value: 'calories' },
{ text: 'Fat (g)', value: 'fat' },
{ text: 'Carbs (g)', value: 'carbs' },
{ text: 'Protein (g)', value: 'protein' },
{ text: 'Sodium (mg)', value: 'sodium' },
{ text: 'Calcium (%)', value: 'calcium' },
{ text: 'Iron (%)', value: 'iron' }
],
items: [
{
value: false,
name: 'Frozen Yogurt',
calories: 159,
fat: 6.0,
carbs: 24,
protein: 4.0,
sodium: 87,
calcium: '14%',
iron: '1%'
},
{
value: false,
name: 'Ice cream sandwich',
calories: 237,
fat: 9.0,
carbs: 37,
protein: 4.3,
sodium: 129,
calcium: '8%',
iron: '1%'
},
{
value: false,
name: 'Eclair',
calories: 262,
fat: 16.0,
carbs: 23,
protein: 6.0,
sodium: 337,
calcium: '6%',
iron: '7%'
},
{
value: false,
name: 'Cupcake',
calories: 305,
fat: 3.7,
carbs: 67,
protein: 4.3,
sodium: 413,
calcium: '3%',
iron: '8%'
},
{
value: false,
name: 'Gingerbread',
calories: 356,
fat: 16.0,
carbs: 49,
protein: 3.9,
sodium: 327,
calcium: '7%',
iron: '16%'
},
{
value: false,
name: 'Jelly bean',
calories: 375,
fat: 0.0,
carbs: 94,
protein: 0.0,
sodium: 50,
calcium: '0%',
iron: '0%'
},
{
value: false,
name: 'Lollipop',
calories: 392,
fat: 0.2,
carbs: 98,
protein: 0,
sodium: 38,
calcium: '0%',
iron: '2%'
},
{
value: false,
name: 'Honeycomb',
calories: 408,
fat: 3.2,
carbs: 87,
protein: 6.5,
sodium: 562,
calcium: '0%',
iron: '45%'
},
{
value: false,
name: 'Donut',
calories: 452,
fat: 25.0,
carbs: 51,
protein: 4.9,
sodium: 326,
calcium: '2%',
iron: '22%'
},
{
value: false,
name: 'KitKat',
calories: 518,
fat: 26.0,
carbs: 65,
protein: 7,
sodium: 54,
calcium: '12%',
iron: '6%'
}
]
}
}
}
</script>
31 changes: 31 additions & 0 deletions examples/toolbar/14.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<template>
<v-app toolbar--fixed toolbar style="overflow: hidden">
<v-toolbar
absolute
class="white teal lighten-3"
dark
scroll-off-screen
scroll-target="#scrolling-techniques"
>
<v-toolbar-side-icon></v-toolbar-side-icon>
<v-toolbar-title>Title</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn icon>
<v-icon>search</v-icon>
</v-btn>
<v-btn icon>
<v-icon>favorite</v-icon>
</v-btn>
<v-btn icon>
<v-icon>more_vert</v-icon>
</v-btn>
</v-toolbar>
<main
style="max-height: 600px;"
class="scroll-y"
id="scrolling-techniques"
>
<v-container></v-container>
</main>
</v-app>
</template>
30 changes: 30 additions & 0 deletions examples/touch/1.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<template>
<v-layout
column
align-center
justify-center
style="height: 500px"
class="grey lighten-2"
v-touch="{
left: () => swipe('Left'),
right: () => swipe('Right')
}"
>
<v-subheader>Swipe Direction</v-subheader>
{{ swipeDirection }}
</v-layout>
</template>

<script>
export default {
data: () => ({
swipeDirection: 'None'
}),
methods: {
swipe (direction) {
this.swipeDirection = direction
}
}
}
</script>
4 changes: 2 additions & 2 deletions pages/BadgesView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
data () {
return {
doc: {
title: 'Badge',
title: 'Badge directive',
edit: 'Badges',
component: 'badges',
directive: 'badge',
desc: `
<p>
Badge directives can be applied to any element using the <code>v-badge</code> directive. By default, a badge will use the application's defined <strong class="primary--text">primary color</strong>. Parameters can be passed using the arg, <code>v-badge:arg</code>, modifier, <code>v-badge:2.modifier</code>, or by passing an object by expression, <code>v-badge="{ value: 2, overlap: true }"</code>
Expand Down
Loading

0 comments on commit 611eaea

Please sign in to comment.