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', |
| 11 | props: ['description'], |
| 12 | data() { |
| 13 | return { |
| 14 | title: this.$route.meta.title |
| 15 | }; |
| 16 | } |
| 17 | }; |
| 18 | </script> |
| 19 | |
| 20 | <style lang="scss" scoped> |
| 21 | .page-title { |
| 22 | margin-bottom: $spacer * 2; |
| 23 | } |
| 24 | h1 { |
| 25 | font-weight: $display4-weight; |
| 26 | line-height: $display-line-height; |
| 27 | } |
| 28 | p { |
| 29 | max-width: 72ch; |
| 30 | } |
| 31 | </style> |