Skip to content

Commit 3db9f09

Browse files
committed
style: format code with prettier
1 parent 5c888dd commit 3db9f09

File tree

19 files changed

+670
-575
lines changed

19 files changed

+670
-575
lines changed

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"tabWidth": 4,
3+
"useTabs": true,
4+
"trailingComma": "es5",
5+
"singleQuote": false,
6+
"semi": true,
7+
"vueIndentScriptAndStyle": false
8+
}

docs/.vitepress/config.ts

Lines changed: 126 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -1,137 +1,139 @@
1-
import { defineConfig } from 'vitepress';
1+
import { defineConfig } from "vitepress";
22

3-
const socialHandle = "@devhenryhale"
4-
const ogUrl = 'https://mathflow.js.org';
3+
const socialHandle = "@devhenryhale";
4+
const ogUrl = "https://mathflow.js.org";
55
const ogImage = `${ogUrl}/og-image.png`;
6-
const desc = 'A lightweight and expressive scripting language designed for mathematical expressions and calculations.'
6+
const desc =
7+
"A lightweight and expressive scripting language designed for mathematical expressions and calculations.";
78

89
// https://vitepress.dev/reference/site-config
910
export default defineConfig({
10-
base: '/',
11-
lang: 'en-US',
12-
title: 'MathFlow',
13-
description: desc,
14-
head: [
15-
['link', { rel: 'icon', href: '/logo.svg' }],
16-
['meta', { name: 'theme-color', content: '#4169e1' }],
17-
['meta', { property: 'og:type', content: 'website' }],
18-
['meta', { property: 'og:title', content: 'MathFlow' }],
19-
['meta', { property: 'og:image', content: ogImage }],
20-
['meta', { property: 'og:url', content: ogUrl }],
21-
['meta', { property: 'og:description', content: desc }],
22-
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
23-
['meta', { name: 'twitter:site', content: socialHandle }],
24-
['meta', { name: 'twitter:title', content: 'MathFlow' }],
25-
['meta', { name: 'twitter:description', content: desc }],
26-
['meta', { name: 'twitter:image', content: ogImage }]
27-
],
28-
themeConfig: {
29-
// https://vitepress.dev/reference/default-theme-config
30-
logo: '/logo.svg',
31-
siteTitle: 'MathFlow',
11+
base: "/",
12+
lang: "en-US",
13+
title: "MathFlow",
14+
description: desc,
15+
head: [
16+
["link", { rel: "icon", href: "/logo.svg" }],
17+
["meta", { name: "theme-color", content: "#4169e1" }],
18+
["meta", { property: "og:type", content: "website" }],
19+
["meta", { property: "og:title", content: "MathFlow" }],
20+
["meta", { property: "og:image", content: ogImage }],
21+
["meta", { property: "og:url", content: ogUrl }],
22+
["meta", { property: "og:description", content: desc }],
23+
["meta", { name: "twitter:card", content: "summary_large_image" }],
24+
["meta", { name: "twitter:site", content: socialHandle }],
25+
["meta", { name: "twitter:title", content: "MathFlow" }],
26+
["meta", { name: "twitter:description", content: desc }],
27+
["meta", { name: "twitter:image", content: ogImage }],
28+
],
29+
themeConfig: {
30+
// https://vitepress.dev/reference/default-theme-config
31+
logo: "/logo.svg",
32+
siteTitle: "MathFlow",
3233

33-
search: {
34-
provider: 'local',
35-
options: {
36-
detailedView: true,
37-
miniSearch: {
38-
searchOptions: {
39-
fuzzy: 0.2,
40-
prefix: true,
41-
boost: {
42-
title: 4,
43-
text: 2,
44-
titles: 1
45-
}
46-
}
47-
}
48-
}
49-
},
34+
search: {
35+
provider: "local",
36+
options: {
37+
detailedView: true,
38+
miniSearch: {
39+
searchOptions: {
40+
fuzzy: 0.2,
41+
prefix: true,
42+
boost: {
43+
title: 4,
44+
text: 2,
45+
titles: 1,
46+
},
47+
},
48+
},
49+
},
50+
},
5051

51-
outline: {
52-
label: 'On this page',
53-
level: [2, 3]
54-
},
55-
nav: [
56-
{ text: 'Home', link: '/' },
57-
{ text: 'Guide', link: '/guide/' },
58-
{ text: 'API', link: '/api/' },
59-
{ text: 'Examples', link: '/examples/' },
60-
{ text: 'Playground', link: '/playground/' },
61-
{
62-
text: 'v1.0.0',
63-
items: [
64-
{
65-
text: 'Changelog',
66-
link: 'https://github.com/mathflowjs/mathflow/blob/main/CHANGELOG.md'
67-
},
68-
{
69-
text: 'Contributing',
70-
link: 'https://github.com/mathflowjs/mathflow/#contributing'
71-
},
72-
{ text: 'Team', link: '/about' },
73-
]
74-
}
75-
],
52+
outline: {
53+
label: "On this page",
54+
level: [2, 3],
55+
},
56+
nav: [
57+
{ text: "Home", link: "/" },
58+
{ text: "Guide", link: "/guide/" },
59+
{ text: "API", link: "/api/" },
60+
{ text: "Examples", link: "/examples/" },
61+
{ text: "Playground", link: "/playground/" },
62+
{
63+
text: "v1.0.0",
64+
items: [
65+
{
66+
text: "Changelog",
67+
link: "https://github.com/mathflowjs/mathflow/blob/main/CHANGELOG.md",
68+
},
69+
{
70+
text: "Contributing",
71+
link: "https://github.com/mathflowjs/mathflow/#contributing",
72+
},
73+
{ text: "Team", link: "/about" },
74+
],
75+
},
76+
],
7677

77-
sidebar: [
78-
{
79-
text: 'Introduction',
80-
collapsed: false,
81-
items: [
82-
{ text: 'What is MathFlow?', link: '/guide/' },
83-
{ text: 'Getting Started', link: '/guide/getting-started' },
84-
]
85-
},
86-
{
87-
text: 'Core Concepts',
88-
collapsed: false,
89-
items: [
90-
{ text: 'Basics', link: '/guide/basics' },
91-
{ text: 'Variables', link: '/guide/variables' },
92-
{ text: 'Expressions', link: '/guide/expressions' },
93-
{ text: 'Built-in Functions', link: '/guide/builtin' }
94-
]
95-
},
96-
{
97-
text: 'API Reference',
98-
collapsed: false,
99-
items: [
100-
{ text: 'Context API', link: '/api/' },
101-
{ text: 'Procedural API', link: '/api/procedural' },
102-
{ text: 'Error Handling', link: '/api/errors' },
103-
{ text: 'Rendering', link: '/api/rendering' },
104-
]
105-
},
106-
{
107-
text: 'Showcase',
108-
collapsed: false,
109-
items: [
110-
{ text: 'Examples', link: '/examples/' },
111-
]
112-
},
113-
],
78+
sidebar: [
79+
{
80+
text: "Introduction",
81+
collapsed: false,
82+
items: [
83+
{ text: "What is MathFlow?", link: "/guide/" },
84+
{ text: "Getting Started", link: "/guide/getting-started" },
85+
],
86+
},
87+
{
88+
text: "Core Concepts",
89+
collapsed: false,
90+
items: [
91+
{ text: "Basics", link: "/guide/basics" },
92+
{ text: "Variables", link: "/guide/variables" },
93+
{ text: "Expressions", link: "/guide/expressions" },
94+
{ text: "Built-in Functions", link: "/guide/builtin" },
95+
],
96+
},
97+
{
98+
text: "API Reference",
99+
collapsed: false,
100+
items: [
101+
{ text: "Context API", link: "/api/" },
102+
{ text: "Procedural API", link: "/api/procedural" },
103+
{ text: "Error Handling", link: "/api/errors" },
104+
{ text: "Rendering", link: "/api/rendering" },
105+
],
106+
},
107+
{
108+
text: "Showcase",
109+
collapsed: false,
110+
items: [{ text: "Examples", link: "/examples/" }],
111+
},
112+
],
114113

115-
socialLinks: [
116-
{ icon: 'github', link: 'https://github.com/mathflowjs/mathflow' }
117-
],
114+
socialLinks: [
115+
{ icon: "github", link: "https://github.com/mathflowjs/mathflow" },
116+
],
118117

119-
editLink: {
120-
text: 'Edit this page on GitHub',
121-
pattern: 'https://github.com/mathflowjs/mathflowjs.github.io/edit/main/docs/:path'
122-
},
118+
editLink: {
119+
text: "Edit this page on GitHub",
120+
pattern:
121+
"https://github.com/mathflowjs/mathflowjs.github.io/edit/main/docs/:path",
122+
},
123123

124-
footer: {
125-
message: 'Released under the <a href="https://github.com/mathflowjs/mathflow/blob/master/LICENSE.txt">MIT License</a>.',
126-
copyright: 'Copyright &copy; 2024-present, <a href="https://github.com/henryhale">Henry Hale</a>.'
127-
}
128-
},
124+
footer: {
125+
message:
126+
'Released under the <a href="https://github.com/mathflowjs/mathflow/blob/master/LICENSE.txt">MIT License</a>.',
127+
copyright:
128+
'Copyright &copy; 2024-present, <a href="https://github.com/henryhale">Henry Hale</a>.',
129+
},
130+
},
129131

130-
markdown: {
131-
lineNumbers: false,
132-
theme: {
133-
light: 'github-light',
134-
dark: 'github-dark'
135-
},
136-
},
132+
markdown: {
133+
lineNumbers: false,
134+
theme: {
135+
light: "github-light",
136+
dark: "github-dark",
137+
},
138+
},
137139
});
Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
:root {
2-
--vp-c-brand-1: #4169e1;
3-
--vp-c-brand-2: #747bff;
4-
--vp-home-hero-image-background-image: linear-gradient(180deg, var(--vp-home-hero-name-color), var(--vp-home-hero-name-color));
5-
--vp-home-hero-image-filter: blur(40px);
2+
--vp-c-brand-1: #4169e1;
3+
--vp-c-brand-2: #747bff;
4+
--vp-home-hero-image-background-image: linear-gradient(
5+
180deg,
6+
var(--vp-home-hero-name-color),
7+
var(--vp-home-hero-name-color)
8+
);
9+
--vp-home-hero-image-filter: blur(40px);
610
}
711

812
.VPImage {
9-
border-radius: 5px;
13+
border-radius: 5px;
1014
}
1115

1216
.VPImage.image-src {
13-
width: min(25vw, 250px);
14-
height: min(25vw, 250px);
17+
width: min(25vw, 250px);
18+
height: min(25vw, 250px);
1519
}
1620

1721
.image-src {
18-
border-radius: 20px;
22+
border-radius: 20px;
1923
}
2024

2125
.dark .vp-doc .custom-block a {
22-
transition: color 0.25s;
23-
}
26+
transition: color 0.25s;
27+
}

0 commit comments

Comments
 (0)