-
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
28614a7
commit 3ed2af9
Showing
5 changed files
with
58 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,37 @@ | ||
<template> | ||
<v-app> | ||
<v-app-bar :absolute="true"> | ||
<v-app-bar-title>{{ appConfig?.title }}</v-app-bar-title> | ||
<router-link to="/"> | ||
<v-app-bar-title>{{ appConfig?.title }}</v-app-bar-title> | ||
</router-link> | ||
<v-spacer></v-spacer> | ||
<router-link to="/about"> | ||
<v-btn icon> | ||
<v-icon>mdi-information-outline</v-icon> | ||
<v-tooltip activator="parent">About</v-tooltip> | ||
</v-btn> | ||
</router-link> | ||
</v-app-bar> | ||
<v-main> | ||
<router-view /> | ||
</v-main> | ||
<div class="sticky-footer"> | ||
<div v-for="name in indicatorNames"> | ||
<v-btn link | ||
class="floating-btn mb-2 " | ||
:class="name === selectedIndicator ? 'bg-blue' : 'bg-black'" | ||
rounded="xl" | ||
@click="selectedIndicator = name">{{ name }} | ||
</v-btn> | ||
</div> | ||
</div> | ||
</v-app> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { ref, computed, watch } from 'vue'; | ||
import { storeToRefs } from 'pinia'; | ||
import { useAppStore } from '../stores/appStore'; | ||
|
||
// TODO: Indicators floating in footer as options rather than nav drawer | ||
// TODO: Excel and image download also as footer option in footer rhs | ||
// TODO: Make preselected regions available as zoom regions - tick state, select bounding box of all selected + selected countries | ||
// TODO: auto zoom to selected countries on click (if haven't previously selected region?) | ||
|
||
const drawer = ref(null); | ||
// TODO: Excel and image download also as footer option in footer rhs | ||
// TODO: auto zoom and lock to selected country on click | ||
|
||
const { initialiseData } = useAppStore(); | ||
const { appConfig, selectedIndicator } = storeToRefs(useAppStore()); | ||
|
||
const indicatorNames = computed(() => appConfig.value ? Object.keys(appConfig.value.indicators) : {}); | ||
const { appConfig } = storeToRefs(useAppStore()); | ||
|
||
initialiseData(); | ||
watch(appConfig, () => { | ||
window.document.title = appConfig.value.title; | ||
}); | ||
|
||
</script> | ||
<style lang="scss"> | ||
.sticky-footer { | ||
position: fixed; | ||
bottom: 1rem; | ||
left: 2rem; | ||
background-color: rgba(0,0,0,0); | ||
z-index: 999; | ||
} | ||
</style> |
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,11 @@ | ||
<template> | ||
<p v-if="appConfig" class="ma-4 text-body-1"> | ||
{{ appConfig.title }} is in development. Check back later for more about the application. | ||
</p> | ||
</template> | ||
<script setup> | ||
import {storeToRefs} from "pinia"; | ||
import {useAppStore} from "../stores/appStore"; | ||
const { appConfig } = storeToRefs(useAppStore()); | ||
</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 |
---|---|---|
@@ -1,7 +1,32 @@ | ||
<template> | ||
<Choropleth /> | ||
<div class="sticky-footer"> | ||
<div v-for="name in indicatorNames"> | ||
<v-btn link | ||
class="floating-btn mb-2 " | ||
:class="name === selectedIndicator ? 'bg-blue' : 'bg-black'" | ||
rounded="xl" | ||
@click="selectedIndicator = name">{{ name }} | ||
</v-btn> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
// | ||
import {storeToRefs} from "pinia"; | ||
import {useAppStore} from "../stores/appStore"; | ||
import {computed} from "vue"; | ||
const { appConfig, selectedIndicator } = storeToRefs(useAppStore()); | ||
const indicatorNames = computed(() => appConfig.value ? Object.keys(appConfig.value.indicators) : {}); | ||
</script> | ||
<style lang="scss"> | ||
.sticky-footer { | ||
position: fixed; | ||
bottom: 1rem; | ||
left: 2rem; | ||
background-color: rgba(0,0,0,0); | ||
z-index: 999; | ||
} | ||
</style> |
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