Skip to content

Commit c2ccbad

Browse files
authored
docs: add SQLStack parent branding to website (#1285)
Amp-Thread-ID: https://ampcode.com/threads/T-01a1970a-5e2e-7369-bbfe-0ff96af3a22f
1 parent db794dc commit c2ccbad

16 files changed

Lines changed: 270 additions & 11 deletions

File tree

‎.github/workflows/website.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ jobs:
4444
- name: Check links
4545
run: python3 scripts/check_links.py dist
4646

47+
- name: Install browser
48+
run: npx playwright install --with-deps chromium
49+
50+
- name: Check branding and responsive navigation
51+
run: npm test
52+
4753
- name: Upload site
4854
if: github.event_name != 'pull_request'
4955
uses: actions/upload-pages-artifact@v3

‎website/.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
node_modules/
22
dist/
33
.astro/
4+
test-results/
5+
playwright-report/

‎website/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ The SQLBuild website: the homepage at `/` and the documentation at `/docs/`, bui
66
- `src/content/docs/docs/`: the documentation pages (MDX), first ported from the Mintlify docs and now edited here. `src/navigation.mjs` holds the sidebar and redirects.
77
- `src/components/`: the page layout, header and page title, replacing Starlight's defaults. `src/components/mintlify/` has drop-in versions of the Mintlify components the pages use (`Card`, `CardGroup`, `Frame`, `Note`, `Warning`).
88
- `public/fonts/`: self-hosted fonts, each with its licence.
9+
- `public/brand.css`: shared SQLStack attribution styling for the homepage and docs. The SQLStack symbols in `public/assets/sqlstack*.png` are unchanged copies from `sqlstack-io/sqlstack` at revision `9b37b9e128d36930e1fe0c5880606525100b228b` (`assets/icons/sqlstack.png` and `sqlstack-dark.png`).
910

1011
Search uses Pagefind, and `llms.txt`, `llms-small.txt` and `llms-full.txt` are generated at build time.
1112

‎website/astro.config.mjs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export default defineConfig({
1818
},
1919
favicon: '/favicon.png',
2020
head: [
21+
{ tag: 'link', attrs: { rel: 'stylesheet', href: '/brand.css' } },
2122
{ tag: 'meta', attrs: { property: 'og:image', content: 'https://sqlbuild.com/assets/og-sqlbuild-docs.png' } },
2223
{ tag: 'meta', attrs: { property: 'og:image:width', content: '1200' } },
2324
{ tag: 'meta', attrs: { property: 'og:image:height', content: '630' } },
@@ -35,6 +36,7 @@ export default defineConfig({
3536
SiteTitle: './src/components/SiteTitle.astro',
3637
Pagination: './src/components/Pagination.astro',
3738
ThemeSelect: './src/components/ThemeSelect.astro',
39+
Footer: './src/components/Footer.astro',
3840
},
3941
customCss: ['./src/styles/fonts.css', './src/styles/sqlbuild.css'],
4042
expressiveCode: {

‎website/package-lock.json‎

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

‎website/package.json‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@
88
"scripts": {
99
"dev": "astro dev",
1010
"build": "astro build",
11-
"preview": "astro preview"
11+
"preview": "astro preview",
12+
"test": "playwright test"
1213
},
1314
"dependencies": {
1415
"@astrojs/starlight": "^0.42.4",
1516
"@lucide/astro": "^1.48.0",
1617
"astro": "^7.3.5",
1718
"sharp": "^0.35.4",
1819
"starlight-llms-txt": "^0.12.0"
20+
},
21+
"devDependencies": {
22+
"@playwright/test": "^1.64.1"
1923
}
2024
}

‎website/playwright.config.mjs‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineConfig } from '@playwright/test';
2+
3+
export default defineConfig({
4+
testDir: './tests',
5+
use: {
6+
baseURL: process.env.SITE_URL || 'http://127.0.0.1:4174',
7+
deviceScaleFactor: 2,
8+
launchOptions: process.env.CHROME_PATH ? { executablePath: process.env.CHROME_PATH } : {},
9+
},
10+
webServer: process.env.SITE_URL ? undefined : {
11+
command: 'npm run preview -- --host 127.0.0.1 --port 4174 --ignore-lock',
12+
url: 'http://127.0.0.1:4174',
13+
},
14+
});
5.24 KB
Loading

‎website/public/assets/sqlstack.png‎

5.09 KB
Loading

‎website/public/brand.css‎

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/* Shared attribution for the static homepage and Starlight documentation. */
2+
.brand-group {
3+
display: grid;
4+
flex-shrink: 0;
5+
}
6+
7+
.brand-byline {
8+
display: flex;
9+
align-items: center;
10+
min-height: 24px;
11+
/* The wordmark starts at x=447 in the unchanged 1626px-wide lockup. */
12+
margin-inline-start: 27.5%;
13+
color: var(--sqb-muted, var(--muted-foreground));
14+
font-size: 11px;
15+
line-height: 14px;
16+
text-decoration: none;
17+
white-space: nowrap;
18+
}
19+
20+
.sqlstack-family {
21+
display: flex;
22+
flex-wrap: wrap;
23+
align-items: center;
24+
justify-content: space-between;
25+
gap: 16px;
26+
margin-top: 20px;
27+
padding-top: 20px;
28+
border-top: 1px solid var(--sqb-line, var(--inner-line));
29+
font-size: 13px;
30+
}
31+
32+
.sqlstack-parent {
33+
display: inline-flex;
34+
align-items: center;
35+
gap: 10px;
36+
}
37+
38+
.sqlstack-parent img {
39+
width: 28px;
40+
height: auto;
41+
}
42+
43+
.sqlstack-for-dark,
44+
:root[data-theme='dark'] .sqlstack-for-light {
45+
display: none;
46+
}
47+
48+
:root[data-theme='dark'] .sqlstack-for-dark {
49+
display: block;
50+
}
51+
52+
.sqlstack-products {
53+
display: flex;
54+
flex-wrap: wrap;
55+
gap: 8px 20px;
56+
}
57+
58+
.sqlstack-family a {
59+
color: var(--sqb-muted, var(--muted-foreground));
60+
text-decoration: none;
61+
}
62+
63+
.brand-byline:hover,
64+
.sqlstack-family a:hover {
65+
color: var(--sqb-fg, var(--foreground));
66+
text-decoration: underline;
67+
}

0 commit comments

Comments
 (0)