blob: 59bb6a1e7cc3204e1eb12393ddf2200c441741e8 [file] [log] [blame]
Yoshie Muranaka8d129102019-12-19 09:51:55 -08001<template>
Yoshie Muranakadb6fd252020-02-11 13:38:00 -08002 <div class="page-title">
Yoshie Muranaka8d129102019-12-19 09:51:55 -08003 <h1>{{ title }}</h1>
4 <p v-if="description">{{ description }}</p>
Yoshie Muranakadb6fd252020-02-11 13:38:00 -08005 </div>
Yoshie Muranaka8d129102019-12-19 09:51:55 -08006</template>
7
8<script>
9export default {
10 name: 'PageTitle',
Derick Montague09e45cd2020-01-23 15:45:57 -060011 props: {
12 description: {
13 type: String,
14 default: ''
15 }
16 },
Dixsie Wolmerscbcd2132020-01-30 20:58:37 -060017 computed: {
18 title() {
19 return this.$t(this.$route.meta.title);
20 }
Yoshie Muranaka8d129102019-12-19 09:51:55 -080021 }
22};
23</script>
24
25<style lang="scss" scoped>
26.page-title {
27 margin-bottom: $spacer * 2;
28}
29h1 {
30 font-weight: $display4-weight;
31 line-height: $display-line-height;
32}
33p {
34 max-width: 72ch;
35}
36</style>