Skip to content

Commit

Permalink
Add page title to html title
Browse files Browse the repository at this point in the history
Closes #45
  • Loading branch information
Botffy committed Jul 31, 2021
1 parent 28f5d24 commit fb8f607
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 4 deletions.
21 changes: 18 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"luxon": "^1.27.0",
"uuid": "^3.4.0",
"vue": "^2.6.14",
"vue-meta": "^2.4.0",
"vue-router": "^3.5.2"
}
}
3 changes: 3 additions & 0 deletions src/Bikes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ const bikeByTime = (bikeStats: BikeStat[], slotSize = 5): number[][] => {
}
export default Vue.extend({
metaInfo: {
title: 'Bicajok'
},
components: {
'ride-list': BubiRides,
'quote': Quote
Expand Down
3 changes: 3 additions & 0 deletions src/BubiRides.vue
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ const formatTime = (time: DateTime): string => {
}
export default Vue.extend({
metaInfo: {
title: 'Bérlések'
},
components: {
'ride-form': RideForm,
'screenshot-upload': AddByScreenshot
Expand Down
3 changes: 3 additions & 0 deletions src/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ import { getStationByCode } from './station-service'
import InfoPage from './InfoPage.vue'
export default Vue.extend({
metaInfo: {
title: 'Beállítások'
},
components: {
'info-page': InfoPage
},
Expand Down
3 changes: 3 additions & 0 deletions src/Stations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ const stationDependency = (rides: Ride[]): any[] => {
}
export default Vue.extend({
metaInfo: {
title: 'Állomások'
},
components: {
'ride-list': BubiRides,
'quote': Quote
Expand Down
3 changes: 3 additions & 0 deletions src/TimePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ const dayStats = (rides: Ride[]) => {
}
export default Vue.extend({
metaInfo: {
title: 'Idő'
},
components: {
'quote': Quote,
'ride': RideComponent,
Expand Down
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html>
<html lang="hu">

<head>
<title>BubiStats</title>
Expand Down
8 changes: 8 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import VueMeta from 'vue-meta'
import HighchartsVue from 'highcharts-vue'
import Highcharts from 'highcharts'
import HighchartsSankey from 'highcharts/modules/sankey'
Expand Down Expand Up @@ -33,6 +34,7 @@ HighchartsSankey(Highcharts)
HighchartsDependencyWheel(Highcharts)

Vue.use(VueRouter)
Vue.use(VueMeta)
Vue.use(HighchartsVue, Highcharts, HighchartsSankey, HighchartsDependencyWheel)
Vue.use(Buefy, { defaultIconPack: 'fas' })

Expand Down Expand Up @@ -77,6 +79,12 @@ const router = new VueRouter({
new Vue({
el: '#app',
router,
metaInfo: {
title: null,
titleTemplate: (titleChunk: string): string => {
return titleChunk ? `BubiStats: ${titleChunk}` : 'BubiStats'
}
},
components: {
'filter-component': FilterComponent
},
Expand Down

0 comments on commit fb8f607

Please sign in to comment.