Skip to content

Commit 11f7ac3

Browse files
committedDec 30, 2020
🎨 replace Texta with Work Sans font
🍹 fix gulp watch for gulp 4 🐞 fix leftover ' in highlight code block πŸ“ remove top-banner πŸ“ v4
1 parent 6bbf9aa commit 11f7ac3

File tree

8 files changed

+32
-59
lines changed

8 files changed

+32
-59
lines changed
 

β€Žcontent/index.hbs

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ description: New! JavaScript and jQuery plugin to automatically add next pages.
3535
<p>Link directly to Infinite Scroll files on <a href="https://unpkg.com/">unpkg</a>.</p>
3636

3737
``` html
38-
<script src="https://unpkg.com/infinite-scroll@3/dist/infinite-scroll.pkgd.min.js"></script>
38+
<script src="https://unpkg.com/infinite-scroll@4/dist/infinite-scroll.pkgd.min.js"></script>
3939
<!-- or -->
40-
<script src="https://unpkg.com/infinite-scroll@3/dist/infinite-scroll.pkgd.js"></script>
40+
<script src="https://unpkg.com/infinite-scroll@4/dist/infinite-scroll.pkgd.js"></script>
4141
```
4242

4343
{{! ----------------------------------------------------------------- }}

β€Žcss/base.css

+4-6
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,17 @@
66
}
77

88
body {
9-
font-family: 'Texta', sans-serif;
9+
font-family: 'Work Sans', -apple-system, Helvetica, Arial, sans-serif;
1010
color: #444;
1111
line-height: 1.5;
1212
margin: 0;
1313
padding: 0;
1414
}
1515

16-
.export body { font-family: sans-serif; }
16+
.export body { font-family: -apple-system, Helvetica, Arial, sans-serif; }
1717

1818
/* font size on html for rem */
19-
html { font-size: 17px; }
20-
html.export { font-size: 15px; }
19+
html { font-size: 15px; }
2120

2221
a {
2322
color: #19F;
@@ -153,8 +152,7 @@ tr:nth-child(2) td {
153152

154153
@media screen and (min-width: 768px) {
155154

156-
html { font-size: 19px; }
157-
html.export { font-size: 16px; }
155+
html { font-size: 17px; }
158156

159157
.container {
160158
padding: 0 30px;

β€Žcss/web-fonts.css

+13-23
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,26 @@
11
/* web fonts
22
------------------------- */
33

4-
@import url("//hello.myfonts.net/count/2d333f");
5-
6-
/*
7-
Just use WOFF2 and WOFF for webfonts
8-
https://css-tricks.com/snippets/css/using-font-face/ */
9-
10-
/* Texta Heavy */
4+
/* Work Sans Regular */
115
@font-face {
12-
font-family: 'Texta';
13-
font-weight: bold;
6+
font-family: 'Work Sans';
7+
font-weight: 400;
148
font-style: normal;
15-
src:
16-
url('../fonts/2D333F_0_0.woff2') format('woff2'),
17-
url('../fonts/2D333F_0_0.woff') format('woff');
9+
src: url('../fonts/WorkSans-Regular.woff2') format('woff2');
1810
}
1911

20-
/* Texta Italic */
12+
/* Work Sans Italic */
2113
@font-face {
22-
font-family: 'Texta';
23-
font-weight: normal;
14+
font-family: 'Work Sans';
15+
font-weight: 400;
2416
font-style: italic;
25-
src:
26-
url('../fonts/2D333F_1_0.woff2') format('woff2'),
27-
url('../fonts/2D333F_1_0.woff') format('woff');
17+
src: url('../fonts/WorkSans-Italic.woff2') format('woff2');
2818
}
2919

30-
/* Texta Regular */
20+
/* Work Sans Semi-bold */
3121
@font-face {
32-
font-family: 'Texta';
33-
src:
34-
url('../fonts/2D333F_2_0.woff2') format('woff2'),
35-
url('../fonts/2D333F_2_0.woff') format('woff');
22+
font-family: 'Work Sans';
23+
font-weight: 600;
24+
font-style: normal;
25+
src: url('../fonts/WorkSans-SemiBold.woff2') format('woff2');
3626
}

β€Žgulpfile.js

+2-11
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,10 @@ let site = {
99
// templating data
1010
data: {
1111
productName: 'Infinite Scroll',
12-
majorVersion: 3,
12+
majorVersion: 4,
1313
isDev: taskName == 'dev',
1414
isExport: taskName == 'export',
1515
},
16-
// src to watch, tasks to trigger
17-
watches: [],
18-
watch: function( src, tasks ) {
19-
site.watches.push([ src, tasks ]);
20-
},
2116
};
2217

2318
// ----- tasks ----- //
@@ -55,8 +50,4 @@ gulp.task( 'dev', gulp.parallel(
5550
'dist',
5651
'prod-assets',
5752
'content',
58-
), function() {
59-
site.watches.forEach( function( watchable ) {
60-
gulp.watch( ...watchable );
61-
} );
62-
} );
53+
) );

β€Žmodules/site-nav/site-nav.hbs

-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
<div class="top-banner">
2-
<div class="container">
3-
This is the archived documentation site for Infinite Scroll v3. <a href="https://infinite-scroll.com">For the latest version, view infinite-scroll.com</a>.
4-
</div>
5-
</div>
6-
71
<ol class="site-nav">
82
<li class="site-nav__item site-nav__item--homepage">
93
<a href="{{@file.rootPath}}.">Infinite Scroll v3</a>

β€Žmodules/top-banner/top-banner.css

-5
This file was deleted.

β€Žtasks/content.js

+10-5
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ let helpers = {
3838

3939
module.exports = function( site ) {
4040

41-
gulp.task( 'content', function() {
41+
gulp.task( 'buildContent', function() {
4242
// exclude 404 if export
4343
let filterQuery = site.data.isExport ? [ '**', '!**/404.*' ] : '**';
4444

@@ -70,9 +70,14 @@ module.exports = function( site ) {
7070
.pipe( gulp.dest('build') );
7171
} );
7272

73-
site.watch( contentSrc, [ 'content' ] );
74-
site.watch( pageTemplateSrc, [ 'content' ] );
75-
site.watch( dataSrc, [ 'content' ] );
76-
site.watch( partialsSrc, [ 'content' ] );
73+
let contentTask = gulp.parallel('buildContent');
74+
gulp.task( 'content', contentTask );
75+
76+
if ( site.data.isDev ) {
77+
gulp.watch( contentSrc, contentTask );
78+
gulp.watch( pageTemplateSrc, contentTask );
79+
gulp.watch( dataSrc, contentTask );
80+
gulp.watch( partialsSrc, contentTask );
81+
}
7782

7883
};

β€Žtasks/utils/highlight-code-block.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function replaceCodeBlock( match, leadingWhiteSpace, block ) {
3737
block;
3838
// wrap in <pre><code>
3939
let classAttr = language ? `class="${language}"` : '';
40-
return `\n<pre><code ${classAttr}>${highlighted}</code></pre>'`;
40+
return `\n<pre><code ${classAttr}>${highlighted}</code></pre>`;
4141
}
4242

4343
module.exports = function() {

0 commit comments

Comments
 (0)
Please sign in to comment.