Yoshie Muranaka | 8d12910 | 2019-12-19 09:51:55 -0800 | [diff] [blame] | 1 | <template> |
Yoshie Muranaka | db6fd25 | 2020-02-11 13:38:00 -0800 | [diff] [blame] | 2 | <div class="page-title"> |
Yoshie Muranaka | 8d12910 | 2019-12-19 09:51:55 -0800 | [diff] [blame] | 3 | <h1>{{ title }}</h1> |
4 | <p v-if="description">{{ description }}</p> | ||||
Yoshie Muranaka | db6fd25 | 2020-02-11 13:38:00 -0800 | [diff] [blame] | 5 | </div> |
Yoshie Muranaka | 8d12910 | 2019-12-19 09:51:55 -0800 | [diff] [blame] | 6 | </template> |
7 | |||||
8 | <script> | ||||
9 | export default { | ||||
10 | name: 'PageTitle', | ||||
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 11 | props: { |
12 | description: { | ||||
13 | type: String, | ||||
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame^] | 14 | default: '', |
15 | }, | ||||
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 16 | }, |
Yoshie Muranaka | c11d389 | 2020-02-19 08:07:40 -0800 | [diff] [blame] | 17 | data() { |
18 | return { | ||||
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame^] | 19 | title: this.$route.meta.title, |
Yoshie Muranaka | c11d389 | 2020-02-19 08:07:40 -0800 | [diff] [blame] | 20 | }; |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame^] | 21 | }, |
Yoshie Muranaka | 8d12910 | 2019-12-19 09:51:55 -0800 | [diff] [blame] | 22 | }; |
23 | </script> | ||||
24 | |||||
25 | <style lang="scss" scoped> | ||||
Yoshie Muranaka | 8d12910 | 2019-12-19 09:51:55 -0800 | [diff] [blame] | 26 | .page-title { |
27 | margin-bottom: $spacer * 2; | ||||
28 | } | ||||
Yoshie Muranaka | 8d12910 | 2019-12-19 09:51:55 -0800 | [diff] [blame] | 29 | p { |
30 | max-width: 72ch; | ||||
31 | } | ||||
32 | </style> |