Skip to content

Commit 91b9185

Browse files
chore: rename css files
1 parent 94e4d1a commit 91b9185

File tree

6 files changed

+394
-390
lines changed

6 files changed

+394
-390
lines changed

.storybook/preview.tsx

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import ThemeProvider from "@/components/ThemeProvider"
88
import i18n, { baseLocales } from "./i18next"
99

1010
import "../src/styles/global.css"
11-
import "../src/styles/main.css"
11+
import "../src/styles/fonts.css"
1212

1313
MotionGlobalConfig.skipAnimations = isChromatic()
1414

@@ -19,7 +19,6 @@ export const breakpointSet: [token: string, value: string][] = [
1919
["lg", "1024px"],
2020
["xl", "1280px"],
2121
["2xl", "1536px"],
22-
2322
]
2423

2524
const preview: Preview = {
@@ -30,16 +29,16 @@ const preview: Preview = {
3029
decorators: [
3130
withThemeByDataAttribute({
3231
themes: {
33-
light: 'light',
34-
dark: 'dark',
32+
light: "light",
33+
dark: "dark",
3534
},
36-
defaultTheme: 'light',
35+
defaultTheme: "light",
3736
}),
3837
(Story) => (
3938
<ThemeProvider>
4039
<Story />
4140
</ThemeProvider>
42-
)
41+
),
4342
],
4443
parameters: {
4544
i18n,
@@ -61,18 +60,23 @@ const preview: Preview = {
6160
layout: "centered",
6261
// Modify viewport selection to match Chakra breakpoints (or custom breakpoints)
6362
viewport: {
64-
viewports: breakpointSet.reduce<{ [token: string]: { name: string, styles: Record<'width' | 'height', string>} }>((arr, [token, value]) => {
63+
viewports: breakpointSet.reduce<{
64+
[token: string]: {
65+
name: string
66+
styles: Record<"width" | "height", string>
67+
}
68+
}>((arr, [token, value]) => {
6569
return {
6670
...arr,
6771
[token]: {
6872
name: token,
6973
styles: {
7074
width: value,
71-
height: "800px"
72-
}
73-
}
75+
height: "800px",
76+
},
77+
},
7478
}
75-
}, {})
79+
}, {}),
7680
},
7781
},
7882
}

components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"tsx": true,
66
"tailwind": {
77
"config": "tailwind.config.ts",
8-
"css": "src/styles/main.css",
8+
"css": "src/styles/global.css",
99
"baseColor": "neutral",
1010
"cssVariables": true,
1111
"prefix": ""

src/pages/_app.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import { init } from "@socialgouv/matomo-next"
44

55
import { AppPropsWithLayout } from "@/lib/types"
66

7-
import ThemeProvider from '@/components/ThemeProvider'
7+
import ThemeProvider from "@/components/ThemeProvider"
88

99
import "@/styles/global.css"
10-
import "@/styles/main.css"
10+
import "@/styles/fonts.css"
1111

1212
import { RootLayout } from "@/layouts/RootLayout"
1313

@@ -28,13 +28,13 @@ const App = ({ Component, pageProps }: AppPropsWithLayout) => {
2828
return (
2929
<>
3030
<ThemeProvider>
31-
<RootLayout
32-
contentIsOutdated={!!pageProps.frontmatter?.isOutdated}
33-
contentNotTranslated={pageProps.contentNotTranslated}
34-
lastDeployLocaleTimestamp={pageProps.lastDeployLocaleTimestamp}
35-
>
36-
{getLayout(<Component {...pageProps} />)}
37-
</RootLayout>
31+
<RootLayout
32+
contentIsOutdated={!!pageProps.frontmatter?.isOutdated}
33+
contentNotTranslated={pageProps.contentNotTranslated}
34+
lastDeployLocaleTimestamp={pageProps.lastDeployLocaleTimestamp}
35+
>
36+
{getLayout(<Component {...pageProps} />)}
37+
</RootLayout>
3838
</ThemeProvider>
3939
</>
4040
)

src/styles/fonts.css

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
/* css imported from https://fonts.googleapis.com/css2?family=Inter:wght@400;700 */
2+
3+
/* cyrillic-ext */
4+
@font-face {
5+
font-family: "Inter";
6+
font-style: normal;
7+
font-weight: 400;
8+
font-display: swap;
9+
src: url(/fonts/inter/cyrillic-ext.woff2) format("woff2");
10+
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
11+
U+FE2E-FE2F;
12+
}
13+
14+
/* cyrillic */
15+
@font-face {
16+
font-family: "Inter";
17+
font-style: normal;
18+
font-weight: 400;
19+
font-display: swap;
20+
src: url(/fonts/inter/cyrillic.woff2) format("woff2");
21+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
22+
}
23+
24+
/* greek-ext */
25+
@font-face {
26+
font-family: "Inter";
27+
font-style: normal;
28+
font-weight: 400;
29+
font-display: swap;
30+
src: url(/fonts/inter/greek-ext.woff2) format("woff2");
31+
unicode-range: U+1F00-1FFF;
32+
}
33+
34+
/* greek */
35+
@font-face {
36+
font-family: "Inter";
37+
font-style: normal;
38+
font-weight: 400;
39+
font-display: swap;
40+
src: url(/fonts/inter/greek.woff2) format("woff2");
41+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1,
42+
U+03A3-03FF;
43+
}
44+
45+
/* vietnamese */
46+
@font-face {
47+
font-family: "Inter";
48+
font-style: normal;
49+
font-weight: 400;
50+
font-display: swap;
51+
src: url(/fonts/inter/vietnamese.woff2) format("woff2");
52+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
53+
U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
54+
U+1EA0-1EF9, U+20AB;
55+
}
56+
57+
/* latin-ext */
58+
@font-face {
59+
font-family: "Inter";
60+
font-style: normal;
61+
font-weight: 400;
62+
font-display: swap;
63+
src: url(/fonts/inter/latin-ext.woff2) format("woff2");
64+
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
65+
U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
66+
}
67+
68+
/* latin */
69+
@font-face {
70+
font-family: "Inter";
71+
font-style: normal;
72+
font-weight: 400;
73+
font-display: swap;
74+
src: url(/fonts/inter/latin.woff2) format("woff2");
75+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
76+
U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
77+
U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
78+
}
79+
80+
/* cyrillic-ext */
81+
@font-face {
82+
font-family: "Inter";
83+
font-style: normal;
84+
font-weight: 700;
85+
font-display: swap;
86+
src: url(/fonts/inter/cyrillic-ext.woff2) format("woff2");
87+
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
88+
U+FE2E-FE2F;
89+
}
90+
91+
/* cyrillic */
92+
@font-face {
93+
font-family: "Inter";
94+
font-style: normal;
95+
font-weight: 700;
96+
font-display: swap;
97+
src: url(/fonts/inter/cyrillic.woff2) format("woff2");
98+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
99+
}
100+
101+
/* greek-ext */
102+
@font-face {
103+
font-family: "Inter";
104+
font-style: normal;
105+
font-weight: 700;
106+
font-display: swap;
107+
src: url(/fonts/inter/greek-ext.woff2) format("woff2");
108+
unicode-range: U+1F00-1FFF;
109+
}
110+
111+
/* greek */
112+
@font-face {
113+
font-family: "Inter";
114+
font-style: normal;
115+
font-weight: 700;
116+
font-display: swap;
117+
src: url(/fonts/inter/greek.woff2) format("woff2");
118+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1,
119+
U+03A3-03FF;
120+
}
121+
122+
/* vietnamese */
123+
@font-face {
124+
font-family: "Inter";
125+
font-style: normal;
126+
font-weight: 700;
127+
font-display: swap;
128+
src: url(/fonts/inter/vietnamese.woff2) format("woff2");
129+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
130+
U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
131+
U+1EA0-1EF9, U+20AB;
132+
}
133+
134+
/* latin-ext */
135+
@font-face {
136+
font-family: "Inter";
137+
font-style: normal;
138+
font-weight: 700;
139+
font-display: swap;
140+
src: url(/fonts/inter/latin-ext.woff2) format("woff2");
141+
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
142+
U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
143+
}
144+
145+
/* latin */
146+
@font-face {
147+
font-family: "Inter";
148+
font-style: normal;
149+
font-weight: 700;
150+
font-display: swap;
151+
src: url(/fonts/inter/latin.woff2) format("woff2");
152+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
153+
U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
154+
U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
155+
}

0 commit comments

Comments
 (0)