blob: dc0738e20f1a02c0d8d8cddd3e1fee761f05e7b0 [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 },
Yoshie Muranakac11d3892020-02-19 08:07:40 -080017 data() {
18 return {
19 title: this.$t(this.$route.meta.title)
20 };
Yoshie Muranaka8d129102019-12-19 09:51:55 -080021 }
22};
23</script>
24
25<style lang="scss" scoped>
Derick Montague40865722020-04-13 17:01:19 -050026@import 'src/assets/styles/helpers';
27
Yoshie Muranaka8d129102019-12-19 09:51:55 -080028.page-title {
29 margin-bottom: $spacer * 2;
30}
Yoshie Muranaka8d129102019-12-19 09:51:55 -080031p {
32 max-width: 72ch;
33}
34</style>