File tree 3 files changed +17
-1
lines changed 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ export async function get_docs_data(base = CONTENT_BASE_PATHS.DOCS) {
75
75
title : page_title ,
76
76
slug : page_slug ,
77
77
content : page_content ,
78
+ category : category_title ,
78
79
sections : get_sections ( page_content ) ,
79
80
path : `${ app_base } /docs/${ page_slug } ` ,
80
81
file : `${ category_dir } /${ filename } `
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export type Category = {
17
17
18
18
export type Page = {
19
19
title : string ;
20
+ category : string ;
20
21
slug : string ;
21
22
file : string ;
22
23
path : string ;
Original file line number Diff line number Diff line change 4
4
5
5
export let data;
6
6
7
- $: title = $page .data .page ? .title ;
7
+ $: pageData = $page .data .page ;
8
+
9
+ $: title = pageData? .title ;
10
+ $: category = pageData? .category ;
8
11
< / script>
9
12
10
13
< div class = " container" >
13
16
< / div>
14
17
15
18
< div class = " page content" >
19
+ {#if category}
20
+ < p class = " category" > {category}< / p>
21
+ {/ if }
16
22
{#if title}
17
23
< h1> {title}< / h1>
18
24
{/ if }
41
47
all: unset;
42
48
}
43
49
50
+ .category {
51
+ font: 700 var (-- sk- text- s) var (-- sk- font);
52
+ text- transform: uppercase;
53
+ letter- spacing: 0 .12em ;
54
+ margin: 0 0 0 .5em ;
55
+ color: var (-- sk- text- 3 );
56
+ }
57
+
44
58
@media (min - width : 832px ) {
45
59
.content {
46
60
padding- left: calc (var (-- sidebar- width) + var (-- sk- page- padding- side));
You can’t perform that action at this time.
0 commit comments