Skip to content

Commit 339ea85

Browse files
authored
fix(site-2): styles (#8288)
1 parent 95c346c commit 339ea85

File tree

8 files changed

+939
-917
lines changed

8 files changed

+939
-917
lines changed

sites/svelte.dev/package-lock.json

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

sites/svelte.dev/package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"test": "uvu -r ts-node/register src/lib/server/markdown"
1717
},
1818
"dependencies": {
19-
"@supabase/supabase-js": "^2.7.1",
20-
"@sveltejs/repl": "^0.1.2",
19+
"@supabase/supabase-js": "^2.11.0",
20+
"@sveltejs/repl": "^0.2.0",
2121
"cookie": "^0.5.0",
2222
"devalue": "^4.3.0",
2323
"do-not-zip": "^1.0.0",
@@ -27,31 +27,31 @@
2727
"svelte-local-storage-store": "^0.4.0"
2828
},
2929
"devDependencies": {
30-
"@resvg/resvg-js": "^2.4.0",
30+
"@resvg/resvg-js": "^2.4.1",
3131
"@sveltejs/adapter-auto": "^2.0.0",
32-
"@sveltejs/kit": "^1.5.6",
32+
"@sveltejs/kit": "^1.12.0",
3333
"@sveltejs/site-kit": "^3.2.2",
34-
"@sveltejs/vite-plugin-svelte": "^2.0.2",
34+
"@sveltejs/vite-plugin-svelte": "^2.0.3",
3535
"@types/marked": "^4.0.8",
3636
"@types/prismjs": "^1.26.0",
3737
"degit": "^2.8.4",
3838
"dotenv": "^16.0.3",
39-
"jimp": "^0.22.4",
39+
"jimp": "^0.22.7",
4040
"marked": "^4.2.12",
41-
"node-fetch": "^3.3.0",
41+
"node-fetch": "^3.3.1",
4242
"prettier": "^2.8.4",
4343
"prettier-plugin-svelte": "^2.9.0",
4444
"prism-svelte": "^0.5.0",
4545
"prismjs": "^1.29.0",
46-
"satori": "^0.3.1",
46+
"satori": "^0.4.3",
4747
"satori-html": "^0.3.2",
4848
"shelljs": "^0.8.5",
4949
"shiki": "^0.14.1",
50-
"shiki-twoslash": "^3.1.0",
51-
"svelte": "^3.55.1",
52-
"svelte-check": "^3.0.3",
53-
"typescript": "^4.9.5",
54-
"vite": "^4.1.1",
50+
"shiki-twoslash": "^3.1.1",
51+
"svelte": "^3.57.0",
52+
"svelte-check": "^3.1.4",
53+
"typescript": "^5.0.2",
54+
"vite": "^4.2.0",
5555
"vite-imagetools": "^4.0.18"
5656
}
5757
}

sites/svelte.dev/src/routes/auth/callback/+server.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export async function GET({ url }) {
1212
stringify({
1313
code: url.searchParams.get('code'),
1414
client_id,
15-
client_secret
15+
client_secret,
1616
})
1717
);
1818
const access_token = new URLSearchParams(await r1.text()).get('access_token');
@@ -21,8 +21,8 @@ export async function GET({ url }) {
2121
const r2 = await fetch('https://api.github.com/user', {
2222
headers: {
2323
'User-Agent': 'svelte.dev',
24-
Authorization: `token ${access_token}`
25-
}
24+
Authorization: `token ${access_token}`,
25+
},
2626
});
2727

2828
const profile = await r2.json();
@@ -33,7 +33,7 @@ export async function GET({ url }) {
3333
github_id: profile.id,
3434
github_name: profile.name,
3535
github_login: profile.login,
36-
github_avatar_url: profile.avatar_url
36+
github_avatar_url: profile.avatar_url,
3737
};
3838

3939
const { sessionid, expires } = await session.create(user, access_token);
@@ -52,10 +52,10 @@ export async function GET({ url }) {
5252
expires: new Date(expires),
5353
path: '/',
5454
httpOnly: true,
55-
secure: url.protocol === 'https'
55+
secure: url.protocol === 'https',
5656
}),
57-
'Content-Type': 'text/html; charset=utf-8'
58-
}
57+
'Content-Type': 'text/html; charset=utf-8',
58+
},
5959
}
6060
);
6161
} catch (err) {

sites/svelte.dev/src/routes/docs/+layout.svelte

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</script>
1010
1111
<div class="container">
12-
<div class="page content ">
12+
<div class="page content">
1313
{#if title}
1414
<h1>{title}</h1>
1515
{/if}
@@ -24,7 +24,7 @@
2424
2525
<style>
2626
.container {
27-
--sidebar-menu-width: 20rem;
27+
--sidebar-menu-width: 28rem;
2828
--sidebar-width: var(--sidebar-menu-width);
2929
--ts-toggle-height: 4.2rem;
3030
}
@@ -38,13 +38,13 @@
3838
display: none;
3939
}
4040
41-
.content {
41+
/* .content {
4242
width: 100%;
4343
margin: 0;
4444
padding: var(--sk-page-padding-top) var(--sk-page-padding-side);
4545
tab-size: 2;
4646
-moz-tab-size: 2;
47-
}
47+
} */
4848
4949
@media (min-width: 832px) {
5050
/* can't use vars in @media :( */
@@ -229,34 +229,6 @@
229229
cursor: pointer;
230230
}
231231
232-
.content :global(blockquote) {
233-
color: var(--sk-text-1);
234-
background-color: rgba(255, 62, 0, 0.1);
235-
border-left: 4px solid var(--sk-theme-1-variant);
236-
padding: 1rem;
237-
}
238-
239-
.content :global(blockquote) :global(:first-child) {
240-
margin-top: 0;
241-
}
242-
243-
.content :global(blockquote) :global(:last-child) {
244-
margin-bottom: 0;
245-
}
246-
247-
.content :global(blockquote) :global(code) {
248-
background: var(--sk-code-bg);
249-
}
250-
251-
.content :global(section) :global(a):hover {
252-
text-decoration: underline;
253-
}
254-
255-
.content :global(section) :global(a) :global(code) {
256-
color: inherit;
257-
background: rgba(255, 62, 0, 0.1) !important;
258-
}
259-
260232
/* this replaces the offset-anchor hack, which we should remove from this CSS
261233
once https://github.com/sveltejs/action-deploy-docs/issues/1 is closed */
262234
.content :global(h2[id]),
@@ -289,7 +261,7 @@
289261
@media (min-width: 832px) {
290262
.toc-container {
291263
width: var(--sidebar-width);
292-
height: calc(100vh - var(--sk-nav-height) - var(--ts-toggle-height));
264+
height: calc(100vh - var(--sk-nav-height));
293265
position: fixed;
294266
left: 0;
295267
top: var(--sk-nav-height);
@@ -323,7 +295,7 @@
323295
324296
@media (min-width: 1200px) {
325297
.container {
326-
--sidebar-width: max(20rem, 18vw);
298+
--sidebar-width: max(28rem, 23vw);
327299
}
328300
329301
.page {

sites/svelte.dev/src/routes/docs/Contents.svelte

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
top: 0;
2828
left: 0;
2929
color: var(--sk-text-3);
30-
31-
display: grid;
32-
justify-content: center;
3330
}
3431
3532
.sidebar {
@@ -74,17 +71,21 @@
7471
color: var(--sk-text-1);
7572
}
7673
74+
ul ul li {
75+
margin: 0;
76+
}
77+
7778
@media (min-width: 600px) {
7879
.sidebar {
7980
columns: 2;
80-
padding-left: var(--sk-page-padding-side);
81+
/* padding-left: var(--sk-page-padding-side); */
8182
padding-right: var(--sk-page-padding-side);
8283
}
8384
}
8485
8586
@media (min-width: 700px) {
8687
.sidebar {
87-
/* columns: 3; */
88+
columns: 3;
8889
}
8990
}
9091

sites/svelte.dev/src/routes/docs/[slug]/+page.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
<title>{data.page.title} - Svelte</title>
1010
</svelte:head>
1111

12-
{@html data.page.content}
12+
<div class="text">
13+
{@html data.page.content}
14+
</div>
1315

1416
{#if data.page.sections.length !== 0}
1517
<OnThisPage details={data.page} />

sites/svelte.dev/src/routes/docs/[slug]/OnThisPage.svelte

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,14 @@
101101
position: fixed;
102102
padding: 0 var(--sk-page-padding-side) 0 0;
103103
width: min(280px, calc(var(--sidebar-width) - var(--sk-page-padding-side)));
104-
/* top: calc(var(--sk-page-padding-top) + var(--sk-nav-height)); */
105104
top: var(--sk-nav-height);
106105
left: calc(100vw - (var(--sidebar-width)));
107106
}
108107
109108
h2 {
110109
text-transform: uppercase;
111-
font-size: 1.4rem;
110+
font-size: 1.4rem !important;
112111
font-weight: 400;
113-
line-height: 0;
114112
margin: 0 0 1rem 0 !important;
115113
padding: 0 0 0 0.6rem;
116114
color: var(--sk-text-3);
@@ -125,8 +123,6 @@
125123
padding: 0.3rem 0.5rem;
126124
color: var(--sk-text-3);
127125
border-left: 2px solid transparent;
128-
129-
font-size: 1.3rem;
130126
}
131127
132128
a:hover {

sites/svelte.dev/src/routes/tutorial/[slug]/+page.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ import { redirect } from '@sveltejs/kit';
22
import { PUBLIC_API_BASE } from '$env/static/public';
33

44
export async function load({ fetch, params, setHeaders }) {
5+
// TODO: Use local data
56
const tutorial = await fetch(`${PUBLIC_API_BASE}/docs/svelte/tutorial/${params.slug}`);
67

78
if (!tutorial.ok) {
89
throw redirect(301, '/tutorial/basics');
910
}
1011

1112
setHeaders({
12-
'cache-control': 'public, max-age=60'
13+
'cache-control': 'public, max-age=60',
1314
});
1415

1516
return { tutorial: await tutorial.json(), slug: params.slug };

0 commit comments

Comments
 (0)