enhanced layout for cacheview and index

This commit is contained in:
Katharina Will 2019-03-27 12:53:45 +01:00
parent aa6d2c31fa
commit 545b3ffeff
6 changed files with 246 additions and 386 deletions

View File

@ -54,11 +54,20 @@ module.exports = function (ctx) {
'QTabPanel', 'QTabPanel',
'QInput', 'QInput',
'QFab', 'QFab',
'QFabAction' 'QFabAction',
'QCarousel',
'QCarouselControl',
'QCarouselSlide',
'QParallax',
'QAvatar',
'QDialog',
'QFooter',
'QExpansionItem'
], ],
directives: [ directives: [
'Ripple' 'Ripple',
'ClosePopup'
], ],
// Quasar plugins // Quasar plugins

View File

@ -2,26 +2,27 @@
<q-layout view="hhh Lpr lFf"> <q-layout view="hhh Lpr lFf">
<q-header elevated class="bg-white text-green-8 shadow-2"> <q-header elevated class="bg-white text-green-8 shadow-2">
<q-toolbar class=""> <q-toolbar class="">
<q-btn <div class="q-pa-md q-gutter-sm">
flat <q-avatar size="60px">
dense <img src="https://www.designtagebuch.de/wp-content/uploads/mediathek//2015/01/buga2019_designtagebuch1-700x500.png">
ripple </q-avatar>
@click="leftDrawerOpen = !leftDrawerOpen" </div>
aria-label="Menu" <q-toolbar-title>GeoCaching
>
<q-icon name="menu" />
</q-btn>
<q-toolbar-title>
BuGa Geocaching SPA
</q-toolbar-title> </q-toolbar-title>
<q-fab color="green-3" text-color="black" icon="menu" direction="down">
<q-fab-action color="green-3" text-color="black" to="/" icon="menu" />
<q-fab-action color="green-3" text-color="black" to="/CacheView" icon="list" />
<q-fab-action color="green-3" text-color="black" to="/" icon="ranking" />
<q-fab-action color="green-3" text-color="black" to="/Login" icon="perm_identity" />
<q-fab-action color="green-3" text-color="black" to="/" icon="logout" />
</q-fab>
<!--<div>Quasar v{{ $q.version }}</div>--> <!--<div>Quasar v{{ $q.version }}</div>-->
</q-toolbar> </q-toolbar>
</q-header> </q-header>
<q-drawer <q-drawer
v-model="leftDrawerOpen" side="right"
v-model="rightDrawerOpen"
bordered bordered
show-if-above show-if-above
:mini="miniState" :mini="miniState"
@ -34,70 +35,65 @@
clickable clickable
tag="a" tag="a"
target="_blank" target="_blank"
href="http://v1.quasar-framework.org" to="/CacheView"
> >
<q-item-section avatar> <q-item-section avatar>
<q-icon name="school" /> <q-icon name="school" />
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label>Docs</q-item-label> <q-item-label>Caches</q-item-label>
<q-item-label caption>v1.quasar-framework.org</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item <q-item
clickable clickable
tag="a" tag="a"
target="_blank" target="_blank"
href="https://github.com/quasarframework/" href=""
> >
<q-item-section avatar> <q-item-section avatar>
<q-icon name="code" /> <q-icon name="code" />
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label>Github</q-item-label> <q-item-label>Rangliste</q-item-label>
<q-item-label caption>github.com/quasarframework</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item <q-item
clickable clickable
tag="a" tag="a"
target="_blank" target="_blank"
href="http://chat.quasar-framework.org" href=""
> >
<q-item-section avatar> <q-item-section avatar>
<q-icon name="chat" /> <q-icon name="chat" />
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label>Discord Chat Channel</q-item-label> <q-item-label>Discord Chat Channel</q-item-label>
<q-item-label caption>chat.quasar-framework.org</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item <q-item
clickable clickable
tag="a" tag="a"
target="_blank" target="_blank"
href="https://forum.quasar-framework.org" to="/Login"
> >
<q-item-section avatar> <q-item-section avatar>
<q-icon name="record_voice_over" /> <q-icon name="record_voice_over" />
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label>Forum</q-item-label> <q-item-label>Profil</q-item-label>
<q-item-label caption>forum.quasar-framework.org</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item <q-item
clickable clickable
tag="a" tag="a"
target="_blank" target="_blank"
href="https://twitter.com/quasarframework" href=""
> >
<q-item-section avatar> <q-item-section avatar>
<q-icon name="rss_feed" /> <q-icon name="rss_feed" />
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label>Twitter</q-item-label> <q-item-label>Abmelden</q-item-label>
<q-item-label caption>@quasarframework</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
</q-list> </q-list>
@ -117,7 +113,7 @@ export default {
data() { data() {
return { return {
//leftDrawerOpen: this.$q.platform.is.desktop, //leftDrawerOpen: this.$q.platform.is.desktop,
leftDrawerOpen: true, RightDrawerOpen: true,
miniState: true miniState: true
}; };
}, },

View File

@ -1,76 +1,79 @@
<template> <template>
<div class="q-pa-md"> <q-card>
<div class="q-gutter-y-md" style="max-width: 1200px"> <q-tab-panels v-model="tab" animated>
<q-tabs <q-tab-panel name="list">
v-model="tab" <q-table
dense title="Caches"
align="justify" :data="data"
class="bg-white text-green-8 shadow-2" :columns="columns"
:breakpoint="0" row-key="name"
> selection="multiple"
<q-tab name="table" icon="mail" /> :selected.sync="selected"
<q-tab name="map" icon="map" /> :filter="filter"
</q-tabs> grid
hide-header>
<template v-slot:top-right>
<q-input borderless dense debounce="300" v-model="filter" placeholder="Search">
<template v-slot:append>
<q-icon name="search" />
</template>
</q-input>
</template>
<template> <template v-slot:item="props">
<div class="q-pa-md"> <div
<q-table class="q-pa-xs col-xs-12 col-sm-6 col-md-4 col-lg-3 grid-style-transition"
title="Caches" >
:data="data" <q-expansion-item
:columns="columns" expand-separator
row-key="name" :label="props.row.name"
selection="single" >
:selected.sync="selected" <q-card>
:filter="filter" <q-card-section>
grid <q-list dense>
hide-header <q-item v-for="col in props.cols.filter(col => col.name !== 'desc')" :key="col.name">
> <q-item-section>
<template v-slot:top-right> <q-item-label>{{ col.label }}</q-item-label>
<q-input borderless dense debounce="300" v-model="filter" placeholder="Search"> </q-item-section>
<template v-slot:append> <q-item-section side>
<q-icon name="search" /> <q-item-label caption>{{ col.value }}</q-item-label>
</template> </q-item-section>
</q-input> </q-item>
</template> </q-list>
</q-card-section>
<template v-slot:item="props"> </q-card>
<div </q-expansion-item>
class="q-pa-xs col-xs-12 col-sm-6 col-md-4 col-lg-3 grid-style-transition"
:style="props.selected ? 'transform: scale(0.95);' : ''"
>
<q-card :class="props.selected ? 'bg-grey-2' : ''">
<q-card-section>
<q-checkbox :dense="denseOn" v-model="props.selected" :label="props.row.name" />
</q-card-section>
<q-separator />
<q-list dense>
<q-item v-for="col in props.cols.filter(col => col.name !== 'desc')" :key="col.name">
<q-item-section>
<q-item-label>{{ col.label }}</q-item-label>
</q-item-section>
<q-item-section side>
<q-item-label caption>{{ col.value }}</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-card>
</div>
</template>
</q-table>
</div> </div>
</template> </template>
</div> </q-table>
</div> </q-tab-panel>
<q-tab-panel name="map">
<img src="https://www.buga2019.de/we-bilder/3.Gartenausstellung/Gelaendeplan/190320_Gelaendeplan-quadratisch.jpg?m=1553094677" />
</q-tab-panel>
</q-tab-panels>
<q-separator />
<q-tabs
v-model="tab"
dense
class="bg-white text-green-8 shadow-2"
align="justify"
narrow-indicator
>
<q-tab name="list" icon="list" />
<q-tab name="map" icon="map" />
</q-tabs>
</q-card>
</template> </template>
<script> <script>
export default { export default {
data () { data () {
return { return {
tab: 'mails', tab: 'list',
panel: 'mails',
denseOn: true,
filter: '', filter: '',
selected: [], selected: [],
columns: [ columns: [
@ -92,107 +95,107 @@ export default {
{ name: 'iron', label: 'Iron (%)', field: 'iron', sortable: true, sort: (a, b) => parseInt(a, 10) - parseInt(b, 10) } { name: 'iron', label: 'Iron (%)', field: 'iron', sortable: true, sort: (a, b) => parseInt(a, 10) - parseInt(b, 10) }
], ],
data: [ data: [
{ {
name: 'Frozen Yogurt', name: 'Frozen Yogurt',
calories: 159, calories: 159,
fat: 6.0, fat: 6.0,
carbs: 24, carbs: 24,
protein: 4.0, protein: 4.0,
sodium: 87, sodium: 87,
calcium: '14%', calcium: '14%',
iron: '1%' iron: '1%'
}, },
{ {
name: 'Ice cream sandwich', name: 'Ice cream sandwich',
calories: 237, calories: 237,
fat: 9.0, fat: 9.0,
carbs: 37, carbs: 37,
protein: 4.3, protein: 4.3,
sodium: 129, sodium: 129,
calcium: '8%', calcium: '8%',
iron: '1%' iron: '1%'
}, },
{ {
name: 'Eclair', name: 'Eclair',
calories: 262, calories: 262,
fat: 16.0, fat: 16.0,
carbs: 23, carbs: 23,
protein: 6.0, protein: 6.0,
sodium: 337, sodium: 337,
calcium: '6%', calcium: '6%',
iron: '7%' iron: '7%'
}, },
{ {
name: 'Cupcake', name: 'Cupcake',
calories: 305, calories: 305,
fat: 3.7, fat: 3.7,
carbs: 67, carbs: 67,
protein: 4.3, protein: 4.3,
sodium: 413, sodium: 413,
calcium: '3%', calcium: '3%',
iron: '8%' iron: '8%'
}, },
{ {
name: 'Gingerbread', name: 'Gingerbread',
calories: 356, calories: 356,
fat: 16.0, fat: 16.0,
carbs: 49, carbs: 49,
protein: 3.9, protein: 3.9,
sodium: 327, sodium: 327,
calcium: '7%', calcium: '7%',
iron: '16%' iron: '16%'
}, },
{ {
name: 'Jelly bean', name: 'Jelly bean',
calories: 375, calories: 375,
fat: 0.0, fat: 0.0,
carbs: 94, carbs: 94,
protein: 0.0, protein: 0.0,
sodium: 50, sodium: 50,
calcium: '0%', calcium: '0%',
iron: '0%' iron: '0%'
}, },
{ {
name: 'Lollipop', name: 'Lollipop',
calories: 392, calories: 392,
fat: 0.2, fat: 0.2,
carbs: 98, carbs: 98,
protein: 0, protein: 0,
sodium: 38, sodium: 38,
calcium: '0%', calcium: '0%',
iron: '2%' iron: '2%'
}, },
{ {
name: 'Honeycomb', name: 'Honeycomb',
calories: 408, calories: 408,
fat: 3.2, fat: 3.2,
carbs: 87, carbs: 87,
protein: 6.5, protein: 6.5,
sodium: 562, sodium: 562,
calcium: '0%', calcium: '0%',
iron: '45%' iron: '45%'
}, },
{ {
name: 'Donut', name: 'Donut',
calories: 452, calories: 452,
fat: 25.0, fat: 25.0,
carbs: 51, carbs: 51,
protein: 4.9, protein: 4.9,
sodium: 326, sodium: 326,
calcium: '2%', calcium: '2%',
iron: '22%' iron: '22%'
}, },
{ {
name: 'KitKat', name: 'KitKat',
calories: 518, calories: 518,
fat: 26.0, fat: 26.0,
carbs: 65, carbs: 65,
protein: 7, protein: 7,
sodium: 54, sodium: 54,
calcium: '12%', calcium: '12%',
iron: '6%' iron: '6%'
} }
] ]
} }
} }
} }

View File

@ -1,14 +0,0 @@
<template>
<div class="q-pa-md">
<q-table
title="Treats"
:data="data"
:columns="columns"
row-key="name"
selection="single"
:selected.sync="selected"
/>
<div class="q-mt-md">Selected: {{ JSON.stringify(selected) }}</div>
</div>
</template>

View File

@ -1,184 +1,55 @@
<template> <template>
<div class="q-pa-md"> <div class="q-pa-md">
<q-table <q-card class="my-card" style="max-width: 600px">
title="Treats" <q-parallax
:data="data" src="https://www.buga2019.de/we-bilder/2.Aktuelles/BUGA-Zwerg/zwerg-im-gras-buga-heilbronn-2019.jpg?m=1550501506"
:columns="columns" :height="200"
row-key="name" />
selection="single" <q-card-section>
:selected.sync="selected" <div class="text-h6">GeoCaching</div>
:filter="filter" <div class="text-body2">Willkommen</div>
grid <q-btn color="green-3" text-color="black" class="full-width q-mt-md" label="Was ist GeoCaching?" @click="card = true" />
hide-header </q-card-section>
> </q-card>
<template v-slot:top-right> <q-card class="my-card" style="max-width: 600px">
<q-input borderless dense debounce="300" v-model="filter" placeholder="Search"> <q-parallax
<template v-slot:append> src="https://www.buga2019.de/we-bilder/1.Bundesgartenschau/171205_BUGA-2019_Sommerinsel_LOMA_430px.jpg?m=1550501561"
<q-icon name="search" /> :height="200"
</template> />
</q-input>
</template>
<template v-slot:item="props"> <q-card-section>
<div <div class="text-h6">Loslegen</div>
class="q-pa-xs col-xs-12 col-sm-6 col-md-4 col-lg-3 grid-style-transition" <q-btn color="green-3" text-color="black" class="full-width q-mt-md" label="Zu den Caches" to="/CacheView"/>
:style="props.selected ? 'transform: scale(0.95);' : ''" </q-card-section>
> </q-card>
<q-card :class="props.selected ? 'bg-grey-2' : ''"> <q-dialog v-model="card">
<q-card-section> <q-card>
<q-checkbox :dense="denseOn" v-model="props.selected" :label="props.row.name" /> <q-card-section>
</q-card-section> <div class="row no-wrap items-center">
<q-separator /> <div class="col text-h6 ellipsis">Was ist GeoCaching?</div>
<q-list dense> </div>
<q-item v-for="col in props.cols.filter(col => col.name !== 'desc')" :key="col.name"> </q-card-section>
<q-item-section> <q-card-section>
<q-item-label>{{ col.label }}</q-item-label> <p class="text-subtitle1">GeoCaching ist eine Art Schnitzeljagd. </p>
</q-item-section> </q-card-section>
<q-item-section side> <q-separator />
<q-item-label caption>{{ col.value }}</q-item-label> <q-card-actions>
</q-item-section> <q-btn flat color="primary" v-close-popup>Ok</q-btn>
</q-item> </q-card-actions>
</q-list> </q-card>
</q-card> </q-dialog>
</div> </div>
</template>
</q-table>
</div>
</template> </template>
<style lang="stylus">
.grid-style-transition
transition transform .3s
</style>
<script> <script>
export default { export default {
data () { data () {
return { return {
denseOn: true, card: false,
filter: '',
selected: [], slideVol: 39,
columns: [ slideAlarm: 56,
{ slideVibration: 63
name: 'desc',
required: true,
label: 'Dessert (100g serving)',
align: 'left',
field: row => row.name,
format: val => `${val}`,
sortable: true
},
{ name: 'calories', align: 'center', label: 'Calories', field: 'calories', sortable: true },
{ name: 'fat', label: 'Fat (g)', field: 'fat', sortable: true },
{ name: 'carbs', label: 'Carbs (g)', field: 'carbs' },
{ name: 'protein', label: 'Protein (g)', field: 'protein' },
{ name: 'sodium', label: 'Sodium (mg)', field: 'sodium' },
{ name: 'calcium', label: 'Calcium (%)', field: 'calcium', sortable: true, sort: (a, b) => parseInt(a, 10) - parseInt(b, 10) },
{ name: 'iron', label: 'Iron (%)', field: 'iron', sortable: true, sort: (a, b) => parseInt(a, 10) - parseInt(b, 10) }
],
data: [
{
name: 'Frozen Yogurt',
calories: 159,
fat: 6.0,
carbs: 24,
protein: 4.0,
sodium: 87,
calcium: '14%',
iron: '1%'
},
{
name: 'Ice cream sandwich',
calories: 237,
fat: 9.0,
carbs: 37,
protein: 4.3,
sodium: 129,
calcium: '8%',
iron: '1%'
},
{
name: 'Eclair',
calories: 262,
fat: 16.0,
carbs: 23,
protein: 6.0,
sodium: 337,
calcium: '6%',
iron: '7%'
},
{
name: 'Cupcake',
calories: 305,
fat: 3.7,
carbs: 67,
protein: 4.3,
sodium: 413,
calcium: '3%',
iron: '8%'
},
{
name: 'Gingerbread',
calories: 356,
fat: 16.0,
carbs: 49,
protein: 3.9,
sodium: 327,
calcium: '7%',
iron: '16%'
},
{
name: 'Jelly bean',
calories: 375,
fat: 0.0,
carbs: 94,
protein: 0.0,
sodium: 50,
calcium: '0%',
iron: '0%'
},
{
name: 'Lollipop',
calories: 392,
fat: 0.2,
carbs: 98,
protein: 0,
sodium: 38,
calcium: '0%',
iron: '2%'
},
{
name: 'Honeycomb',
calories: 408,
fat: 3.2,
carbs: 87,
protein: 6.5,
sodium: 562,
calcium: '0%',
iron: '45%'
},
{
name: 'Donut',
calories: 452,
fat: 25.0,
carbs: 51,
protein: 4.9,
sodium: 326,
calcium: '2%',
iron: '22%'
},
{
name: 'KitKat',
calories: 518,
fat: 26.0,
carbs: 65,
protein: 7,
sodium: 54,
calcium: '12%',
iron: '6%'
}
]
} }
} }
} }

View File

@ -4,11 +4,6 @@ const routes = [
component: () => import("layouts/MyLayout.vue"), component: () => import("layouts/MyLayout.vue"),
children: [{ path: "", component: () => import("pages/Index.vue") }] children: [{ path: "", component: () => import("pages/Index.vue") }]
}, },
{
path: "/dashboard/",
component: () => import("layouts/MyLayout.vue"),
children: [{ path: "", component: () => import("pages/Dashboard.vue") }]
},
{ {
path: "/cacheview/", path: "/cacheview/",
component: () => import("layouts/MyLayout.vue"), component: () => import("layouts/MyLayout.vue"),