Skip to content

Commit 38f35d5

Browse files
Merge pull request #107 from OBF/self_host_fonts
add fonts to self-host
2 parents ac4b3a2 + e61b752 commit 38f35d5

File tree

18 files changed

+146
-2
lines changed

18 files changed

+146
-2
lines changed

layouts/partials/head.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@
7373
{{- if .Site.Params.selfHosted -}}
7474
<link rel="stylesheet" href="{{ "css/fonts.css" | absURL }}" />
7575
{{- else -}}
76-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" />
77-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" />
7876
{{- end -}}
7977

8078
{{- if .Site.Params.useHLJS }}

static/css/custom.css

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,149 @@ imagerow::after {
5656
padding-top: 5%;
5757
padding-bottom: 5%;
5858
}
59+
60+
61+
/* lora-regular - cyrillic_cyrillic-ext_latin_latin-ext_math_symbols_vietnamese */
62+
@font-face {
63+
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
64+
font-family: 'Lora';
65+
font-style: normal;
66+
font-weight: 400;
67+
src: url('../fonts/lora-v36-cyrillic_cyrillic-ext_latin_latin-ext_math_symbols_vietnamese-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
68+
}
69+
70+
/* lora-italic - cyrillic_cyrillic-ext_latin_latin-ext_math_symbols_vietnamese */
71+
@font-face {
72+
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
73+
font-family: 'Lora';
74+
font-style: italic;
75+
font-weight: 400;
76+
src: url('../fonts/lora-v36-cyrillic_cyrillic-ext_latin_latin-ext_math_symbols_vietnamese-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
77+
}
78+
79+
/* lora-700 - cyrillic_cyrillic-ext_latin_latin-ext_math_symbols_vietnamese */
80+
@font-face {
81+
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
82+
font-family: 'Lora';
83+
font-style: normal;
84+
font-weight: 700;
85+
src: url('../fonts/lora-v36-cyrillic_cyrillic-ext_latin_latin-ext_math_symbols_vietnamese-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
86+
}
87+
88+
/* lora-700italic - cyrillic_cyrillic-ext_latin_latin-ext_math_symbols_vietnamese */
89+
@font-face {
90+
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
91+
font-family: 'Lora';
92+
font-style: italic;
93+
font-weight: 700;
94+
src: url('../fonts/lora-v36-cyrillic_cyrillic-ext_latin_latin-ext_math_symbols_vietnamese-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
95+
}
96+
97+
/* open-sans-300 - cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese */
98+
@font-face {
99+
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
100+
font-family: 'Open Sans';
101+
font-style: normal;
102+
font-weight: 300;
103+
src: url('../fonts/open-sans-v43-cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
104+
}
105+
106+
/* open-sans-300italic - cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese */
107+
@font-face {
108+
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
109+
font-family: 'Open Sans';
110+
font-style: italic;
111+
font-weight: 300;
112+
src: url('../fonts/open-sans-v43-cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese-300italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
113+
}
114+
115+
/* open-sans-regular - cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese */
116+
@font-face {
117+
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
118+
font-family: 'Open Sans';
119+
font-style: normal;
120+
font-weight: 400;
121+
src: url('../fonts/open-sans-v43-cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
122+
}
123+
124+
/* open-sans-italic - cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese */
125+
@font-face {
126+
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
127+
font-family: 'Open Sans';
128+
font-style: italic;
129+
font-weight: 400;
130+
src: url('../fonts/open-sans-v43-cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
131+
}
132+
133+
/* open-sans-500 - cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese */
134+
@font-face {
135+
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
136+
font-family: 'Open Sans';
137+
font-style: normal;
138+
font-weight: 500;
139+
src: url('../fonts/open-sans-v43-cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
140+
}
141+
142+
/* open-sans-500italic - cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese */
143+
@font-face {
144+
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
145+
font-family: 'Open Sans';
146+
font-style: italic;
147+
font-weight: 500;
148+
src: url('../fonts/open-sans-v43-cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese-500italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
149+
}
150+
151+
/* open-sans-600 - cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese */
152+
@font-face {
153+
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
154+
font-family: 'Open Sans';
155+
font-style: normal;
156+
font-weight: 600;
157+
src: url('../fonts/open-sans-v43-cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
158+
}
159+
160+
/* open-sans-600italic - cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese */
161+
@font-face {
162+
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
163+
font-family: 'Open Sans';
164+
font-style: italic;
165+
font-weight: 600;
166+
src: url('../fonts/open-sans-v43-cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese-600italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
167+
}
168+
169+
/* open-sans-700 - cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese */
170+
@font-face {
171+
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
172+
font-family: 'Open Sans';
173+
font-style: normal;
174+
font-weight: 700;
175+
src: url('../fonts/open-sans-v43-cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
176+
}
177+
178+
/* open-sans-700italic - cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese */
179+
@font-face {
180+
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
181+
font-family: 'Open Sans';
182+
font-style: italic;
183+
font-weight: 700;
184+
src: url('../fonts/open-sans-v43-cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
185+
}
186+
187+
/* open-sans-800 - cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese */
188+
@font-face {
189+
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
190+
font-family: 'Open Sans';
191+
font-style: normal;
192+
font-weight: 800;
193+
src: url('../fonts/open-sans-v43-cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese-800.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
194+
}
195+
196+
/* open-sans-800italic - cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese */
197+
@font-face {
198+
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
199+
font-family: 'Open Sans';
200+
font-style: italic;
201+
font-weight: 800;
202+
src: url('../fonts/open-sans-v43-cyrillic_cyrillic-ext_greek_greek-ext_hebrew_latin_latin-ext_math_symbols_vietnamese-800italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
203+
}
204+
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)