Skip to content

Commit 675f0a2

Browse files
authored
feat: add pre-built CSS for CDN usage (#27)
* feat: add server-mono.css for CDN * feat: update README.md to include pre-built CSS
1 parent 5c5ba8b commit 675f0a2

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,16 @@ Copy the below snippet into your CSS file:
5252

5353
### CDN Hosted
5454

55-
ServerMono is also available through the [jsDelivr CDN](https://cdn.jsdelivr.net/gh/internet-development/www-server-mono/public/fonts/), so that you can use the fonts with downloading and hosting them yourself.
55+
Server Mono is also available through the [jsDelivr CDN](https://cdn.jsdelivr.net/gh/internet-development/www-server-mono/public/fonts/), so that you can use the fonts without downloading and hosting them yourself.
5656

57-
Copy the below snippet into your CSS file:
57+
Use the pre-built CSS to quickly add Server Mono on your website:
58+
59+
```html
60+
<link rel="preconnect" href="https://cdn.jsdelivr.net">
61+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/internet-development/www-server-mono/server-mono.css">
62+
```
63+
64+
Or you can copy the below snippet into your CSS file:
5865

5966
```css
6067
/* Regular weight - used for normal text */

server-mono.css

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* Regular weight - used for normal text */
2+
@font-face {
3+
font-family: 'ServerMono';
4+
src: url('https://cdn.jsdelivr.net/gh/internet-development/www-server-mono/public/fonts/ServerMono-Regular.woff2') format('woff2'), /* Best compression, modern browsers */
5+
url('https://cdn.jsdelivr.net/gh/internet-development/www-server-mono/public/fonts/ServerMono-Regular.woff') format('woff'), /* Good compression, wider support */
6+
url('https://cdn.jsdelivr.net/gh/internet-development/www-server-mono/public/fonts/ServerMono-Regular.otf') format('opentype'); /* Largest files, universal support */
7+
font-weight: normal;
8+
font-style: normal;
9+
font-display: swap;
10+
}
11+
12+
/* Slanted variant - used for italic/oblique text */
13+
@font-face {
14+
font-family: 'ServerMono';
15+
src: url('https://cdn.jsdelivr.net/gh/internet-development/www-server-mono/public/fonts/ServerMono-RegularSlanted.woff2') format('woff2'),
16+
url('https://cdn.jsdelivr.net/gh/internet-development/www-server-mono/public/fonts/ServerMono-RegularSlanted.woff') format('woff'),
17+
url('https://cdn.jsdelivr.net/gh/internet-development/www-server-mono/public/fonts/ServerMono-RegularSlanted.otf') format('opentype');
18+
font-weight: normal;
19+
font-style: oblique;
20+
font-display: swap;
21+
}

0 commit comments

Comments
 (0)