forked from thomasbertet/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc14757
commit 611eaea
Showing
31 changed files
with
586 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.