starlight-theme-nova 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/markdown.css
CHANGED
|
@@ -20,8 +20,18 @@
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/* <code> inside asides */
|
|
23
|
-
@supports (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
@supports (
|
|
24
|
+
border-color: color-mix(
|
|
25
|
+
in srgb,
|
|
26
|
+
var(--sl-color-asides-text-accent) 12%,
|
|
27
|
+
transparent
|
|
28
|
+
)
|
|
29
|
+
) {
|
|
30
|
+
.sl-markdown-content .starlight-aside code:not(:where(.not-content *)) {
|
|
31
|
+
border-color: color-mix(
|
|
32
|
+
in srgb,
|
|
33
|
+
var(--sl-color-asides-text-accent) 12%,
|
|
34
|
+
transparent
|
|
35
|
+
);
|
|
36
|
+
}
|
|
27
37
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "starlight-theme-nova",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "ocavue <ocavue@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"exports": {
|
|
19
19
|
".": "./src/index.ts",
|
|
20
20
|
"./*.css": "./lib/*.css",
|
|
21
|
+
"./components": "./src/components/index.ts",
|
|
21
22
|
"./components/*.astro": "./src/components/*.astro"
|
|
22
23
|
},
|
|
23
24
|
"files": [
|
package/src/astro.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { CodeTabItem, CodeTabs } from 'starlight-theme-nova/components'
|
|
3
|
+
|
|
4
|
+
type PackageManager = 'pnpm' | 'npm' | 'yarn' | 'bun'
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
/**
|
|
8
|
+
* The package managers to use.
|
|
9
|
+
*
|
|
10
|
+
* @default ['pnpm', 'npm', 'yarn', 'bun']
|
|
11
|
+
*/
|
|
12
|
+
packageManagers?: PackageManager[]
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The packages to install. If you want to install multiple packages, you can pass a space-separated string.
|
|
16
|
+
*/
|
|
17
|
+
packages: string
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Whether to install the packages as dev dependencies.
|
|
21
|
+
*
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
dev?: boolean
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const props: Props = Astro.props
|
|
28
|
+
|
|
29
|
+
const packageManagers = props.packageManagers ?? ['pnpm', 'npm', 'yarn', 'bun']
|
|
30
|
+
|
|
31
|
+
function getCode(packageManager: PackageManager) {
|
|
32
|
+
const parts: string[] = [
|
|
33
|
+
{
|
|
34
|
+
pnpm: 'pnpm add',
|
|
35
|
+
npm: 'npm install',
|
|
36
|
+
yarn: 'yarn add',
|
|
37
|
+
bun: 'bun add',
|
|
38
|
+
}[packageManager],
|
|
39
|
+
|
|
40
|
+
props.dev ? '-D' : '',
|
|
41
|
+
|
|
42
|
+
props.packages,
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
return parts.filter(Boolean).join(' ')
|
|
46
|
+
}
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
<CodeTabs syncKey="code-group-installation">
|
|
50
|
+
{
|
|
51
|
+
packageManagers.map((pkg) => (
|
|
52
|
+
<CodeTabItem label={pkg} lang="shell" code={getCode(pkg)} />
|
|
53
|
+
))
|
|
54
|
+
}
|
|
55
|
+
</CodeTabs>
|
|
@@ -10,14 +10,12 @@ const links = Object.entries(config.social || {}) as [Platform, SocialConfig][]
|
|
|
10
10
|
{
|
|
11
11
|
links.length > 0 && (
|
|
12
12
|
<>
|
|
13
|
-
{
|
|
14
|
-
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
))
|
|
20
|
-
}
|
|
13
|
+
{links.map(([platform, { label, url }]) => (
|
|
14
|
+
<a href={url} rel="me" class="nova-social-icons-link">
|
|
15
|
+
<span class="sr-only">{label}</span>
|
|
16
|
+
<Icon name={platform} size="1rem" color="currentColor" />
|
|
17
|
+
</a>
|
|
18
|
+
))}
|
|
21
19
|
</>
|
|
22
20
|
)
|
|
23
21
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as Code } from './Code.astro'
|
|
2
|
+
export { default as CodePackageManagers } from './CodePackageManagers.astro'
|
|
3
|
+
export { default as CodeTabs } from './CodeTabs.astro'
|
|
4
|
+
export { default as CodeTabItem } from './CodeTabItem.astro'
|
|
5
|
+
export { default as LinkButton } from './LinkButton.astro'
|
|
6
|
+
export { default as LinkCard } from './LinkCard.astro'
|