Skip to content

Commit

Permalink
Merge pull request #22 from CUAHSI:layout
Browse files Browse the repository at this point in the history
Improve mdAndDown breakpoints
  • Loading branch information
devincowan authored Sep 3, 2024
2 parents 3a52816 + c4c5d50 commit 7c8bead
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 25 deletions.
5 changes: 4 additions & 1 deletion frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet" />
<SnackBar />
<TheBottomSheet />
<TheFooter />
<TheFooter v-if="!mdAndDown" />
</v-main>
</v-app>
</template>
Expand All @@ -28,6 +28,9 @@ import TheFooter from './components/TheFooter.vue'
import { ref } from 'vue'
import { useAlertStore } from './stores/alerts'
import TheBottomSheet from "@/components/TheBottomSheet.vue";
import { useDisplay } from 'vuetify'
const { mdAndDown } = useDisplay()
const alertStore = useAlertStore()
Expand Down
18 changes: 8 additions & 10 deletions frontend/src/components/TheFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
{{ new Date().getFullYear() }} — <strong>hydroprocess_db</strong>
</div>
<v-spacer></v-spacer>
<a href="https://cuahsi.org" class="logo" target="_blank">
<v-card height="10vh">
<v-card-text>
<div class="text-body-1">Powered by</div>
<v-img :src="imgUrl" cover width="8rem"></v-img>
</v-card-text>
</v-card>
</a>
<v-card href="https://cuahsi.org" class="mx-auto" rel="noopener" target="_blank" subtitle="Powered by" min-width="
16rem">
<template v-slot:append>
<v-img :src="imgUrl" cover width="8rem"></v-img>
</template>
</v-card>
</div>
</v-footer>
</template>
Expand All @@ -24,11 +22,11 @@ import imgUrl from '@/assets/logo.png'

<style lang="scss" scoped>
.logo {
height: 10%;
height: 10vh;
cursor: pointer;
img {
height: 10%;
height: 10vh;
}
}
</style>
2 changes: 1 addition & 1 deletion frontend/src/components/TheLeafletMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ async function mapClick() {
<style scoped>
#mapContainer {
width: 100%;
height: 80vh;
height: 100%;
}
</style>
39 changes: 26 additions & 13 deletions frontend/src/views/MapView.vue
Original file line number Diff line number Diff line change
@@ -1,26 +1,39 @@
<template>
<v-btn @click="toggleFilterDrawer" color="secondary" location="left" style="z-index: 9999"
:style="{ transform: translateFilter(), position: 'absolute' }"
:icon="showFilterDrawer ? mdiChevronLeft : mdiChevronRight" size="x-small">
</v-btn>
<v-btn @click="toggleDataDrawer" color="secondary" location="right" style="z-index: 9999"
:style="{ transform: translateData(), position: 'absolute' }"
:icon="showDataDrawer ? mdiChevronRight : mdiChevronLeft" size="x-small">
</v-btn>
<v-overlay :model-value="!mapStore.mapLoaded" class="align-center justify-center">
<v-progress-circular indeterminate :size="128"></v-progress-circular>
</v-overlay>
<v-container fluid>
<v-row fill-height>
<v-col v-if="showFilterDrawer" :cols="mdAndDown ? 12 : 3" :order="mdAndDown ? '' : 'first'">
<v-container v-if="!mdAndDown" fluid>
<v-row fill-height style="height: 87vh">
<v-btn @click="toggleFilterDrawer" color="secondary" location="left" style="z-index: 9999"
:style="{ transform: translateFilter(), position: 'absolute' }"
:icon="showFilterDrawer ? mdiChevronLeft : mdiChevronRight" size="x-small">
</v-btn>
<v-btn @click="toggleDataDrawer" color="secondary" location="right" style="z-index: 9999"
:style="{ transform: translateData(), position: 'absolute' }"
:icon="showDataDrawer ? mdiChevronRight : mdiChevronLeft" size="x-small">
</v-btn>
<v-col v-if="showFilterDrawer" :cols="3">
<FilterDrawer />
</v-col>
<v-divider vertical></v-divider>
<v-col :cols="mdAndDown ? 12 : getCols" :order="mdAndDown ? 'first' : ''">
<v-col :cols="getCols">
<TheLeafletMap />
</v-col>
<v-divider vertical></v-divider>
<v-col v-if="showDataDrawer" :cols="mdAndDown ? 12 : 2" order="last">
<v-col v-if="showDataDrawer" cols="2">
<DataViewDrawer />
</v-col>
</v-row>
</v-container>
<v-container v-else>
<v-row style="height: 40vh">
<TheLeafletMap />
</v-row>
<v-row style="height: 50vh">
<v-col>
<FilterDrawer />
</v-col>
<v-col>
<DataViewDrawer />
</v-col>
</v-row>
Expand Down

0 comments on commit 7c8bead

Please sign in to comment.