Skip to content

Commit

Permalink
Cleanup browserlist, add IE polyfills, add examples dropdown with exa…
Browse files Browse the repository at this point in the history
…mple pages

Improve examples dropdown
  • Loading branch information
cristijora committed Feb 12, 2019
1 parent cd990e5 commit f352209
Show file tree
Hide file tree
Showing 14 changed files with 62 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .browserslistrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
> 1%
last 2 versions
not ie <= 8
not ie <= 11
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
env: {
node: true
},
extends: ['plugin:vue/essential', '@vue/prettier'],
extends: ['plugin:vue/essential'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
Expand Down
3 changes: 0 additions & 3 deletions .prettierrc

This file was deleted.

9 changes: 8 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
module.exports = {
presets: ['@vue/app'],
presets: [
[
'@vue/app',
{
polyfills: ['es7.object.entries', 'es6.promise']
}
]
],
plugins: [
[
'component',
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-now-ui-kit",
"version": "0.1.0",
"version": "1.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand All @@ -21,7 +21,6 @@
"@vue/cli-plugin-babel": "^3.4.0",
"@vue/cli-plugin-eslint": "^3.4.0",
"@vue/cli-service": "^3.4.0",
"@vue/eslint-config-prettier": "^4.0.1",
"babel-plugin-component": "^1.1.1",
"node-sass": "^4.11.0",
"sass-loader": "^7.1.0",
Expand Down
4 changes: 4 additions & 0 deletions src/assets/scss/now-ui-kit/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
&:focus{
background-color: $opacity-gray-3;
}
&.active {
background-color: $primary-color;
color: white;
}

&.disabled,
&:disabled{
Expand Down
5 changes: 5 additions & 0 deletions src/components/Dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ export default {
isOpen: false
};
},
provide() {
return {
closeDropDown: this.closeDropDown
}
},
methods: {
toggleDropDown() {
this.isOpen = !this.isOpen;
Expand Down
9 changes: 6 additions & 3 deletions src/components/Navbar/NavLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script>
export default {
name: 'nav-link',
inject: ['close'],
inject: ['closeNavbar', 'closeDropDown'],
props: {
to: {
type: [String, Object],
Expand All @@ -25,8 +25,11 @@ export default {
},
methods: {
closeNav() {
if (this.close) {
this.close();
if (this.closeNavbar) {
this.closeNavbar();
}
if (this.closeDropDown) {
this.closeDropDown()
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navbar/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default {
},
provide() {
return {
close: this.close
closeNavbar: this.close
};
},
components: {
Expand Down
13 changes: 9 additions & 4 deletions src/layout/MainFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@
</nav>
<div class="copyright">
&copy; {{ year }}, Designed by
<a href="https:///www.invisionapp.com" target="_blank" rel="noopener">Invision</a>.
Coded by
<a href="https://binarcode.com" target="_blank" rel="noopener">BinarCode</a>
<a href="https:///www.invisionapp.com" target="_blank" rel="noopener"
>Invision</a
>. Coded by
<a href="https://binarcode.com" target="_blank" rel="noopener"
>BinarCode</a
>
and
<a href="https://www.creative-tim.com" target="_blank" rel="noopener">Creative Tim</a>.
<a href="https://www.creative-tim.com" target="_blank" rel="noopener"
>Creative Tim</a
>.
</div>
</div>
</footer>
Expand Down
16 changes: 16 additions & 0 deletions src/layout/MainNavbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@
<i class="now-ui-icons design_bullet-list-67"></i> Documentation
</a>
</drop-down>
<drop-down
tag="li"
title="Examples"
icon="now-ui-icons design_image"
class="nav-item"
>
<nav-link to="/landing">
<i class="now-ui-icons education_paper"></i> Landing
</nav-link>
<nav-link to="/login">
<i class="now-ui-icons users_circle-08"></i> Login
</nav-link>
<nav-link to="/profile">
<i class="now-ui-icons users_single-02"></i> Profile
</nav-link>
</drop-down>
<li class="nav-item">
<a
class="nav-link btn btn-neutral"
Expand Down
13 changes: 9 additions & 4 deletions src/layout/StarterFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,16 @@
</nav>
<div class="copyright">
&copy; {{ year }}, Designed by
<a href="https:///www.invisionapp.com" target="_blank" rel="noopener">Invision</a>.
Coded by
<a href="https://binarcode.com" target="_blank" rel="noopener">BinarCode</a>
<a href="https:///www.invisionapp.com" target="_blank" rel="noopener"
>Invision</a
>. Coded by
<a href="https://binarcode.com" target="_blank" rel="noopener"
>BinarCode</a
>
and
<a href="https://www.creative-tim.com" target="_blank" rel="noopener">Creative Tim</a>.
<a href="https://www.creative-tim.com" target="_blank" rel="noopener"
>Creative Tim</a
>.
</div>
</div>
</footer>
Expand Down
1 change: 1 addition & 0 deletions src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import MainFooter from './layout/MainFooter.vue';
Vue.use(Router);

export default new Router({
linkExactActiveClass: 'active',
routes: [
{
path: '/',
Expand Down
45 changes: 0 additions & 45 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -910,15 +910,6 @@
source-map "~0.6.1"
vue-template-es2015-compiler "^1.8.2"

"@vue/eslint-config-prettier@^4.0.1":
version "4.0.1"
resolved "https://registry.yarnpkg.com/@vue/eslint-config-prettier/-/eslint-config-prettier-4.0.1.tgz#a036d0d2193c5c836542b35a3a7c35c4e1c68c97"
integrity sha512-rJEDXPb61Hfgg8GllO3XXFP98bcIxdNNHSrNcxP/vBSukOolgOwQyZJ5f5z/c7ViPyh5/IDlC4qBnhx/0n+I4g==
dependencies:
eslint-config-prettier "^3.3.0"
eslint-plugin-prettier "^3.0.0"
prettier "^1.15.2"

"@vue/preload-webpack-plugin@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@vue/preload-webpack-plugin/-/preload-webpack-plugin-1.1.0.tgz#d768dba004261c029b53a77c5ea2d5f9ee4f3cce"
Expand Down Expand Up @@ -2882,13 +2873,6 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"

eslint-config-prettier@^3.3.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-3.6.0.tgz#8ca3ffac4bd6eeef623a0651f9d754900e3ec217"
integrity sha512-ixJ4U3uTLXwJts4rmSVW/lMXjlGwCijhBJHk8iVqKKSifeI0qgFEfWl8L63isfc8Od7EiBALF6BX3jKLluf/jQ==
dependencies:
get-stdin "^6.0.0"

eslint-loader@^2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/eslint-loader/-/eslint-loader-2.1.2.tgz#453542a1230d6ffac90e4e7cb9cadba9d851be68"
Expand All @@ -2900,13 +2884,6 @@ eslint-loader@^2.1.1:
object-hash "^1.1.4"
rimraf "^2.6.1"

eslint-plugin-prettier@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.0.1.tgz#19d521e3981f69dd6d14f64aec8c6a6ac6eb0b0d"
integrity sha512-/PMttrarPAY78PLvV3xfWibMOdMDl57hmlQ2XqFeA37wd+CJ7WSxV7txqjVPHi/AAFKd2lX0ZqfsOc/i5yFCSQ==
dependencies:
prettier-linter-helpers "^1.0.0"

eslint-plugin-vue@^4.7.1:
version "4.7.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-4.7.1.tgz#c829b9fc62582c1897b5a0b94afd44ecca511e63"
Expand Down Expand Up @@ -3217,11 +3194,6 @@ fast-deep-equal@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"

fast-diff@^1.1.2:
version "1.2.0"
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03"
integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==

fast-glob@^2.2.6:
version "2.2.6"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.6.tgz#a5d5b697ec8deda468d85a74035290a025a95295"
Expand Down Expand Up @@ -3508,11 +3480,6 @@ get-stdin@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"

get-stdin@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b"
integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==

get-stream@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
Expand Down Expand Up @@ -6137,23 +6104,11 @@ prelude-ls@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"

prettier-linter-helpers@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b"
integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==
dependencies:
fast-diff "^1.1.2"

prettier@1.16.3:
version "1.16.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.3.tgz#8c62168453badef702f34b45b6ee899574a6a65d"
integrity sha512-kn/GU6SMRYPxUakNXhpP0EedT/KmaPzr0H5lIsDogrykbaxOpOfAFfk5XA7DZrJyMAv1wlMV3CPcZruGXVVUZw==

prettier@^1.15.2:
version "1.16.4"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.4.tgz#73e37e73e018ad2db9c76742e2647e21790c9717"
integrity sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==

pretty-error@^2.0.2:
version "2.1.1"
resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3"
Expand Down

0 comments on commit f352209

Please sign in to comment.