Skip to content

Commit 8747fc5

Browse files
committed
docs theme update & fixes
1 parent e5a4b50 commit 8747fc5

25 files changed

Lines changed: 361 additions & 752 deletions

astro.config.mjs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@ import starlightImageZoom from 'starlight-image-zoom';
66
import rehypeAstroRelativeMarkdownLinks from "astro-rehype-relative-markdown-links";
77
import starlightScrollToTop from 'starlight-scroll-to-top';
88
import starlightBlog from 'starlight-blog';
9-
import astroExpressiveCode from 'astro-expressive-code';
109

1110
const options = {
1211
collectionBase: false,
1312
};
1413

1514
export default defineConfig({
1615
integrations: [
17-
astroExpressiveCode({
18-
themes: ['material-theme'],
19-
}),
2016
starlight({
17+
expressiveCode: {
18+
themes: ['github-dark', 'dracula'],
19+
},
2120
title: '',
2221
favicon: '/favicon.svg',
2322
social: [
2423
{icon: 'github', label: 'GitHub', href: 'https://github.com/codeceptjs/CodeceptJS'},
2524
],
2625
components: {
2726
Head: "./src/components/Head.astro",
27+
PageFrame: "./src/components/PageFrame.astro",
2828
PageTitle: './src/components/PageTitle.astro',
2929
Footer: './src/components/Footer.astro',
3030
SiteTitle: './src/components/SiteTitle.astro',
@@ -171,7 +171,12 @@ export default defineConfig({
171171
],
172172
}),
173173
],
174-
vite: {plugins: [tailwindcss()]},
174+
vite: {
175+
plugins: [tailwindcss()],
176+
build: {
177+
assetsInlineLimit: 0,
178+
},
179+
},
175180
markdown: {
176181
rehypePlugins: [
177182
[rehypeAstroRelativeMarkdownLinks, options],

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"@tailwindcss/vite": "^4.1.17",
1717
"astro": "^5.16.4",
1818
"astro-breadcrumbs": "^3.3.1",
19-
"astro-expressive-code": "^0.41.3",
2019
"astro-rehype-relative-markdown-links": "0.18.1",
2120
"astro-vtbot": "^2.1.9",
2221
"meilisearch-docsearch": "^0.8.0",

pnpm-lock.yaml

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/Links.astro

Lines changed: 9 additions & 245 deletions
Large diffs are not rendered by default.

src/components/PageFrame.astro

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
import MobileMenuToggle from 'virtual:starlight/components/MobileMenuToggle';
3+
4+
const { hasSidebar } = Astro.locals.starlightRoute;
5+
const isHome = Astro.url.pathname === "/";
6+
---
7+
8+
<div class="page sl-flex">
9+
<header class={isHome ? "home-header header" : "header"} data-vtbot-replace="header">
10+
<slot name="header" />
11+
</header>
12+
{
13+
hasSidebar && (
14+
<nav class="sidebar print:hidden" aria-label={Astro.locals.t('sidebarNav.accessibleLabel')}>
15+
<MobileMenuToggle />
16+
<div id="starlight__sidebar" class="sidebar-pane">
17+
<div class="sidebar-content sl-flex">
18+
<slot name="sidebar" />
19+
</div>
20+
</div>
21+
</nav>
22+
)
23+
}
24+
<div class="main-frame"><slot /></div>
25+
</div>
26+
27+
<style>
28+
@layer starlight.core {
29+
.page {
30+
flex-direction: column;
31+
min-height: 100vh;
32+
}
33+
34+
.header {
35+
z-index: var(--sl-z-index-navbar);
36+
position: fixed;
37+
inset-inline-start: 0;
38+
inset-block-start: 0;
39+
width: 100%;
40+
height: var(--sl-nav-height);
41+
border-bottom: 1px solid var(--sl-color-hairline-shade);
42+
padding: var(--sl-nav-pad-y) var(--sl-nav-pad-x);
43+
padding-inline-end: var(--sl-nav-pad-x);
44+
background-color: var(--sl-color-bg-nav);
45+
}
46+
47+
:global([data-has-sidebar]) .header {
48+
padding-inline-end: calc(
49+
var(--sl-nav-gap) + var(--sl-nav-pad-x) + var(--sl-menu-button-size)
50+
);
51+
}
52+
53+
.sidebar-pane {
54+
visibility: var(--sl-sidebar-visibility, hidden);
55+
position: fixed;
56+
z-index: var(--sl-z-index-menu);
57+
inset-block: var(--sl-nav-height) 0;
58+
inset-inline-start: 0;
59+
width: 100%;
60+
background-color: var(--sl-color-black);
61+
overflow-y: auto;
62+
}
63+
64+
:global([aria-expanded='true']) ~ .sidebar-pane {
65+
--sl-sidebar-visibility: visible;
66+
}
67+
68+
.sidebar-content {
69+
height: 100%;
70+
min-height: max-content;
71+
padding: 1rem var(--sl-sidebar-pad-x) 0;
72+
flex-direction: column;
73+
gap: 1rem;
74+
}
75+
76+
@media (min-width: 50rem) {
77+
.sidebar-content::after {
78+
content: '';
79+
padding-bottom: 1px;
80+
}
81+
}
82+
83+
.main-frame {
84+
padding-top: calc(var(--sl-nav-height) + var(--sl-mobile-toc-height));
85+
padding-inline-start: var(--sl-content-inline-start);
86+
}
87+
88+
@media (min-width: 50rem) {
89+
:global([data-has-sidebar]) .header {
90+
padding-inline-end: var(--sl-nav-pad-x);
91+
}
92+
.sidebar-pane {
93+
--sl-sidebar-visibility: visible;
94+
width: var(--sl-sidebar-width);
95+
background-color: var(--sl-color-bg-sidebar);
96+
border-inline-end: 1px solid var(--sl-color-hairline-shade);
97+
}
98+
}
99+
}
100+
</style>

src/pages/home/components/ai/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
---
55

66
{/* AI-Powered Testing Section */}
7-
<section class="py-20 bg-gradient-to-b from-gray-50 to-gray-100 dark:from-gray-900 dark:to-gray-800 relative overflow-hidden">
7+
<section class="mt-0 py-20 bg-gradient-to-b from-gray-50 to-gray-100 dark:from-gray-900 dark:to-gray-800 relative overflow-hidden">
88
{/* Floating Background Elements */}
99
<div class="absolute inset-0">
1010
<div class="absolute top-20 left-10 w-72 h-72 bg-blue-500/20 dark:bg-blue-500/10 rounded-full blur-3xl animate-pulse"></div>

src/pages/home/components/community/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
---
33

44
{/* Community Section */}
5-
<section class="py-20 bg-white dark:bg-gray-900 transition-colors duration-300">
5+
<section class="mt-0 py-20 bg-white dark:bg-gray-900 transition-colors duration-300">
66
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
77
<div class="text-center mb-16">
88
<h2 class="text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-4">

src/pages/home/components/example/index.astro

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,10 @@ Scenario('Create a new store', async ({ I, login, SettingsPage }) => {
104104
</div>
105105
</div>
106106
</div>
107-
</section>
107+
</section>
108+
109+
<style is:global>
110+
.expressive-code pre {
111+
overflow: hidden !important;
112+
}
113+
</style>

src/pages/home/components/features/icons/_ai.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/pages/home/components/features/icons/_api.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)