Skip to content

Commit

Permalink
fix(meta): remove minimal-ui from default viewport
Browse files Browse the repository at this point in the history
  • Loading branch information
Pooya Parsa committed Nov 16, 2017
1 parent 12afb41 commit cf48b3f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -120,7 +120,7 @@ You can optionally override meta using either `manifest` or `meta` section of `n
Meta / Link | Customize With | Default value Meta / Link | Customize With | Default value
---------------------------------------|-----------------------|------------------- ---------------------------------------|-----------------------|-------------------
`charset` | `charset` | `utf-8` `charset` | `charset` | `utf-8`
`viewport` | `viewport` | `width=device-width, initial-scale=1, minimal-ui` `viewport` | `viewport` | `width=device-width, initial-scale=1`
`mobile-web-app-capable` | `mobileApp` | `true` `mobile-web-app-capable` | `mobileApp` | `true`
`apple-mobile-web-app-capable` | `mobileAppIOS`* | **`false`** `apple-mobile-web-app-capable` | `mobileAppIOS`* | **`false`**
`apple-mobile-web-app-status-bar-style`| `appleStatusBarStyle`*| `default` `apple-mobile-web-app-status-bar-style`| `appleStatusBarStyle`*| `default`
Expand Down
7 changes: 6 additions & 1 deletion packages/meta/index.js
Expand Up @@ -6,7 +6,7 @@ module.exports = function nuxtMeta (_options) {
name: process.env.npm_package_name, name: process.env.npm_package_name,
description: process.env.npm_package_description, description: process.env.npm_package_description,
charset: 'utf-8', charset: 'utf-8',
viewport: 'width=device-width, initial-scale=1, minimal-ui', viewport: undefined,
mobileApp: true, mobileApp: true,
favicon: true, favicon: true,
mobileAppIOS: false, mobileAppIOS: false,
Expand All @@ -21,6 +21,11 @@ module.exports = function nuxtMeta (_options) {
// Combine sources // Combine sources
const options = Object.assign({}, defaults, this.options.manifest, this.options.meta, _options) const options = Object.assign({}, defaults, this.options.manifest, this.options.meta, _options)


// Default value for viewport
if (options.viewport === undefined) {
options.viewport = 'width=device-width, initial-scale=1'
}

// Charset // Charset
if (options.charset && !find(this.options.head.meta, 'charset')) { if (options.charset && !find(this.options.head.meta, 'charset')) {
this.options.head.meta.push({ charset: options.charset }) this.options.head.meta.push({ charset: options.charset })
Expand Down

0 comments on commit cf48b3f

Please sign in to comment.