Skip to content

Commit e4732dd

Browse files
committed
offline lato fonts
1 parent e04c625 commit e4732dd

10 files changed

Lines changed: 104 additions & 18 deletions

File tree

‎assets/fonts/LatoLatin-Bold.woff2‎

43.3 KB
Binary file not shown.
44 KB
Binary file not shown.
44.3 KB
Binary file not shown.
42.7 KB
Binary file not shown.

‎build-system/build.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ gulp.task('build:lib-js', 'Builds the lib scripts.', () => {
4444
gulp.task('build:lib-css', 'Builds the lib style.', () => {
4545
return gulp.src(require('../lib.config').css)
4646
.pipe($.concat('lib.css'))
47+
.pipe($.replace('@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic&subset=latin);', ''))
4748
.pipe(gulp.dest('./app/css/'));
4849
});
4950

‎build-system/util.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ const argv = require('minimist')(process.argv.slice(2));
55
const log = require('fancy-log');
66
const colors = require('ansi-colors');
77
const PluginError = require('plugin-error');
8+
const replace = require('gulp-replace');
89

910
util.util = {
1011
argv: argv,
1112
log: log,
1213
colors: colors,
13-
PluginError: PluginError
14+
PluginError: PluginError,
15+
replace: replace
1416
};
1517

1618
module.exports = util;

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"gulp-htmlmin": "^4.0.0",
4242
"gulp-imagemin": "^4.1.0",
4343
"gulp-load-plugins": "^1.5.0",
44+
"gulp-replace": "^1.0.0",
4445
"gulp-sass": "^4.0.2",
4546
"gulp-sass-lint": "^1.4.0",
4647
"gulp-size": "^3.0.0",

‎styles/_common.scss‎

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,25 @@
33
:before {
44
-webkit-box-sizing: border-box; /*size not include padding and margin*/
55
}
6+
7+
html, body {
8+
width: 100%;
9+
font-size: 1rem;
10+
line-height: 1.5;
11+
color: #373a3c;
12+
background-color: #fff;
13+
transition: all 350ms $anim-cubic-bezier;
14+
-webkit-font-smoothing: antialiased;
15+
-moz-osx-font-smoothing: grayscale;
16+
}
17+
18+
body {
19+
&.dark {
20+
background: $dark;
21+
color: #fff;
22+
}
23+
}
24+
625
/*
726
http://www.fontspace.com/538fonts/dressedless
827
https://everythingfonts.com/ttf-to-svg
@@ -12,3 +31,75 @@
1231
src: url('../fonts/Dressedless_Three.ttf') format("truetype"), url('../fonts/Dressedless_Three.svg') format("svg");
1332
/* Legacy iOS */
1433
}
34+
35+
/* latin-ext */
36+
@font-face {
37+
font-family: 'Lato';
38+
font-style: italic;
39+
font-weight: 400;
40+
src: local('Lato Italic'), local('Lato-Italic'), url('../fonts/LatoLatin-Italic.woff2') format('woff2');
41+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
42+
}
43+
44+
/* latin */
45+
@font-face {
46+
font-family: 'Lato';
47+
font-style: italic;
48+
font-weight: 400;
49+
src: local('Lato Italic'), local('Lato-Italic'), url('../fonts/LatoLatin-Italic.woff2') format('woff2');
50+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
51+
}
52+
53+
/* latin-ext */
54+
@font-face {
55+
font-family: 'Lato';
56+
font-style: italic;
57+
font-weight: 700;
58+
src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url('../fonts/LatoLatin-BoldItalic.woff2') format('woff2');
59+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
60+
}
61+
62+
/* latin */
63+
@font-face {
64+
font-family: 'Lato';
65+
font-style: italic;
66+
font-weight: 700;
67+
src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url('../fonts/LatoLatin-BoldItalic.woff2') format('woff2');
68+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
69+
}
70+
71+
/* latin-ext */
72+
@font-face {
73+
font-family: 'Lato';
74+
font-style: normal;
75+
font-weight: 400;
76+
src: local('Lato Regular'), local('Lato-Regular'), url('../fonts/LatoLatin-Regular.woff2') format('woff2');
77+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
78+
}
79+
80+
/* latin */
81+
@font-face {
82+
font-family: 'Lato';
83+
font-style: normal;
84+
font-weight: 400;
85+
src: local('Lato Regular'), local('Lato-Regular'), url('../fonts/LatoLatin-Regular.woff2') format('woff2');
86+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
87+
}
88+
89+
/* latin-ext */
90+
@font-face {
91+
font-family: 'Lato';
92+
font-style: normal;
93+
font-weight: 700;
94+
src: local('Lato Bold'), local('Lato-Bold'), url('../fonts/LatoLatin-Bold.woff2') format('woff2');
95+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
96+
}
97+
98+
/* latin */
99+
@font-face {
100+
font-family: 'Lato';
101+
font-style: normal;
102+
font-weight: 700;
103+
src: local('Lato Bold'), local('Lato-Bold'), url('../fonts/LatoLatin-Bold.woff2') format('woff2');
104+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
105+
}

‎styles/_main-containers.scss‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
display: flex;
33
align-items: center;
44
flex-direction: column;
5+
56
.title {
67
text-align: center;
78
padding-top: 3rem;
@@ -10,6 +11,7 @@
1011
padding-top: 8rem;
1112
padding-bottom: 2rem;
1213
}
14+
1315
a {
1416
color: inherit;
1517
text-decoration: none;
@@ -21,13 +23,14 @@
2123
}
2224

2325
span {
24-
font-family: "Dressedless Three", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
26+
font-family: "Dressedless Three", Lato, Roboto, 'Helvetica Neue', Arial, Helvetica, sans-serif;
2527
text-transform: uppercase;
2628
font-size: 3.5rem;
2729
@media screen and (min-width: 800px) {
2830
font-size: 5rem;
2931
}
3032
}
33+
3134
&.animated span {
3235
transition: color 250ms linear;
3336
/*C*/
@@ -97,19 +100,23 @@
97100
box-shadow: 0 3px 8px 0 rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.08);
98101
border-color: transparent;
99102
}
103+
100104
input {
101105
border-radius: 5rem;
102106
border: 0 !important;
103107
}
104108
}
109+
105110
&__dropdown {
106111
display: flex;
107112
justify-content: center;
108113
align-items: center;
109114
margin-top: -0.6rem;
110115
margin-left: 1rem;
116+
111117
i {
112118
opacity: 0.5;
119+
113120
&:hover {
114121
opacity: 1;
115122
}

‎styles/app.scss‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
11
@charset "UTF-8";
22
@import 'constants';
3-
html, body {
4-
width: 100%;
5-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
6-
font-size: 1rem;
7-
line-height: 1.5;
8-
color: #373a3c;
9-
background-color: #fff;
10-
transition: all 350ms $anim-cubic-bezier;
11-
-webkit-font-smoothing: antialiased;
12-
-moz-osx-font-smoothing: grayscale;
13-
.dark {
14-
background: $dark;
15-
color: #fff;
16-
}
17-
}
18-
193
@import 'common';
204
.app {
215
@import 'utils';

0 commit comments

Comments
 (0)