Skip to content

Commit 9bc8e29

Browse files
committed
feat: remove google fonts
1 parent 6954f05 commit 9bc8e29

14 files changed

+75
-274
lines changed

assets/fonts.css

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
@font-face {
2+
font-family: "Alfa Slab One";
3+
font-style: normal;
4+
font-weight: 400;
5+
font-display: swap;
6+
src: url(./fonts/AlfaSlabOne-Regular.woff2) format("woff2");
7+
}
8+
@font-face {
9+
font-family: 'Inter';
10+
font-style: normal;
11+
font-weight: 400;
12+
font-display: swap;
13+
src: url('./fonts/Inter-Regular.woff2') format('woff2'); /* Legacy iOS */
14+
}
15+
@font-face {
16+
font-family: 'Inter';
17+
font-style: normal;
18+
font-weight: 300;
19+
font-display: swap;
20+
src: url('./fonts/Inter-300.woff2') format('woff2');
21+
}
22+
@font-face {
23+
font-family: 'Inter';
24+
font-style: normal;
25+
font-weight: 500;
26+
font-display: swap;
27+
src: url('./fonts/Inter-500.woff2') format('woff2');
28+
}
29+
@font-face {
30+
font-family: 'Inter';
31+
font-style: normal;
32+
font-weight: 600;
33+
font-display: swap;
34+
src: url('./fonts/Inter-600.woff2') format('woff2');
35+
}
36+
@font-face {
37+
font-family: 'Work Sans';
38+
font-style: normal;
39+
font-weight: 400;
40+
font-display: swap;
41+
src: url('./fonts/Work-Sans-Regular.woff2') format('woff2');
42+
}
43+
@font-face {
44+
font-family: 'Work Sans';
45+
font-style: normal;
46+
font-weight: 300;
47+
font-display: swap;
48+
src: url('./fonts/Work-Sans-300.woff2') format('woff2');
49+
}
50+
@font-face {
51+
font-family: 'Work Sans';
52+
font-style: normal;
53+
font-weight: 500;
54+
font-display: swap;
55+
src: url('./fonts/Work-Sans-500.woff2') format('woff2');
56+
}
57+
@font-face {
58+
font-family: 'Work Sans';
59+
font-style: normal;
60+
font-weight: 600;
61+
font-display: swap;
62+
src: url('./fonts/Work-Sans-600.woff2') format('woff2');
63+
}
17.5 KB
Binary file not shown.

assets/fonts/Inter-300.woff2

46.3 KB
Binary file not shown.

assets/fonts/Inter-500.woff2

47 KB
Binary file not shown.

assets/fonts/Inter-600.woff2

47.3 KB
Binary file not shown.

assets/fonts/Inter-Regular.woff2

43.5 KB
Binary file not shown.

assets/fonts/Work-Sans-300.woff2

30.8 KB
Binary file not shown.

assets/fonts/Work-Sans-500.woff2

31 KB
Binary file not shown.

assets/fonts/Work-Sans-600.woff2

31.5 KB
Binary file not shown.

assets/fonts/Work-Sans-Regular.woff2

29.5 KB
Binary file not shown.

input.css

-265
Original file line numberDiff line numberDiff line change
@@ -2,271 +2,6 @@
22
@tailwind components;
33
@tailwind utilities;
44

5-
/* vietnamese */
6-
@font-face {
7-
font-family: "Alfa Slab One";
8-
font-style: normal;
9-
font-weight: 400;
10-
font-display: swap;
11-
src: url(https://fonts.gstatic.com/s/alfaslabone/v17/6NUQ8FmMKwSEKjnm5-4v-4Jh2d1he-Wv.woff2)
12-
format("woff2");
13-
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
14-
U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
15-
U+1EA0-1EF9, U+20AB;
16-
}
17-
/* latin-ext */
18-
@font-face {
19-
font-family: "Alfa Slab One";
20-
font-style: normal;
21-
font-weight: 400;
22-
font-display: swap;
23-
src: url(https://fonts.gstatic.com/s/alfaslabone/v17/6NUQ8FmMKwSEKjnm5-4v-4Jh2dxhe-Wv.woff2)
24-
format("woff2");
25-
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
26-
U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
27-
}
28-
/* latin */
29-
@font-face {
30-
font-family: "Alfa Slab One";
31-
font-style: normal;
32-
font-weight: 400;
33-
font-display: swap;
34-
src: url(https://fonts.gstatic.com/s/alfaslabone/v17/6NUQ8FmMKwSEKjnm5-4v-4Jh2dJhew.woff2)
35-
format("woff2");
36-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
37-
U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
38-
U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
39-
}
40-
41-
/* cyrillic-ext */
42-
@font-face {
43-
font-family: "Fira Sans";
44-
font-style: normal;
45-
font-weight: 400;
46-
font-display: swap;
47-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9E4kDNxMZdWfMOD5VvmojLeTY.woff2)
48-
format("woff2");
49-
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
50-
U+FE2E-FE2F;
51-
}
52-
/* cyrillic */
53-
@font-face {
54-
font-family: "Fira Sans";
55-
font-style: normal;
56-
font-weight: 400;
57-
font-display: swap;
58-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9E4kDNxMZdWfMOD5Vvk4jLeTY.woff2)
59-
format("woff2");
60-
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
61-
}
62-
/* greek-ext */
63-
@font-face {
64-
font-family: "Fira Sans";
65-
font-style: normal;
66-
font-weight: 400;
67-
font-display: swap;
68-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9E4kDNxMZdWfMOD5Vvm4jLeTY.woff2)
69-
format("woff2");
70-
unicode-range: U+1F00-1FFF;
71-
}
72-
/* greek */
73-
@font-face {
74-
font-family: "Fira Sans";
75-
font-style: normal;
76-
font-weight: 400;
77-
font-display: swap;
78-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9E4kDNxMZdWfMOD5VvlIjLeTY.woff2)
79-
format("woff2");
80-
unicode-range: U+0370-03FF;
81-
}
82-
/* vietnamese */
83-
@font-face {
84-
font-family: "Fira Sans";
85-
font-style: normal;
86-
font-weight: 400;
87-
font-display: swap;
88-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9E4kDNxMZdWfMOD5VvmIjLeTY.woff2)
89-
format("woff2");
90-
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
91-
U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
92-
U+1EA0-1EF9, U+20AB;
93-
}
94-
/* latin-ext */
95-
@font-face {
96-
font-family: "Fira Sans";
97-
font-style: normal;
98-
font-weight: 400;
99-
font-display: swap;
100-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9E4kDNxMZdWfMOD5VvmYjLeTY.woff2)
101-
format("woff2");
102-
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
103-
U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
104-
}
105-
/* latin */
106-
@font-face {
107-
font-family: "Fira Sans";
108-
font-style: normal;
109-
font-weight: 400;
110-
font-display: swap;
111-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9E4kDNxMZdWfMOD5Vvl4jL.woff2)
112-
format("woff2");
113-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
114-
U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
115-
U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
116-
}
117-
/* cyrillic-ext */
118-
@font-face {
119-
font-family: "Fira Sans";
120-
font-style: normal;
121-
font-weight: 500;
122-
font-display: swap;
123-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9B4kDNxMZdWfMOD5VnZKveSxf6TF0.woff2)
124-
format("woff2");
125-
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
126-
U+FE2E-FE2F;
127-
}
128-
/* cyrillic */
129-
@font-face {
130-
font-family: "Fira Sans";
131-
font-style: normal;
132-
font-weight: 500;
133-
font-display: swap;
134-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9B4kDNxMZdWfMOD5VnZKveQhf6TF0.woff2)
135-
format("woff2");
136-
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
137-
}
138-
/* greek-ext */
139-
@font-face {
140-
font-family: "Fira Sans";
141-
font-style: normal;
142-
font-weight: 500;
143-
font-display: swap;
144-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9B4kDNxMZdWfMOD5VnZKveShf6TF0.woff2)
145-
format("woff2");
146-
unicode-range: U+1F00-1FFF;
147-
}
148-
/* greek */
149-
@font-face {
150-
font-family: "Fira Sans";
151-
font-style: normal;
152-
font-weight: 500;
153-
font-display: swap;
154-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9B4kDNxMZdWfMOD5VnZKveRRf6TF0.woff2)
155-
format("woff2");
156-
unicode-range: U+0370-03FF;
157-
}
158-
/* vietnamese */
159-
@font-face {
160-
font-family: "Fira Sans";
161-
font-style: normal;
162-
font-weight: 500;
163-
font-display: swap;
164-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9B4kDNxMZdWfMOD5VnZKveSRf6TF0.woff2)
165-
format("woff2");
166-
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
167-
U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
168-
U+1EA0-1EF9, U+20AB;
169-
}
170-
/* latin-ext */
171-
@font-face {
172-
font-family: "Fira Sans";
173-
font-style: normal;
174-
font-weight: 500;
175-
font-display: swap;
176-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9B4kDNxMZdWfMOD5VnZKveSBf6TF0.woff2)
177-
format("woff2");
178-
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
179-
U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
180-
}
181-
/* latin */
182-
@font-face {
183-
font-family: "Fira Sans";
184-
font-style: normal;
185-
font-weight: 500;
186-
font-display: swap;
187-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9B4kDNxMZdWfMOD5VnZKveRhf6.woff2)
188-
format("woff2");
189-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
190-
U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
191-
U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
192-
}
193-
/* cyrillic-ext */
194-
@font-face {
195-
font-family: "Fira Sans";
196-
font-style: normal;
197-
font-weight: 600;
198-
font-display: swap;
199-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9B4kDNxMZdWfMOD5VnSKzeSxf6TF0.woff2)
200-
format("woff2");
201-
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
202-
U+FE2E-FE2F;
203-
}
204-
/* cyrillic */
205-
@font-face {
206-
font-family: "Fira Sans";
207-
font-style: normal;
208-
font-weight: 600;
209-
font-display: swap;
210-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9B4kDNxMZdWfMOD5VnSKzeQhf6TF0.woff2)
211-
format("woff2");
212-
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
213-
}
214-
/* greek-ext */
215-
@font-face {
216-
font-family: "Fira Sans";
217-
font-style: normal;
218-
font-weight: 600;
219-
font-display: swap;
220-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9B4kDNxMZdWfMOD5VnSKzeShf6TF0.woff2)
221-
format("woff2");
222-
unicode-range: U+1F00-1FFF;
223-
}
224-
/* greek */
225-
@font-face {
226-
font-family: "Fira Sans";
227-
font-style: normal;
228-
font-weight: 600;
229-
font-display: swap;
230-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9B4kDNxMZdWfMOD5VnSKzeRRf6TF0.woff2)
231-
format("woff2");
232-
unicode-range: U+0370-03FF;
233-
}
234-
/* vietnamese */
235-
@font-face {
236-
font-family: "Fira Sans";
237-
font-style: normal;
238-
font-weight: 600;
239-
font-display: swap;
240-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9B4kDNxMZdWfMOD5VnSKzeSRf6TF0.woff2)
241-
format("woff2");
242-
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
243-
U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
244-
U+1EA0-1EF9, U+20AB;
245-
}
246-
/* latin-ext */
247-
@font-face {
248-
font-family: "Fira Sans";
249-
font-style: normal;
250-
font-weight: 600;
251-
font-display: swap;
252-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9B4kDNxMZdWfMOD5VnSKzeSBf6TF0.woff2)
253-
format("woff2");
254-
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
255-
U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
256-
}
257-
/* latin */
258-
@font-face {
259-
font-family: "Fira Sans";
260-
font-style: normal;
261-
font-weight: 600;
262-
font-display: swap;
263-
src: url(https://fonts.gstatic.com/s/firasans/v17/va9B4kDNxMZdWfMOD5VnSKzeRhf6.woff2)
264-
format("woff2");
265-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
266-
U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
267-
U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
268-
}
269-
2705
.custom-shape-divider-top-1692767000 {
2716
width: 100%;
2727
overflow: hidden;

src/app.rs

+6-7
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,17 @@ use crate::{
1111
pub fn App() -> impl IntoView {
1212
// Provides context that manages stylesheets, titles, meta tags, etc.
1313
provide_meta_context();
14+
let assets_folder = if cfg!(debug_assertions) {
15+
"./assets"
16+
} else {
17+
"."
18+
};
1419

1520
view! {
1621
<Html lang="es"/>
1722
<Meta charset="utf-8"/>
1823
<Meta name="viewport" content="width=device-width, initial-scale=1"/>
24+
<Stylesheet id="fonts" href=format!("{}/fonts.css", assets_folder)/>
1925
<Stylesheet id="leptos" href="/pkg/leptos_start.css"/>
2026
<Title text="Rust Lang en Español"/>
2127
<Meta
@@ -39,13 +45,6 @@ pub fn App() -> impl IntoView {
3945
content="OntIe2SKuQalaapGvxdded9tU4G2p57h0A6e0Rkoni0"
4046
/>
4147

42-
<Link rel="preconnect" href="https://fonts.googleapis.com"/>
43-
<Link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous"/>
44-
<Link
45-
rel="stylesheet"
46-
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Work+Sans:wght@300;400;500;600&display=swap"
47-
/>
48-
4948
<Body class="bg-orange-200"/>
5049
<Router>
5150
<Header/>

src/components/header.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,19 @@ use crate::components::ButtonLink;
66
pub fn Header(
77
) -> impl IntoView {
88
let (is_open, set_is_open) = create_signal(false);
9+
let assets_folder = if cfg!(debug_assertions) {
10+
"./assets"
11+
}else {
12+
"."
13+
};
914

1015
view! {
1116
<header class="border-b border-b-black/20">
1217
<div class="container mx-auto px-4 flex items-center justify-between flex-col lg:flex-row">
1318
<div class="flex justify-between w-full lg:w-auto">
1419
<a href="/" exact=true class="flex items-center gap-x-4">
1520
<img
16-
src="https://www.rust-lang.org/static/images/rust-logo-blk.svg"
21+
src=format!("{}/gen_assets/logo-rust-page.svg", assets_folder)
1722
class="max-h-20 rounded-full"
1823
height="80"
1924
width="80"

tailwind.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ module.exports = {
1111
theme: {
1212
fontFamily: {
1313
"alfa-slab": ["Alfa Slab One", "sans-serif"],
14-
"fira-sans": ["Fira Sans", "sans-serif"],
1514
"work-sans": ["Work Sans", "sans-serif"],
1615
},
1716
extend: {

0 commit comments

Comments
 (0)