Skip to content

Commit fcf5b91

Browse files
author
Marco Solazzi
committed
Merge branch 'release/3.1.0'
2 parents d47acbf + 50e990a commit fcf5b91

File tree

11 files changed

+89
-79
lines changed

11 files changed

+89
-79
lines changed

application/assets/javascripts/base/plugins.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,5 @@
2929
}());
3030

3131

32-
//Fix IE10 on WP8 visualization issues
33-
//see http://getbootstrap.com/getting-started/#ie-10-width
34-
//see http://timkadlec.com/2013/01/windows-phone-8-and-device-width/
35-
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
36-
var msViewportStyle = document.createElement('style');
37-
msViewportStyle.appendChild(
38-
document.createTextNode('@-ms-viewport{width:auto!important}')
39-
);
40-
document.getElementsByTagName('head')[0].appendChild(msViewportStyle);
41-
}
4232

4333
// Place any jQuery/helper plugins in here.

application/assets/stylesheets/base/_base.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
*::before,
3939
*::after {
4040
box-sizing: border-box;
41+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
4142
}
4243

4344
html,

application/assets/stylesheets/base/_globals.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ $layers: (
1717
above: 1,
1818
modal: 10
1919
);
20+
21+
//PSD base viewport size
22+
$viewport-width: 1280px;
23+
$viewport-height: 720px;

application/assets/stylesheets/base/_mixins.scss

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323
@return map-get($layers, $level);
2424
}
2525

26+
@function vw($width, $viewport-reference-width: $viewport-width) {
27+
@return (strip-units($width) / strip-units($viewport-reference-width)) * 100 + vw;
28+
}
29+
30+
@function vh($height, $viewport-reference-height: $viewport-height) {
31+
@return (strip-units($height) / strip-units($viewport-reference-height)) * 100 + vh;
32+
}
2633

2734

2835
// Elements
@@ -179,14 +186,14 @@
179186
$context: $context * 1px;
180187
}
181188

182-
@return ($pixels / $context) * 1em;
189+
@return #{$pixels / $context}em;
183190
}
184191

185192
@function rem($pixels) {
186193
@if (unitless($pixels)) {
187194
$pixels: $pixels * 1px;
188195
}
189-
@return ($pixels / $font-size-default) * 1rem;
196+
@return #{$pixels / $font-size-default}rem;
190197
}
191198

192199

application/assets/stylesheets/base/_utility.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,21 @@
203203
.is-invisible,
204204
.u-invisible { //DEPRECATED: also as global state
205205
visibility: hidden;
206+
}
207+
208+
@each $mq-key, $mq-value in $mq-breakpoints {
209+
210+
@include mq($mq-key) {
211+
.u-hidden--from-#{$mq-key} {
212+
display: none !important;
213+
visibility: hidden;
214+
}
215+
}
216+
217+
@include mq($until: $mq-key) {
218+
.u-hidden--until-#{$mq-key} {
219+
display: none !important;
220+
visibility: hidden;
221+
}
222+
}
206223
}

application/views/templates/_default.nunj.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<!-- mobile meta (hooray!) -->
1515
<meta name="HandheldFriendly" content="True" />
1616
<meta name="MobileOptimized" content="320" />
17+
<meta name="format-detection" content="telephone=no">
1718
<meta name="viewport" content="width=device-width, initial-scale=1" />
1819

1920
<!-- build:replace /assets/vendors/modernizr/modernizr.min.js -->
@@ -29,7 +30,7 @@
2930
{% endblock %}
3031

3132
</head>
32-
<body class="{% if bodyClass %}{{ bodyClass }}{% endif %}">
33+
<body class="{{ bodyClass if bodyClass | safe }}">
3334

3435
<h1>Hello World!</h1>
3536

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wok",
3-
"version": "3.0.0",
3+
"version": "3.1.0",
44
"authors": [
55
"Marco Solazzi <[email protected]>",
66
"Matteo Guidotto <[email protected]>",
@@ -16,6 +16,6 @@
1616
],
1717
"dependencies": {
1818
"sass-mq": "3.2.9",
19-
"normalize-css": "4.0.0"
19+
"normalize-css": "4.1.1"
2020
}
2121
}

build/gulp-tasks/bump.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = function (gulp, $, options) {
2525
message: 'New version number?',
2626
default: (allowed.length - 1),
2727
choices: allowed.map(function (type) { return { name: type + ' (' + semver.inc(options.pkg.version, type) + ')', value: type}; })
28-
}], function (answers) {
28+
}]).then(function (answers) {
2929
argv.type = answers.version;
3030
done();
3131
});

build/gulp-tasks/images.js

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,35 @@
66
module.exports = function (gulp, $, options) {
77

88
var path = require('path'),
9-
productionPipe = $.util.noop,
109
paths = options.paths,
11-
filesMatch = '**/*.{png,jpg,gif,svg,webp}';
10+
filesMatch = '**/*.{png,jpg,gif,svg,webp}',
11+
plugins = [];
12+
13+
plugins.push($.imagemin.svgo({
14+
plugins: [
15+
{cleanupIDs: false},
16+
{removeViewBox: false}
17+
]
18+
}));
19+
20+
if (options.production) {
21+
plugins.push(
22+
$.imagemin.jpegtran({progressive: false}),
23+
$.imagemin.gifsicle({interlaced: true}),
24+
$.imagemin.optipng()
25+
);
26+
}
1227

1328
gulp.task('images', function () {
1429

15-
if (options.production) {
16-
productionPipe = require('lazypipe')()
17-
.pipe($.imagemin, {
18-
progressive: false,
19-
interlaced: true,
20-
svgoPlugins: [{
21-
cleanupIDs: false,
22-
removeViewBox: false
23-
}]
24-
})
25-
.pipe($.rev);
26-
}
27-
2830
return gulp.src(options.assetsPath('src.images', filesMatch))
29-
.pipe($.changed(options.assetsPath('dist.images')))
30-
.pipe($.if('*.svg', $.imagemin({
31-
svgoPlugins: [{
32-
cleanupIDs: false,
33-
removeViewBox: false
34-
}]
35-
})))
36-
.pipe($.if(options.production, productionPipe()))
37-
.pipe(
38-
gulp.dest(options.assetsPath('dist.images'))
39-
)
31+
.pipe($.imagemin(plugins))
32+
.pipe($.if(options.production, $.rev()))
33+
.pipe(gulp.dest(options.assetsPath('dist.images')))
4034
.pipe($.if(options.production, $.rev.manifest(path.join(paths.dist.root, paths.dist.revmap), {merge: true})))
4135
.pipe($.if(options.production, gulp.dest('.')))
4236
.pipe($.if(options.isWatching, $.notify({ message: 'Images Processed', onLast: true })))
4337
.pipe($.size({title: 'images'}));
44-
4538
});
4639

4740
};

build/gulp-tasks/serve.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ module.exports = function (gulp, $, options) {
6464
}
6565

6666
//ensure proper exit on windows
67-
if (process.platform === 'win32') {
68-
process.on('SIGINT', function () {
69-
process.exit();
70-
});
71-
}
67+
// if (process.platform === 'win32') {
68+
process.on('SIGINT', function () {
69+
process.exit();
70+
});
71+
// }
7272

7373
// Watch Files For Changes & Reload
7474
gulp.task('serve', ['default'], function (done) {
@@ -127,13 +127,12 @@ module.exports = function (gulp, $, options) {
127127

128128
var browserSync = require('browser-sync').create(options.buildHash),
129129
serverConf = _.defaults({
130-
logLevel: 'silent',
131130
open: false,
132131
ui: false
133132
}, serverConfigDefault);
134133

135134
browserSync.init(serverConf, function () {
136-
$.util.log($.util.colors.green('Running a static server on port ' + ports.connect + '...'));
135+
//$.util.log($.util.colors.green('Running a static server on port ' + ports.connect + '...'));
137136
});
138137

139138
process.on('exit', function () {

0 commit comments

Comments
 (0)