Skip to content

Commit 911dd0a

Browse files
authored
Merge pull request #270 from webpack/develop
Deploy
2 parents f11a442 + 44eadea commit 911dd0a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1700
-991
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
build/
12
antwar.config.js

README.md

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,36 +16,4 @@ For more information see the [contributors page](https://github.com/webpack/webp
1616

1717
## Content Progress
1818

19-
Fully completed can be removed from this list. If there's a topic you would like to contribute in, check out the related issue and comment there.
20-
21-
### Root Level
22-
23-
- Analyze - ![](https://img.shields.io/badge/progress-0%25-yellowgreen.svg)
24-
- Contribute - ![](https://img.shields.io/badge/progress-10%25-yellowgreen.svg)
25-
- Get Started - ![](https://img.shields.io/badge/progress-10%25-yellowgreen.svg) - [#15](https://github.com/webpack/webpack.js.org/issues/15)
26-
- Writer's Guide - ![](https://img.shields.io/badge/progress-50%25-yellowgreen.svg)
27-
28-
### `/api`
29-
30-
- Configuration - ![](https://img.shields.io/badge/progress-5%25-yellowgreen.svg) - [#25](https://github.com/webpack/webpack.js.org/issues/25)
31-
- Loaders - ![](https://img.shields.io/badge/progress-0%25-yellowgreen.svg) - [#21](https://github.com/webpack/webpack.js.org/issues/21)
32-
- Module Resolution - ![](https://img.shields.io/badge/progress-5%25-yellowgreen.svg) - [#12](https://github.com/webpack/webpack.js.org/issues/12)
33-
- Node - ![](https://img.shields.io/badge/progress-5%25-yellowgreen.svg) - [#23](https://github.com/webpack/webpack.js.org/issues/23)
34-
- Plugins - ![](https://img.shields.io/badge/progress-0%25-yellowgreen.svg) - [#37](https://github.com/webpack/webpack.js.org/issues/37)
35-
36-
### `/concepts`
37-
38-
- Modules - ![](https://img.shields.io/badge/progress-50%25-yellowgreen.svg) - [#49](https://github.com/webpack/webpack.js.org/issues/49)
39-
- Loaders - ![](https://img.shields.io/badge/progress-5%25-yellowgreen.svg) - [#50](https://github.com/webpack/webpack.js.org/issues/50)
40-
41-
### `/how-to`
42-
43-
- Author libraries - ![](https://img.shields.io/badge/progress-5%25-yellowgreen.svg) - [#9](https://github.com/webpack/webpack.js.org/issues/9)
44-
- Develop - ![](https://img.shields.io/badge/progress-5%25-yellowgreen.svg) - [#26](https://github.com/webpack/webpack.js.org/issues/26)
45-
- Handle compatibility - ![](https://img.shields.io/badge/progress-5%25-yellowgreen.svg) - [#4](https://github.com/webpack/webpack.js.org/issues/4)
46-
- Handle dependencies - ![](https://img.shields.io/badge/progress-5%25-yellowgreen.svg) - [#5](https://github.com/webpack/webpack.js.org/issues/5)
47-
- Improve build performance - ![](https://img.shields.io/badge/progress-5%25-yellowgreen.svg) - [#16](https://github.com/webpack/webpack.js.org/issues/16)
48-
- Shim - ![](https://img.shields.io/badge/progress-5%25-yellowgreen.svg) - [#13](https://github.com/webpack/webpack.js.org/issues/13)
49-
- Split code - ![](https://img.shields.io/badge/progress-5%25-yellowgreen.svg) - [#3](https://github.com/webpack/webpack.js.org/issues/3)
50-
- Use with Docker - ![](https://img.shields.io/badge/progress-5%25-yellowgreen.svg) - [#44](https://github.com/webpack/webpack.js.org/issues/44)
51-
- Use with third party tools - ![](https://img.shields.io/badge/progress-5%25-yellowgreen.svg) - [#53](https://github.com/webpack/webpack.js.org/issues/53)
19+
Check out the [MVP Milestone](https://github.com/webpack/webpack.js.org/issues?q=is%3Aopen+is%3Aissue+milestone%3A%22Webpack+2+-+Documentation+MVP%22) for the current status.

antwar.config.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ module.exports = {
7878
}
7979
)
8080
}
81-
}
81+
};
8282

8383
function root(contentCb) {
8484
return {
@@ -88,8 +88,11 @@ function root(contentCb) {
8888
},
8989
processPage: processPage(), // Process individual page (url, content)
9090
layouts: { // Layouts (page/section)
91-
page: function() {
91+
index: function() {
9292
return require('./components/splash/splash.jsx').default
93+
},
94+
page: function() {
95+
return require('./components/page/page.jsx').default
9396
}
9497
},
9598
redirects: {} // Redirects <from>: <to>

assets/icons.woff

88 Bytes
Binary file not shown.

assets/icons.woff2

96 Bytes
Binary file not shown.

bootstrap.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
const antwar = require('antwar');
2-
const webpack = require('./webpack.config');
3-
const configuration = require('./antwar.config');
2+
3+
const environment = process.env.npm_lifecycle_event;
44

55
// Patch Babel env to make HMR switch work
6-
process.env.BABEL_ENV = process.env.npm_lifecycle_event;
6+
process.env.BABEL_ENV = environment;
77

8-
antwar({
9-
configuration,
10-
environment: process.env.npm_lifecycle_event,
11-
webpack
8+
antwar[environment]({
9+
environment,
10+
antwar: require('./antwar.config'),
11+
webpack: require('./webpack.config')
1212
}).catch(function (err) {
1313
console.error(err);
1414
});

components/logo/logo-style.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@
1414

1515
&__text {
1616
font-family:'Geomanist', 'Century Gothic', sans-serif;
17-
font-size:1.3em;
17+
font-size:1.5em;
1818
font-weight:500;
1919
text-rendering: geometricPrecision;
20-
letter-spacing:0.5px;
2120
margin-left:0.25em;
22-
margin-top:3px;
2321
color:map-get($colors, emperor);
2422
transition:color 250ms;
2523
}

components/navigation/navigation-style.scss

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,44 @@
66
flex: 0 0 auto;
77
transition: background 250ms;
88
background: map-get($colors, mine-shaft);
9+
10+
&--transparent {
11+
position:relative;
12+
display:flex;
13+
justify-content: center;
14+
background: transparent;
15+
16+
.navigation__inner {
17+
position:absolute;
18+
}
19+
20+
.navigation__link:hover {
21+
color: map-get($colors, emperor);
22+
}
23+
24+
.navigation__mobile {
25+
color:map-get($colors, emperor);
26+
}
27+
}
928
}
1029

1130
.navigation__inner {
1231
display: flex;
1332
align-items: center;
14-
padding: 0.5em 1em;
33+
padding: 0.6em 1em;
1534

1635
@include break {
1736
padding:0 0 0 1.5em;
1837
}
1938
}
2039

2140
.navigation__mobile {
22-
position: absolute;
23-
font-size: getFontSize(2);
2441
display: flex;
25-
left: -0.5em;
42+
font-size: 1.75em;
43+
margin-left: -1em;
44+
align-items: center;
2645
color: map-get($colors, white);
46+
cursor: pointer;
2747
transition: color 250ms;
2848

2949
&:active {
@@ -35,6 +55,10 @@
3555
}
3656
}
3757

58+
.navigation__logo {
59+
margin:auto;
60+
}
61+
3862
.navigation__links {
3963
display: none;
4064

components/navigation/navigation.jsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import './navigation-style';
66

77
export default class Navigation extends React.Component {
88
render() {
9+
const { pageUrl, sections } = this.props;
10+
911
return (
1012
<header className="navigation">
1113
<Container className="navigation__inner">
@@ -19,9 +21,8 @@ export default class Navigation extends React.Component {
1921

2022
<nav className="navigation__links">
2123
{
22-
this.props.pages.map((link, i) => {
23-
let { pathname } = window.location;
24-
let active = pathname === `/${link.url}` || pathname.includes(`/${link.url}/`);
24+
sections.filter(section => section.title !== 'Other').map((link, i) => {
25+
let active = pageUrl.includes(`${link.url}/`);
2526
let activeClass = active ? 'navigation__link--active' : '';
2627

2728
return (
@@ -34,15 +35,19 @@ export default class Navigation extends React.Component {
3435
);
3536
})
3637
}
38+
39+
<Link className={ 'navigation__link' } to={ '//opencollective.com/webpack' }>
40+
Donate
41+
</Link>
3742
</nav>
3843
</Container>
3944
</header>
4045
);
4146
}
4247

4348
_toggleSidebar(e) {
44-
let sidebar = document.querySelector('.sidebar');
45-
let modifier = 'sidebar--visible';
49+
let sidebar = document.querySelector('.sidebar-mobile');
50+
let modifier = 'sidebar-mobile--visible';
4651

4752
sidebar.classList.toggle(modifier);
4853
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
@import 'vars';
2+
@import 'functions';
3+
@import 'mixins';
4+
5+
.sidebar-mobile {
6+
position: fixed;
7+
width: 280px;
8+
height: 100vh;
9+
z-index: 100;
10+
top: 0;
11+
overflow-y: auto;
12+
overflow-x: hidden;
13+
-webkit-overflow-scrolling: touch;
14+
background: map-get($colors, white);
15+
transform: translate3D(-100%, 0, 0);
16+
transition: all 500ms;
17+
18+
@include break {
19+
display: none;
20+
}
21+
22+
&--visible {
23+
transform: translate3D(0, 0, 0);
24+
box-shadow: 0 0 5px map-get($colors, emperor);
25+
}
26+
}
27+
28+
.sidebar-mobile__close {
29+
position:absolute;
30+
right:16px;
31+
top:19px;
32+
font-size:1.5em;
33+
cursor:pointer;
34+
color:map-get($colors, dusty-grey);
35+
transition:color 250ms;
36+
37+
&:hover {
38+
color:map-get($colors, mine-shaft);
39+
}
40+
}
41+
42+
.sidebar-mobile__section {
43+
font-size: getFontSize(1);
44+
text-transform: uppercase;
45+
color: map-get($colors, mine-shaft);
46+
margin: 1em 16px 0.25em;
47+
}
48+
49+
.sidebar-mobile__page {
50+
display: block;
51+
padding: 0.5em 17px;
52+
text-transform: capitalize;
53+
color: map-get($colors, dusty-grey);
54+
-webkit-tap-highlight-color: rgba(0,0,0,0);
55+
56+
&:active,
57+
&--active {
58+
color: map-get($colors, mine-shaft);
59+
background: map-get($colors, alto);
60+
}
61+
}

0 commit comments

Comments
 (0)