summaryrefslogtreecommitdiff
path: root/src/components/Global/PageTitle.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Global/PageTitle.vue')
-rw-r--r--src/components/Global/PageTitle.vue31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/components/Global/PageTitle.vue b/src/components/Global/PageTitle.vue
new file mode 100644
index 00000000..02314249
--- /dev/null
+++ b/src/components/Global/PageTitle.vue
@@ -0,0 +1,31 @@
+<template>
+ <header class="page-title">
+ <h1>{{ title }}</h1>
+ <p v-if="description">{{ description }}</p>
+ </header>
+</template>
+
+<script>
+export default {
+ name: 'PageTitle',
+ props: ['description'],
+ data() {
+ return {
+ title: this.$route.meta.title
+ };
+ }
+};
+</script>
+
+<style lang="scss" scoped>
+.page-title {
+ margin-bottom: $spacer * 2;
+}
+h1 {
+ font-weight: $display4-weight;
+ line-height: $display-line-height;
+}
+p {
+ max-width: 72ch;
+}
+</style>