diff --git a/layouts/default.vue b/layouts/default.vue
index 32333b17..209425ae 100644
--- a/layouts/default.vue
+++ b/layouts/default.vue
@@ -4,9 +4,12 @@
+
+
+ {{cohort.name}}
+
-
-
+
@@ -21,6 +24,7 @@ import Snackbar from '../components/Snackbar'
import Footer from '../components/Footer'
import Confirm from '../components/Confirm'
import { mapState } from 'vuex'
+import { mdiChevronLeft } from '@mdi/js'
export default {
head () {
@@ -30,9 +34,24 @@ export default {
}
}
},
+ data () {
+ return { cohorts: [], mdiChevronLeft }
+ },
+ async fetch () {
+ this.cohorts = await this.$axios.$get('cohorts')
+ },
name: 'Default',
components: { Nav, Snackbar, Footer, Confirm },
- computed: mapState(['settings', 'locale']),
+ computed: {
+ ...mapState(['settings', 'locale']),
+ showBack () {
+ return ['tag-tag', 'g-cohort', 'p-place', 'search', 'announcement-id'].includes(this.$route.name)
+ },
+ showCohorts () {
+ if (!this.cohorts || this.cohorts.length === 0) return false
+ return ['tag-tag', 'index', 'g-cohort', 'p-place'].includes(this.$route.name)
+ }
+ },
created () {
this.$vuetify.theme.dark = this.settings['theme.is_dark']
}
diff --git a/pages/g/_cohort.vue b/pages/g/_cohort.vue
index bfdee688..308b2339 100644
--- a/pages/g/_cohort.vue
+++ b/pages/g/_cohort.vue
@@ -1,9 +1,5 @@
-
-
-
-
{{cohort}}
@@ -15,23 +11,16 @@