SectionHeading.vue
1.34 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<script setup lang="ts">
defineProps<{
kicker: string
title: string
description?: string
}>()
</script>
<template>
<div class="section-heading">
<div class="section-copy">
<p class="section-kicker">{{ kicker }}</p>
<h2 class="section-title">{{ title }}</h2>
<p v-if="description" class="section-description">{{ description }}</p>
</div>
<div v-if="$slots.actions" class="section-actions">
<slot name="actions" />
</div>
</div>
</template>
<style scoped>
.section-heading {
display: flex;
justify-content: space-between;
gap: 24px;
align-items: flex-start;
}
.section-copy {
display: grid;
gap: 10px;
}
.section-kicker {
margin: 0;
font-family: var(--font-mono);
font-size: 11px;
letter-spacing: 0.22em;
text-transform: uppercase;
color: var(--text-muted);
}
.section-title {
margin: 0;
font-family: var(--font-display);
font-size: clamp(28px, 2.1vw, 38px);
line-height: 1.06;
color: var(--text-strong);
}
.section-description {
margin: 0;
max-width: 62ch;
color: var(--text-muted);
font-size: 14px;
line-height: 1.8;
}
.section-actions {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: 12px;
}
@media (max-width: 860px) {
.section-heading {
flex-direction: column;
}
.section-actions {
justify-content: flex-start;
}
}
</style>