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',
'QInput',
'QFab',
'QFabAction'
'QFabAction',
'QCarousel',
'QCarouselControl',
'QCarouselSlide',
'QParallax',
'QAvatar',
'QDialog',
'QFooter',
'QExpansionItem'
],
directives: [
'Ripple'
'Ripple',
'ClosePopup'
],
// Quasar plugins

View File

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

View File

@ -1,76 +1,79 @@
<template>
<div class="q-pa-md">
<div class="q-gutter-y-md" style="max-width: 1200px">
<q-tabs
v-model="tab"
dense
align="justify"
class="bg-white text-green-8 shadow-2"
:breakpoint="0"
>
<q-tab name="table" icon="mail" />
<q-tab name="map" icon="map" />
</q-tabs>
<q-card>
<q-tab-panels v-model="tab" animated>
<q-tab-panel name="list">
<q-table
title="Caches"
:data="data"
:columns="columns"
row-key="name"
selection="multiple"
:selected.sync="selected"
:filter="filter"
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>
<div class="q-pa-md">
<q-table
title="Caches"
:data="data"
:columns="columns"
row-key="name"
selection="single"
:selected.sync="selected"
:filter="filter"
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 v-slot:item="props">
<div
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>
<template v-slot:item="props">
<div
class="q-pa-xs col-xs-12 col-sm-6 col-md-4 col-lg-3 grid-style-transition"
>
<q-expansion-item
expand-separator
:label="props.row.name"
>
<q-card>
<q-card-section>
<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-section>
</q-card>
</q-expansion-item>
</div>
</template>
</div>
</div>
</q-table>
</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>
<script>
export default {
data () {
return {
tab: 'mails',
panel: 'mails',
denseOn: true,
tab: 'list',
filter: '',
selected: [],
columns: [
@ -92,107 +95,107 @@ export default {
{ 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%'
}
]
{
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

@ -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>
<div class="q-pa-md">
<q-table
title="Treats"
:data="data"
:columns="columns"
row-key="name"
selection="single"
:selected.sync="selected"
:filter="filter"
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>
<q-card class="my-card" style="max-width: 600px">
<q-parallax
src="https://www.buga2019.de/we-bilder/2.Aktuelles/BUGA-Zwerg/zwerg-im-gras-buga-heilbronn-2019.jpg?m=1550501506"
:height="200"
/>
<q-card-section>
<div class="text-h6">GeoCaching</div>
<div class="text-body2">Willkommen</div>
<q-btn color="green-3" text-color="black" class="full-width q-mt-md" label="Was ist GeoCaching?" @click="card = true" />
</q-card-section>
</q-card>
<q-card class="my-card" style="max-width: 600px">
<q-parallax
src="https://www.buga2019.de/we-bilder/1.Bundesgartenschau/171205_BUGA-2019_Sommerinsel_LOMA_430px.jpg?m=1550501561"
:height="200"
/>
<template v-slot:item="props">
<div
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>
<q-card-section>
<div class="text-h6">Loslegen</div>
<q-btn color="green-3" text-color="black" class="full-width q-mt-md" label="Zu den Caches" to="/CacheView"/>
</q-card-section>
</q-card>
<q-dialog v-model="card">
<q-card>
<q-card-section>
<div class="row no-wrap items-center">
<div class="col text-h6 ellipsis">Was ist GeoCaching?</div>
</div>
</q-card-section>
<q-card-section>
<p class="text-subtitle1">GeoCaching ist eine Art Schnitzeljagd. </p>
</q-card-section>
<q-separator />
<q-card-actions>
<q-btn flat color="primary" v-close-popup>Ok</q-btn>
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<style lang="stylus">
.grid-style-transition
transition transform .3s
</style>
<script>
export default {
data () {
return {
denseOn: true,
filter: '',
selected: [],
columns: [
{
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%'
}
]
card: false,
slideVol: 39,
slideAlarm: 56,
slideVibration: 63
}
}
}

View File

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