Skip to content

Commit 36f1c00

Browse files
author
Matthew Morek
committed
🔖 Release v0.15.0
Merge branch 'release-v0.15.0' # Conflicts: # scss/components/_buttons.scss
2 parents 9f22391 + d471c74 commit 36f1c00

14 files changed

Lines changed: 237 additions & 31 deletions

docs/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "WFP UI Guidelines"
33
email: "me@matthewmorek.com"
44
description: ""
55
url: "https://cdn.wfp.org" # WFP CDN
6-
version: "v0.14.0"
6+
version: "v0.15.0"
77
quiet: true
88

99
exclude: ["*.sublime-*", "*.sh", "*.yml", "*.DS_*"]

docs/basics-5-getting-started.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You can easily install _WFP UI_ using [Bower](http://bower.io/). Our Bower packa
2121
# Install the latest release
2222
$ bower install wfp-ui --save
2323
# Install any particular release
24-
$ bower install wfp-ui#0.7.0 --save
24+
$ bower install wfp-ui#{{ site.version }} --save
2525
{% endhighlight %}
2626

2727
Now, add _WFP UI_ as a dependency to your main SCSS file:
@@ -63,3 +63,44 @@ You can also download any particular release of [WFP UI from GitHub](https://git
6363
<h2 class="title">Notice</h2>
6464
<p>The <i>WFP UI</i> is intended to be plug &amp; play, and integrate seamlessly with any front-end framework unobtrusively. Whether you use <i>BootStrap</i>, <i>Foundation</i>, <i>Skeleton</i>, or any other framework, you should easily be able to apply WFP UI styles to your projects.</p>
6565
</div>
66+
67+
### Documentation
68+
WFP UI uses [Grunt](http://gruntjs.com) as standard compile assets, however you can use other task runners such as [Gulp](http://gulpjs.com).
69+
70+
<div class="notice">
71+
<h2 class="title">Notice</h2>
72+
<p>WFP UI uses external Sass dependencies so it is necessary that the the dependencies are linked using the native Sass <code>includePaths</code> option.</p>
73+
</div>
74+
75+
###### Gulp `includePaths` implementation:
76+
{% highlight javascript %}
77+
const SASS_INCLUDE_PATHS = [path.join(__dirname, 'bower_components/mathsass/dist')];
78+
gulp.task('sass', function() {
79+
gulp.src([path.join(DIRS.css, 'main.scss')])
80+
.pipe(echo())
81+
.pipe(sass({
82+
includePaths: SASS_INCLUDE_PATHS
83+
}).on('error', sass.logError))
84+
.pipe(sourcemaps.init())
85+
.pipe(minifyCSS())
86+
.pipe(rename({extname: '.min.css'}))
87+
.pipe(sourcemaps.write())
88+
.pipe(gulp.dest(DIRS.css));
89+
});
90+
{% endhighlight %}
91+
92+
###### Grunt task `includePaths` implementation (default in `gruntfile.js`):
93+
{% highlight javascript %}
94+
sass: {
95+
options: {
96+
outputStyle: 'expanded',
97+
sourceMap: true,
98+
indentedSyntax: true,
99+
sassDir: 'scss',
100+
cssDir: 'dist/css',
101+
includePaths: [
102+
'bower_components/mathsass/dist'
103+
]
104+
}
105+
}
106+
{% endhighlight %}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: page
3-
title: Grids
4-
permalink: /components/grids/
3+
title: Grid
4+
permalink: /components/grid/
55
resource: true
66
categories: Components
77
---

docs/component-0-header.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ If the vertical space is limited (i.e.: on smaller viewports), you can substitut
3737
<ul class="menu--group">
3838
<li class="menu--item"><a href="#" class="menu--link active">Who we are</a></li>
3939
<li class="menu--item"><a href="#" class="menu--link">Our work</a></li>
40-
<li class="menu--item"><a href="#" class="menu--link">Where we work</a></li>
41-
<li class="menu--item"><a href="#" class="menu--link">Get involved</a></li>
40+
<div class="header--misc">
41+
<div class="header--search">
42+
<input type="search" class="header--input" placeholder="Search">
43+
</div>
44+
</div>
4245
</ul>
4346
</nav>
4447
</div>
@@ -60,8 +63,11 @@ If the vertical space is limited (i.e.: on smaller viewports), you can substitut
6063
<ul class="menu--group">
6164
<li class="menu--item"><a href="#" class="menu--link active">Who we are</a></li>
6265
<li class="menu--item"><a href="#" class="menu--link">Our work</a></li>
63-
<li class="menu--item"><a href="#" class="menu--link">Where we work</a></li>
64-
<li class="menu--item"><a href="#" class="menu--link">Get involved</a></li>
66+
<div class="header--misc">
67+
<div class="header--search">
68+
<input type="search" class="header--input" placeholder="Search">
69+
</div>
70+
</div>
6571
</ul>
6672
</nav>
6773
</div>

docs/js/subnav.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*!
1+
/** !
22
* WFP.org Subnavigation Handler
33
* Copyright 2016 WFP/MADBIT Co.
44
*/

docs/js/tools.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
/*!
1+
/** !
22
* WFP.org Tools
33
* Copyright 2016 WFP/MADBIT Co.
44
*/
5+
/* eslint-disable no-unused-vars */
56
/**
67
* forEach polyfil
78
* @param {Array} array - an array of elements to process

readme.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,24 @@ cd dist/docs
8080
sudo python -m SimpleHTTPServer 80
8181
```
8282

83+
## Drafting a new release
84+
1. Wrap up all major additions on `develop` branch and branch out to `release-vX.Y.Z`, depending on your release cycle.
85+
2. Bump version numbers inside following files:
86+
- `/docs/_config.yml`
87+
- `/scss/bootstrap-theme.scss`
88+
- `/scss/wfpui.scss`
89+
- `/scss/wfpui+grid.scss`
90+
- `/scss/wfpui+grid.scss`
91+
3. Run `grunt test` and fix any errors that fail the build process.
92+
4. If you added or altered any assets, run `grunt dist-assets`.
93+
5. Run `grunt dist` to build all static project sources (mainly CSs & JS).
94+
6. Commit your changes and push to remote.
95+
7. Merge your release branch to `master` with a commit message `Release vX.Y.Z` (no `fast-forward`).
96+
8. Merge your release branch to `develop` using `fast-forward` strategy.
97+
9. Tag latest merge commit on `master` using a new version number.
98+
10. Push all changes to remote.
99+
11. Draft a new release on GitHub including a changelog.
100+
83101
## Authors & Contributors
84102
- [Matthew Morek](https://github.com/matthewmorek)
85103
- [James Home](https://github.com/jrah)

scss/bootstrap-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* WFP UI Bootstrap Theme, v0.14.0
2+
* WFP UI Bootstrap Theme, v0.15.0
33
* Copyright 2016 WFP/MADBIT Co.
44
* License: https://github.com/wfp/ui/blob/master/LICENSE
55
*/

scss/components/_buttons.scss

Lines changed: 129 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,69 @@ $color-gplus: #dc4e41;
6969
background-color: darken($primary, 12%);
7070

7171
&:hover {
72+
color: $white;
7273
background-color: darken($primary, 20%);
74+
border-color: rbga($black, 0.25);
7375
}
7476

7577
&.active,
7678
&:active,
7779
&.active:hover,
7880
&.active:active,
7981
&.active:focus {
80-
background-color: darken($blue-darker, 15%);
81-
border-color: darken($blue-darker, 15%);
82+
background-color: darken($primary, 20%);
83+
border-color: darken($primary, 25%);
84+
color: $white;
85+
}
86+
87+
} @else if $type == hollow {
88+
color: $white;
89+
background-color: transparent;
90+
border: 2px solid $white;
91+
box-shadow: none;
92+
transition: 0.125s ease-in box-shadow,
93+
0.125s ease-in background,
94+
0.125s ease-in color;
95+
96+
&:hover {
97+
color: darken($primary, 12%);
98+
background-color: $white;
99+
border-color: $white;
100+
box-shadow: 0 1px 6px 0 rgba($black, 0.4);
101+
}
102+
103+
&.active,
104+
&:active,
105+
&.active:hover,
106+
&.active:active,
107+
&.active:focus {
108+
color: $white;
109+
background-color: darken($primary, 12%);
110+
}
111+
112+
} @else if $type == reverse {
113+
color: darken($primary, 12%);
114+
background-color: $white;
115+
border: 2px solid $white;
116+
transition: 0.125s ease-in box-shadow,
117+
0.125s ease-in background,
118+
0.125s ease-in color;
119+
120+
&:hover {
121+
color: darken($primary, 25%);
122+
background-color: $blue-lightest;
123+
border-color: $blue-lightest;
124+
box-shadow: 0 1px 6px 0 rgba($black, 0.4);
125+
}
126+
127+
&.active,
128+
&:active,
129+
&.active:hover,
130+
&.active:active,
131+
&.active:focus {
132+
color: darken($primary, 20%);
133+
background-color: $white;
134+
border: 2px solid $white;
82135
}
83136

84137
} @else if $type == negative {
@@ -178,6 +231,12 @@ $color-gplus: #dc4e41;
178231
}
179232
}
180233

234+
a {
235+
&.wfp-btn {
236+
@include button;
237+
}
238+
}
239+
181240
.wfp-btn {
182241
@include button;
183242
}
@@ -186,32 +245,100 @@ $color-gplus: #dc4e41;
186245
@include button(primary);
187246
}
188247

248+
a {
249+
&.wfp-btn--primary {
250+
@include button(primary);
251+
}
252+
}
253+
254+
.wfp-btn--hollow {
255+
@include button(hollow);
256+
}
257+
258+
a {
259+
&.wfp-btn--hollow {
260+
@include button(hollow);
261+
}
262+
}
263+
264+
.wfp-btn--reverse {
265+
@include button(reverse);
266+
}
267+
268+
a {
269+
&.wfp-btn--reverse {
270+
@include button(reverse);
271+
}
272+
}
273+
189274
.wfp-btn--negative {
190275
@include button(negative);
191276
}
192277

278+
a {
279+
&.wfp-btn--negative {
280+
@include button(negative);
281+
}
282+
}
283+
193284
.wfp-btn--positive {
194285
@include button(positive);
195286
}
196287

288+
a {
289+
&.wfp-btn--positive {
290+
@include button(positive);
291+
}
292+
}
293+
197294
.wfp-btn--warning {
198295
@include button(warning);
199296
}
200297

298+
a {
299+
&.wfp-btn--warning {
300+
@include button(warning);
301+
}
302+
}
303+
201304
// Social buttons
202305
.wfp-btn--twitter {
203306
@include button(social, $color-twitter);
204307
}
205308

309+
a {
310+
&.wfp-btn--twitter {
311+
@include button(social, $color-twitter);
312+
}
313+
}
314+
206315
.wfp-btn--facebook {
207316
@include button(social, $color-facebook);
208317
}
209318

319+
a {
320+
&.wfp-btn--facebook {
321+
@include button(social, $color-facebook);
322+
}
323+
}
324+
210325
.wfp-btn--gplus {
211326
@include button(social, $color-gplus);
212327
}
213328

329+
a {
330+
&.wfp-btn--gplus {
331+
@include button(social, $color-gplus);
332+
}
333+
}
334+
214335
// Header buttons
215336
.wfp-btn--head {
216337
@include button(head);
217338
}
339+
340+
a {
341+
.wfp-btn--head {
342+
@include button(head);
343+
}
344+
}

scss/css/_base.scss

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ body {
3636
line-height: 1.500;
3737
background-color: $background-color;
3838
color: $text-color;
39-
40-
@include media-query($xl-screen) {
41-
font-size: $base-font-size * 1.125;
42-
};
4339
}
4440

4541
h1, h2, h3, h4, h5, h6 {
@@ -49,27 +45,42 @@ h1, h2, h3, h4, h5, h6 {
4945
}
5046

5147
h1 {
52-
@include h1;
48+
@include font-size(3);
49+
@include tracking(tight);
50+
@include lh-scale(0.66);
51+
@include margin(0.5rem 0);
5352
}
5453

5554
h2 {
56-
@include h2;
55+
@include margin(0.25rem 0);
56+
@include lh-scale(0.875);
57+
@include font-size(2.5);
58+
letter-spacing: -0.025rem;
5759
}
5860

5961
h3 {
60-
@include h3;
62+
@include margin(0.25rem 0);
63+
@include lh-scale(0.875);
64+
@include font-size(2.25);
65+
letter-spacing: -0.025rem;
6166
}
6267

6368
h4 {
64-
@include h4;
69+
@include font-size(2);
70+
@include lh-scale(0.875);
71+
@include margin(0.25rem 0);
6572
}
6673

6774
h5 {
68-
@include h5;
75+
@include font-size(1.75);
76+
@include lh-body;
77+
@include margin(0.25rem 0);
6978
}
7079

7180
h6 {
72-
@include h6;
81+
@include font-size(1.5);
82+
@include lh-body;
83+
@include margin(0.25rem 0);
7384
}
7485

7586
// Fluid image to fit a lfuid parent container while maintaining aspect ratio

0 commit comments

Comments
 (0)