Skip to content

Commit

Permalink
feat: Enhance code block styling and add Expressive Code themes
Browse files Browse the repository at this point in the history
  • Loading branch information
yarlson committed Dec 25, 2024
1 parent 3124e58 commit 43ef12b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions www/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ export default defineConfig({
dark: "./src/assets/ftl-dark.svg",
replacesTitle: true,
},
expressiveCode: {
themes: ['catppuccin-mocha', 'catppuccin-latte'],
},
customCss: [
"@fontsource-variable/rubik",
"@fontsource-variable/roboto-mono",
Expand Down
Binary file modified www/bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@fontsource-variable/rubik": "^5.0.20",
"@fontsource/ibm-plex-mono": "^5.0.8",
"astro": "^5.0.2",
"astro-expressive-code": "^0.38.3",
"prettier": "^3.4.2",
"prettier-plugin-astro": "^0.14.1",
"sharp": "^0.32.5"
Expand Down
1 change: 1 addition & 0 deletions www/src/components/lander.astro
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ volumes:
wrap
lang="yaml"
code={code}
class="code-block"
frame="terminal"
themes={["tokyo-night", "light-plus"]}
title="ftl.yaml"
Expand Down
10 changes: 10 additions & 0 deletions www/src/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -534,3 +534,13 @@ dialog[aria-label="Search"]::backdrop {
opacity: 1;
}
}

.hero-code {
margin-top: 0 !important;
}

.code-block {
border: 1px solid var(--divider-color);
border-color: color-mix(in srgb, var(--divider-color) 40%, transparent);
box-shadow: var(--sl-shadow-lg);
}

0 comments on commit 43ef12b

Please sign in to comment.