-
Notifications
You must be signed in to change notification settings - Fork 163
/
Copy pathDocsPageBottom.vue
55 lines (52 loc) · 1.12 KB
/
DocsPageBottom.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
<script setup lang="ts">
const { page } = useContent()
const { config } = useDocus()
</script>
<template>
<div
v-if="page"
class="docs-page-bottom"
>
<div
v-if="config?.github?.edit"
class="edit-link"
>
<Icon name="uil:edit" />
<EditOnLink
v-slot="{ url }"
:page="page"
>
<ProseA :to="url">
<span>
Edit this page on GitHub
</span>
</ProseA>
</EditOnLink>
</div>
<!-- Need to be supported by @nuxt/content -->
<span v-if="page?.mtime">Updated on <b>{{ new Intl.DateTimeFormat('en-US').format(Date.parse(page.mtime)) }}</b></span>
</div>
</template>
<style scoped lang="ts">
css({
'.docs-page-bottom': {
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
flexDirection: 'row',
gap: '{space.4}',
marginTop: '{space.8}',
fontSize: '{fontSize.sm}',
color: '{color.gray.500}',
'@dark': {
color: '{color.gray.400}'
},
'.edit-link': {
flex: 1,
display: 'flex',
alignItems: 'center',
gap: '{space.2}'
}
}
})
</style>