Skip to content

Commit 1874d91

Browse files
authored
feat: Enhance landing page with improved messaging and layout updates (#3)
1 parent 6128a94 commit 1874d91

42 files changed

Lines changed: 1574 additions & 454 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎astro.config.mjs‎

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,9 @@ export default defineConfig({
1111
output: "static",
1212
integrations: [
1313
react(),
14-
expressiveCode({
15-
themes: ["github-light", "github-dark"],
16-
themeCssSelector: (theme) => {
17-
if (theme.name === "github-dark") return ".dark";
18-
return ":root:not(.dark)";
19-
},
20-
useDarkModeMediaQuery: false,
21-
styleOverrides: {
22-
borderRadius: "0.5rem",
23-
codeFontFamily: "'JetBrains Mono', monospace",
24-
codeFontSize: "0.875rem",
25-
codeLineHeight: "1.625",
26-
codePaddingBlock: "1rem",
27-
codePaddingInline: "1rem",
28-
borderColor: "hsl(var(--code-border))",
29-
codeBackground: "hsl(var(--code-bg))",
30-
frames: {
31-
editorTabBarBackground: "hsl(var(--code-header))",
32-
editorTabBarBorderBottomColor: "hsl(var(--code-border))",
33-
editorActiveTabBackground: "hsl(var(--code-bg))",
34-
editorActiveTabIndicatorTopColor: "hsl(var(--brand))",
35-
terminalTitlebarBackground: "hsl(var(--code-header))",
36-
terminalTitlebarBorderBottomColor: "hsl(var(--code-border))",
37-
terminalBackground: "hsl(var(--code-bg))",
38-
tooltipSuccessBackground: "hsl(var(--brand))",
39-
frameBoxShadowCssValue: "none",
40-
},
41-
},
42-
}),
14+
/* Options live in ec.config.mjs so the `<Code>` component can be used
15+
from .astro files. */
16+
expressiveCode(),
4317
mdx(),
4418
tailwind(),
4519
sitemap({

‎ec.config.mjs‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { defineEcConfig } from "astro-expressive-code";
2+
3+
/* Expressive Code lives here rather than in astro.config.mjs so the `<Code>`
4+
component can be used from .astro files: that component requires the config
5+
to be serializable, and `themeCssSelector` is a function. */
6+
export default defineEcConfig({
7+
themes: ["github-light", "github-dark"],
8+
themeCssSelector: (theme) => {
9+
if (theme.name === "github-dark") return ".dark";
10+
return ":root:not(.dark)";
11+
},
12+
useDarkModeMediaQuery: false,
13+
styleOverrides: {
14+
borderRadius: "0.5rem",
15+
codeFontFamily: "'JetBrains Mono', monospace",
16+
codeFontSize: "0.875rem",
17+
codeLineHeight: "1.625",
18+
codePaddingBlock: "1rem",
19+
codePaddingInline: "1rem",
20+
borderColor: "hsl(var(--code-border))",
21+
codeBackground: "hsl(var(--code-bg))",
22+
frames: {
23+
editorTabBarBackground: "hsl(var(--code-header))",
24+
editorTabBarBorderBottomColor: "hsl(var(--code-border))",
25+
editorActiveTabBackground: "hsl(var(--code-bg))",
26+
editorActiveTabIndicatorTopColor: "hsl(var(--brand))",
27+
terminalTitlebarBackground: "hsl(var(--code-header))",
28+
terminalTitlebarBorderBottomColor: "hsl(var(--code-border))",
29+
terminalBackground: "hsl(var(--code-bg))",
30+
tooltipSuccessBackground: "hsl(var(--brand))",
31+
frameBoxShadowCssValue: "none",
32+
},
33+
},
34+
});

‎public/demo/hero.cast‎

Lines changed: 221 additions & 209 deletions
Large diffs are not rendered by default.

‎public/demo/hero.svg‎

Lines changed: 1 addition & 1 deletion
Loading
103 KB
Loading
104 KB
Loading
119 KB
Loading
117 KB
Loading

‎public/video/viewer-dark.mp4‎

2.84 MB
Binary file not shown.

‎public/video/viewer-light.mp4‎

2.73 MB
Binary file not shown.

0 commit comments

Comments
 (0)