Yoshie Muranaka | 8d12910 | 2019-12-19 09:51:55 -0800 | [diff] [blame] | 1 | <template> |
| 2 | <header class="page-title"> |
| 3 | <h1>{{ title }}</h1> |
| 4 | <p v-if="description">{{ description }}</p> |
| 5 | </header> |
| 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, |
| 14 | default: '' |
| 15 | } |
| 16 | }, |
Yoshie Muranaka | 8d12910 | 2019-12-19 09:51:55 -0800 | [diff] [blame] | 17 | data() { |
| 18 | return { |
| 19 | title: this.$route.meta.title |
| 20 | }; |
| 21 | } |
| 22 | }; |
| 23 | </script> |
| 24 | |
| 25 | <style lang="scss" scoped> |
| 26 | .page-title { |
| 27 | margin-bottom: $spacer * 2; |
| 28 | } |
| 29 | h1 { |
| 30 | font-weight: $display4-weight; |
| 31 | line-height: $display-line-height; |
| 32 | } |
| 33 | p { |
| 34 | max-width: 72ch; |
| 35 | } |
| 36 | </style> |