forked from swiftlang/swift-docc-render
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVolumeName.vue
72 lines (63 loc) · 1.63 KB
/
VolumeName.vue
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
<!--
This source file is part of the Swift.org open source project
Copyright (c) 2021 Apple Inc. and the Swift project authors
Licensed under Apache License v2.0 with Runtime Library Exception
See https://swift.org/LICENSE.txt for license information
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
-->
<template>
<div class="volume-name">
<Asset v-if="image" :identifier="image" class="image" aria-hidden="true" />
<h2 class="name">
{{ name }}
</h2>
<ContentNode v-if="content" :content="content" />
</div>
</template>
<script>
import Asset from 'docc-render/components/Asset.vue';
import ContentNode from 'docc-render/components/ContentNode.vue';
export default {
name: 'VolumeName',
components: { ContentNode, Asset },
props: {
image: {
type: String,
required: false,
},
content: {
type: Array,
required: false,
},
name: {
type: String,
required: false,
},
},
};
</script>
<style lang="scss" scoped>
@import 'docc-render/styles/_core.scss';
.image {
margin-bottom: 10px;
}
.name {
@include font-styles(heading-2-reduced);
color: var(--color-tutorials-overview-header-text, light-color(fill-tertiary));
word-break: break-word;
}
.content {
@include font-styles(body-tight);
color: var(--color-tutorials-overview-content-alt);
margin-top: 10px;
}
.volume-name {
padding: 50px 60px;
text-align: center;
background: var(--color-tutorials-overview-fill-secondary, dark-color(fill-secondary));
margin: $tutorials-overview-tile-margin-single-side 0;
@include breakpoint(small) {
padding: 40px 20px;
}
}
</style>