File tree Expand file tree Collapse file tree 4 files changed +20
-12
lines changed Expand file tree Collapse file tree 4 files changed +20
-12
lines changed Original file line number Diff line number Diff line change 1
1
<script >
2
+ import { THEME_NAME , THEME_MODULE_NAME } from " @www/constants" ;
3
+
2
4
// @ts-check
3
5
4
6
export let snippet = " <LineNumbers {highlighted} />" ;
8
10
const code = ` <script>
9
11
import Highlight, { LineNumbers } from "svelte-highlight";
10
12
import typescript from "svelte-highlight/languages/typescript";
11
- import ashes from "svelte-highlight/styles/ashes ";
13
+ import ${ THEME_MODULE_NAME } from "svelte-highlight/styles/${ THEME_NAME } ";
12
14
13
15
const code = "const add = (a: number, b: number) => a + b";
14
16
<\/ script>
15
17
16
18
<svelte:head>
17
- {@html ashes }
19
+ {@html ${ THEME_MODULE_NAME } }
18
20
</svelte:head>
19
21
20
22
<Highlight language={typescript} {code} let:highlighted>
23
25
</script >
24
26
25
27
<HighlightSvelte {code } let:highlighted >
26
- <LineNumbers class ="ashes" {highlighted } {...$$restProps } />
28
+ <LineNumbers class ={ THEME_MODULE_NAME } {highlighted } {...$$restProps } />
27
29
</HighlightSvelte >
Original file line number Diff line number Diff line change 1
1
<script >
2
+ import { THEME_MODULE_NAME } from " @www/constants" ;
3
+
2
4
// @ts-check
3
5
4
6
/** @type {string} */
22
24
<Highlight language={${ moduleName} } code="code" />` ;
23
25
</script >
24
26
25
- <HighlightSvelte class ="ashes" {code } />
27
+ <HighlightSvelte class ={ THEME_MODULE_NAME } {code } />
Original file line number Diff line number Diff line change 1
1
<script >
2
2
// @ts-check
3
3
4
- import { PKG_NAME } from " @www/constants" ;
4
+ import { THEME_NAME , PKG_NAME , THEME_MODULE_NAME } from " @www/constants" ;
5
5
import {
6
6
Row ,
7
7
Column ,
82
82
</p >
83
83
</Column >
84
84
<Column xlg ={10 }>
85
- <ScopedStyle name =" ashes " moduleName =" ashes " />
85
+ <ScopedStyle name ={ THEME_NAME } moduleName ={ THEME_MODULE_NAME } />
86
86
</Column >
87
87
<Column xlg ={6 } lg ={12 }>
88
88
<p class =" mb-5" >
111
111
</p >
112
112
</Column >
113
113
<Column xlg ={10 }>
114
- <HighlightSvelte code ={svelteHeadCdn } class =" ashes " />
114
+ <HighlightSvelte code ={svelteHeadCdn } class ={ THEME_MODULE_NAME } />
115
115
<InlineNotification
116
116
lowContrast
117
117
hideCloseButton
133
133
</p >
134
134
</Column >
135
135
<Column xlg ={10 }>
136
- <ScopedStyleSvelte name =" ashes " moduleName =" ashes " />
136
+ <ScopedStyleSvelte name ={ THEME_NAME } moduleName ={ THEME_MODULE_NAME } />
137
137
</Column >
138
138
</Row >
139
139
149
149
</p >
150
150
</Column >
151
151
<Column xlg ={10 }>
152
- <ScopedStyleAuto name =" ashes " moduleName =" ashes " />
152
+ <ScopedStyleAuto name ={ THEME_NAME } moduleName ={ THEME_MODULE_NAME } />
153
153
<InlineNotification
154
154
lowContrast
155
155
hideCloseButton
253
253
<Highlight
254
254
code ={' [data-language="css"] {\n /* custom style rules */\n }' }
255
255
language ={css }
256
- class =" ashes "
256
+ class ={ THEME_MODULE_NAME }
257
257
/>
258
258
</Column >
259
259
</Row >
293
293
<\/ script>
294
294
295
295
<HighlightAuto {code} langtag \/ > ` }
296
- class =" ashes "
296
+ class ={ THEME_MODULE_NAME }
297
297
langtag
298
298
/>
299
299
<br />
308
308
--langtag-border-radius="6px"
309
309
--langtag-padding="0.5rem"
310
310
/> ` }
311
- class =" ashes "
311
+ class ={ THEME_MODULE_NAME }
312
312
langtag
313
313
--langtag-top =" 0.5rem"
314
314
--langtag-right =" 0.5rem"
Original file line number Diff line number Diff line change @@ -3,3 +3,7 @@ export const PKG_VERSION = __PKG_VERSION;
3
3
export const PKG_HOMEPAGE = __PKG_HOMEPAGE ;
4
4
export const PKG_HLJS_VERSION = __PKG_HLJS_VERSION ;
5
5
export const TS = __TS ;
6
+
7
+ // Change the featured theme used in the home page and languages pages.
8
+ export const THEME_NAME = "ashes" ;
9
+ export const THEME_MODULE_NAME = "ashes" ;
You can’t perform that action at this time.
0 commit comments