Skip to content

Commit ad5b215

Browse files
Merge pull request #155 from ember-learn/updating-typography
[redesign] Updating typography
2 parents c8693c5 + ca7477f commit ad5b215

16 files changed

+715
-133
lines changed

addon/styles/addon.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@import "normalize.css";
22

33
@import "global.css";
4+
@import "typography.css";
45

56
@import "components/es-navbar.css";
67
@import "components/es-header.css";

addon/styles/global.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
--text-preset-4: 18pt;
88
}
99

10-
body {
11-
font-size: 16pt;
12-
}
13-
1410
.container {
1511
max-width: var(--container-width-large);
1612
margin-left: auto;

addon/styles/typography.css

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/* open-sans-300 - latin */
2+
@font-face {
3+
font-family: 'Open Sans';
4+
font-style: normal;
5+
font-weight: 300;
6+
src: url('/fonts/open-sans-v16-latin-300.eot'); /* IE9 Compat Modes */
7+
src: local('Open Sans Light'), local('OpenSans-Light'),
8+
url('/fonts/open-sans-v16-latin-300.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
9+
url('/fonts/open-sans-v16-latin-300.woff2') format('woff2'), /* Super Modern Browsers */
10+
url('/fonts/open-sans-v16-latin-300.woff') format('woff'), /* Modern Browsers */
11+
url('/fonts/open-sans-v16-latin-300.ttf') format('truetype'), /* Safari, Android, iOS */
12+
url('/fonts/open-sans-v16-latin-300.svg#OpenSans') format('svg'); /* Legacy iOS */
13+
}
14+
/* open-sans-regular - latin */
15+
@font-face {
16+
font-family: 'Open Sans';
17+
font-style: normal;
18+
font-weight: 400;
19+
src: url('/fonts/open-sans-v16-latin-regular.eot'); /* IE9 Compat Modes */
20+
src: local('Open Sans Regular'), local('OpenSans-Regular'),
21+
url('/fonts/open-sans-v16-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
22+
url('/fonts/open-sans-v16-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
23+
url('/fonts/open-sans-v16-latin-regular.woff') format('woff'), /* Modern Browsers */
24+
url('/fonts/open-sans-v16-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
25+
url('/fonts/open-sans-v16-latin-regular.svg#OpenSans') format('svg'); /* Legacy iOS */
26+
}
27+
28+
body {
29+
font-size: 16pt;
30+
font-family: "Source Sans Pro", sans-serif;
31+
font-weight: 300;
32+
}
33+
34+
h1 {
35+
font-weight: 300;
36+
}

index.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,19 @@ module.exports = {
3636
'tests/dummy/public'
3737
]
3838
},
39-
googleFonts: [
40-
'Roboto:400,700'
41-
],
4239
},
4340

4441
treeForPublic: function() {
4542
return new Funnel(path.join(this.root, 'public'));
4643
},
44+
45+
contentFor: function(type) {
46+
if (type === 'head') {
47+
// preload the most common fonts for modern browsers
48+
return `<link rel="preload" as="font" type="font/woff2" href="/fonts/open-sans-v16-latin-regular.woff2" crossorigin>
49+
<link rel="preload" as="font" type="font/woff2" href="/fonts/open-sans-v16-latin-300.woff2" crossorigin>`;
50+
}
51+
52+
return '';
53+
}
4754
};

package-lock.json

Lines changed: 0 additions & 125 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"broccoli-funnel": "^2.0.1",
3030
"broccoli-merge-trees": "^3.0.1",
3131
"ember-cli-babel": "^7.1.2",
32-
"ember-cli-google-fonts": "^2.16.2",
3332
"ember-cli-htmlbars": "^3.0.0",
3433
"ember-cli-postcss": "^4.2.0",
3534
"ember-svg-jar": "^1.2.2",
15.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)