Skip to content

Commit c604a29

Browse files
committed
run prettier
1 parent a48c551 commit c604a29

File tree

9 files changed

+75
-51
lines changed

9 files changed

+75
-51
lines changed

components/icons.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const Icon: FC<Props> = ({
1616
className = "",
1717
viewBox = DEFAULT_VIEW_BOX,
1818
width = "45",
19-
height = "45"
19+
height = "45",
2020
}) => (
2121
<span className={`icon ${className}`}>
2222
<svg
@@ -73,7 +73,12 @@ export function DiscordIcon({ className = "" }) {
7373

7474
export function LightThemeIcon({ className = "" }) {
7575
return (
76-
<Icon className={className} width={"24"} height={"24"} viewBox={"0 0 16 16"}>
76+
<Icon
77+
className={className}
78+
width={"24"}
79+
height={"24"}
80+
viewBox={"0 0 16 16"}
81+
>
7782
<path
7883
fill="#ffffff"
7984
d="M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"
@@ -84,7 +89,12 @@ export function LightThemeIcon({ className = "" }) {
8489

8590
export function DarkThemeIcon({ className = "" }) {
8691
return (
87-
<Icon className={className} width={"24"} height={"24"} viewBox={"0 0 24 24"}>
92+
<Icon
93+
className={className}
94+
width={"24"}
95+
height={"24"}
96+
viewBox={"0 0 24 24"}
97+
>
8898
<path
8999
fill="#ffffff"
90100
d="M12.0972 2.53039C12.2913 2.8649 12.2752 3.28136 12.0557 3.5998C11.3898 4.56594 11 5.73595 11 7.00002C11 10.3137 13.6863 13 17 13C18.2641 13 19.4341 12.6102 20.4002 11.9443C20.7187 11.7249 21.1351 11.7087 21.4696 11.9028C21.8041 12.0969 21.9967 12.4665 21.9642 12.8519C21.5313 17.9765 17.236 22 12 22C6.47715 22 2 17.5229 2 12C2 6.76398 6.02351 2.46874 11.1481 2.03585C11.5335 2.0033 11.9031 2.19588 12.0972 2.53039ZM9.42424 4.42352C6.26994 5.49553 4 8.48306 4 12C4 16.4183 7.58172 20 12 20C15.517 20 18.5045 17.7301 19.5765 14.5758C18.7676 14.8508 17.9008 15 17 15C12.5817 15 9 11.4183 9 7.00002C9 6.09922 9.1492 5.2324 9.42424 4.42352Z"

components/libs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const Lib: FC<{ lib: Library }> = ({ lib }) => (
4343
"is-half",
4444
"is-flex",
4545
"tk-lib",
46-
`tk-lib-${lib.id}`
46+
`tk-lib-${lib.id}`,
4747
)}
4848
>
4949
<div className="card">

components/menu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ function Level2({ href, menu }) {
122122
items.unshift(
123123
<li key={menu.key} className={className}>
124124
<a href={menu.href}>{menu.data.subtitle}</a>
125-
</li>
125+
</li>,
126126
);
127127
}
128128

components/stack.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ const Layer: FC<{ layer: StackLayer }> = ({ layer }) => (
123123
export default function Stack() {
124124
useEffect(() => {
125125
var stack = document.getElementsByClassName(
126-
"tk-stack-active"
126+
"tk-stack-active",
127127
) as HTMLCollectionOf<HTMLElement>;
128128
var links = document.querySelectorAll(".tk-stack .menu li");
129129
var lines = document.getElementById("tk-stack-lines");

components/toggle-theme.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ const ToggleTheme: React.FC = () => {
66
* Handles theme change
77
*/
88
const toggleTheme = () => {
9-
const THEME_KEY = 'data-theme';
9+
const THEME_KEY = "data-theme";
1010

1111
// getting current theme from body element
1212
const currentTheme = document.body.getAttribute(THEME_KEY);
1313

1414
// new theme, opposite to current theme
15-
const newTheme = currentTheme === 'light' ? 'dark' : 'light';
15+
const newTheme = currentTheme === "light" ? "dark" : "light";
1616

1717
// set new theme on body element
1818
document.body.setAttribute(THEME_KEY, newTheme);

lib/api.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const contentDir = path.join(process.cwd(), "content").replace(/\\/g, "/");
99

1010
// Merge app level props in with page props
1111
export function withAppProps(
12-
props: { props: Record<PropertyKey, unknown> } = { props: {} }
12+
props: { props: Record<PropertyKey, unknown> } = { props: {} },
1313
) {
1414
const blog = getLastBlog();
1515
delete blog.body;
@@ -108,7 +108,7 @@ function setPrevNext(page, menu) {
108108
}
109109
},
110110
undefined,
111-
undefined
111+
undefined,
112112
);
113113

114114
return page;
@@ -117,7 +117,7 @@ function setPrevNext(page, menu) {
117117
// Build a list of paths from the sitemap
118118
function collectPaths(
119119
level: Record<string, { nested?: string[]; href?: string }>,
120-
prefix = ""
120+
prefix = "",
121121
) {
122122
let out = [];
123123

lib/markdown.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,6 @@ export const toHTML = async (raw) => {
8787
.use(rehyperBlockquotePlus, rehyperBlockquotePlusOptions)
8888
// @ts-expect-error: unified's plugin type mistakenly selects the Array<void> union variant
8989
.use(rehypeStringify)
90-
.process(raw)
90+
.process(raw),
9191
);
9292
};

styles/dark-styles.scss

Lines changed: 37 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
/** COLOR VALUES */
2-
$surface-100: #1B1B1B; // For body background color
3-
$surface-200: #1F1F1F; // For cards, aside, sidebars background color
2+
$surface-100: #1b1b1b; // For body background color
3+
$surface-200: #1f1f1f; // For cards, aside, sidebars background color
44
$surface-250: #242424;
5-
$surface-300: #2D2D2D; // Navbar - For chips buttons, dropdowns background color
5+
$surface-300: #2d2d2d; // Navbar - For chips buttons, dropdowns background color
66
$surface-400: #353535; // For sidebars, navbar background color
7-
$surface-500: #3D3D3D; // For modal, dialogs background color
7+
$surface-500: #3d3d3d; // For modal, dialogs background color
88
$surface-600: #404040; // divider, hr, border
99
$surface-700: #696969; // For on background texts color | 267 0 41
1010

11-
$light-gray: #D6D6D6; // hover on secondary text
12-
$gray: #A0A0A0; // secondary text
11+
$light-gray: #d6d6d6; // hover on secondary text
12+
$gray: #a0a0a0; // secondary text
1313
$dark-gray: #939393; // code snippet text
1414

15-
$magenta-000: #C63995;
16-
$magenta-100: #DE46A9;
17-
$magenta-200: #E25AB2;
18-
$magenta-300: #E670BD;
15+
$magenta-000: #c63995;
16+
$magenta-100: #de46a9;
17+
$magenta-200: #e25ab2;
18+
$magenta-300: #e670bd;
1919

2020
$pure-white: #ffffff;
21-
$white: #F0F0F0; // text, title
21+
$white: #f0f0f0; // text, title
2222
$red: #e7544c;
2323
$orange: #f5a623;
24-
$black-pink: #211E21;
25-
$purple: #B284EB;
26-
$green: #81C42C;
27-
$yellow: #DDB218;
28-
$blue: #4197E3;
29-
$lightblue: #56A3E6;
24+
$black-pink: #211e21;
25+
$purple: #b284eb;
26+
$green: #81c42c;
27+
$yellow: #ddb218;
28+
$blue: #4197e3;
29+
$lightblue: #56a3e6;
3030

3131
// Each color is associated with a library
3232
$tk-lib-runtime: $magenta-200;
@@ -37,12 +37,16 @@ $tk-lib-mio: $red;
3737
$tk-lib-tracing: $purple;
3838
$tk-lib-bytes: $blue;
3939

40-
4140
// Per lib styling: [ name, bg-color, color, size, logo-adjust ]
42-
$libs: "tokio" $white $surface-100 3.8rem -60%, "runtime" $tk-lib-runtime $surface-100 2.2rem -22%,
43-
"hyper" $tk-lib-hyper $surface-100 100% -50%, "tonic" $tk-lib-tonic $surface-100 100% -25%,
44-
"tower" $tk-lib-tower $surface-100 100% -52%, "mio" $tk-lib-mio $surface-100 100% -41%,
45-
"tracing" $tk-lib-tracing $surface-100 100% -31%, "bytes" $tk-lib-bytes $surface-100 100% -30%;
41+
$libs:
42+
"tokio" $white $surface-100 3.8rem -60%,
43+
"runtime" $tk-lib-runtime $surface-100 2.2rem -22%,
44+
"hyper" $tk-lib-hyper $surface-100 100% -50%,
45+
"tonic" $tk-lib-tonic $surface-100 100% -25%,
46+
"tower" $tk-lib-tower $surface-100 100% -52%,
47+
"mio" $tk-lib-mio $surface-100 100% -41%,
48+
"tracing" $tk-lib-tracing $surface-100 100% -31%,
49+
"bytes" $tk-lib-bytes $surface-100 100% -30%;
4650

4751
body {
4852
background-color: $surface-100;
@@ -68,7 +72,8 @@ body {
6872
color: $magenta-200;
6973
}
7074
}
71-
.navbar-brand, .navbar-menu {
75+
.navbar-brand,
76+
.navbar-menu {
7277
background-color: $surface-400;
7378
}
7479
hr {
@@ -85,7 +90,8 @@ body {
8590
.hero {
8691
&.is-primary {
8792
background-color: $surface-200;
88-
.title, .subtitle {
93+
.title,
94+
.subtitle {
8995
color: $white;
9096
}
9197
}
@@ -96,14 +102,16 @@ body {
96102
.button:hover {
97103
background-color: $magenta-100;
98104
}
99-
.title, .subtitle {
105+
.title,
106+
.subtitle {
100107
color: $white;
101108
}
102109
}
103110
&.tk-users {
104111
background-color: $surface-100;
105112

106-
.title, .subtitle {
113+
.title,
114+
.subtitle {
107115
color: $white;
108116
}
109117

@@ -237,7 +245,6 @@ body {
237245
color: $magenta-200;
238246
}
239247
}
240-
241248
}
242249

243250
li.is-active {
@@ -281,7 +288,7 @@ body {
281288
.tk-markdown {
282289
.is-warning {
283290
background: $black-pink;
284-
color: $light-gray;// $magenta-100;
291+
color: $light-gray; // $magenta-100;
285292

286293
strong,
287294
code {
@@ -373,7 +380,8 @@ strong {
373380
*
374381
*/
375382

376-
pre, code {
383+
pre,
384+
code {
377385
background-color: $surface-250;
378386
}
379387

styles/styles.scss

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,15 @@ $tk-lib-tracing: $purple;
2323
$tk-lib-bytes: $blue;
2424

2525
// Per lib styling: [ name, color, size, logo-adjust ]
26-
$libs: "tokio" black 3.8rem -60%, "runtime" $tk-lib-runtime 2.2rem -22%,
27-
"hyper" $tk-lib-hyper 100% -50%, "tonic" $tk-lib-tonic 100% -25%,
28-
"tower" $tk-lib-tower 100% -52%, "mio" $tk-lib-mio 100% -41%,
29-
"tracing" $tk-lib-tracing 100% -31%, "bytes" $tk-lib-bytes 100% -30%;
26+
$libs:
27+
"tokio" black 3.8rem -60%,
28+
"runtime" $tk-lib-runtime 2.2rem -22%,
29+
"hyper" $tk-lib-hyper 100% -50%,
30+
"tonic" $tk-lib-tonic 100% -25%,
31+
"tower" $tk-lib-tower 100% -52%,
32+
"mio" $tk-lib-mio 100% -41%,
33+
"tracing" $tk-lib-tracing 100% -31%,
34+
"bytes" $tk-lib-bytes 100% -30%;
3035

3136
// Bulma color variables
3237
$primary: $cream;
@@ -127,7 +132,7 @@ a:active {
127132
font-family: inherit;
128133
padding: 0;
129134
-webkit-tap-highlight-color: transparent;
130-
135+
131136
// custom styles
132137
width: 100%;
133138
height: 100%;
@@ -136,17 +141,17 @@ a:active {
136141
align-items: center;
137142
justify-content: center;
138143
transition: background 200ms;
139-
144+
140145
&:hover {
141146
background-color: darken($dark-gray);
142147
}
143148
}
144149

145-
body[data-theme=dark] &__icon--light {
150+
body[data-theme="dark"] &__icon--light {
146151
display: none;
147152
}
148153

149-
body:not([data-theme=dark]) &__icon--dark {
154+
body:not([data-theme="dark"]) &__icon--dark {
150155
display: none;
151156
}
152157
}
@@ -222,7 +227,8 @@ a:active {
222227
margin-top: 0.5rem;
223228
}
224229
// Resetting reduced whitespace to normal
225-
&.navbar-text, &.navbar-icon {
230+
&.navbar-text,
231+
&.navbar-icon {
226232
padding: 0 1.5rem;
227233
}
228234
}
@@ -1123,7 +1129,7 @@ Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine
11231129
//#region Dark Theme Styles
11241130

11251131
// Applying dark theme when body has dark atribute, not matter the theme preference
1126-
body[data-theme=dark] {
1132+
body[data-theme="dark"] {
11271133
@import "./dark-styles.scss";
11281134
}
11291135

0 commit comments

Comments
 (0)