diff --git a/nuxt.config.js b/nuxt.config.js index 2d040680..0a8bce7e 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -277,7 +277,6 @@ export default { routes.push({ path: '/' + config.calendar.route, component: resolve(__dirname, 'routes/calendar.vue') }); routes.push({ path: '/' + config.calendar.route + '/:year(\\d\\d\\d\\d)', component: resolve(__dirname, 'routes/calendar.vue') }); routes.push({ path: '/' + config.calendar.route + '/:year(\\d\\d\\d\\d)-:month(\\d\\d)-:day(\\d\\d)', component: resolve(__dirname, 'routes/calendarDay.vue') }); - routes.push({ path: '/calendar-wide', component: resolve(__dirname, 'routes/calendarWide.vue') }); } if (config.api !== null) { diff --git a/routes/calendar.vue b/routes/calendar.vue index 9dcff14b..b6458d06 100644 --- a/routes/calendar.vue +++ b/routes/calendar.vue @@ -1,28 +1,45 @@ - + - - - calendar.headerLong ({{year.year}}) + + + + calendar.headerLong ({{year.year}}) + + + + + domain/{{ config.calendar.route }} + + - + + + calendar.months.{{i}} + + + + + calendar.months.{{i}} - + + - + - - - + + + + @@ -33,12 +50,17 @@ import { Day } from '../src/calendar/helpers'; export default { + layout({route}) { + return route.query.layout === 'basic' ? 'basic' : 'default'; + }, data() { return { year: this.$route.params.year ? calendar.getYear(this.$route.params.year) : calendar.getCurrentYear(), today: Day.today(), + basic: this.$route.query.layout === 'basic', + labels: this.$route.query.labels === 'true', } }, head() { diff --git a/routes/calendarDay.vue b/routes/calendarDay.vue index 1236ce1d..ab5a6e8d 100644 --- a/routes/calendarDay.vue +++ b/routes/calendarDay.vue @@ -1,10 +1,18 @@ - + - - - calendar.headerLong ({{day}}) + + + + calendar.headerLong ({{day}}) + + + + + domain/{{ config.calendar.route }} + + @@ -22,13 +30,15 @@ - + + - + - - - + + + + @@ -39,6 +49,9 @@ import { Day } from '../src/calendar/helpers'; export default { + layout({route}) { + return route.query.layout === 'basic' ? 'basic' : 'default'; + }, data() { const day = new Day( this.$route.params.year, @@ -49,6 +62,7 @@ return { day, year: calendar.getYear(day.year), + basic: this.$route.query.layout === 'basic', } }, head() { diff --git a/routes/calendarWide.vue b/routes/calendarWide.vue deleted file mode 100644 index c9b0cae8..00000000 --- a/routes/calendarWide.vue +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - calendar.headerLong ({{year.year}}) - - - - - domain/{{ config.calendar.route }} - - - - - - - calendar.months.{{i}} - - - - - - - - - diff --git a/server/calendar.js b/server/calendar.js index 2f0459a8..87b37f70 100644 --- a/server/calendar.js +++ b/server/calendar.js @@ -43,7 +43,7 @@ const dumpNameDays = async () => { } (async () => { - await shoot('/calendar-wide', `overview`); - await shoot('/calendar-wide?labels=true', `labels`); + await shoot(`/${config.calendar.route}?layout=basic`, `overview`); + await shoot(`/${config.calendar.route}?layout=basic&labels=true`, `labels`); await dumpNameDays(); })();