summaryrefslogtreecommitdiff
path: root/src/components/_sila/Global/PageTitle.vue
blob: 6f02ed8d02d87ec9eb2524aefb23084957aa3245 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<template>
  <div class="page-title">
    <h1>{{ title }}</h1>
    <p v-if="description">{{ description }}</p>
    <div class="line"></div>
  </div>
</template>

<script>
export default {
  name: 'PageTitle',
  props: {
    description: {
      type: String,
      default: '',
    },
  },
  data() {
    return {
      title: this.$route.meta.title,
    };
  },
};
</script>

<style lang="scss" scoped>
.page-title {
  margin-bottom: $spacer * 2;
}
p {
  max-width: 72ch;
  margin-bottom: 0;
}
.line {
  border-bottom: 1px solid $gray-10;
  margin: $spacer (-$spacer * 1.95) 0 (-$spacer * 2);
}
</style>