From f57c45bb3b402060ee5b1676ab7e6017cbb01edf Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Mon, 12 Nov 2018 14:27:12 +0100 Subject: [PATCH 01/46] added locations and about me text --- assets/styles/main.scss | 8 + components/PostCard.vue | 23 +- components/ShoutButton.vue | 2 +- graphql/UserProfileQuery.js | 14 +- nuxt.config.js | 10 +- package.json | 1 + pages/admin.vue | 4 + pages/admin/categories.vue | 43 ++- pages/admin/tags.vue | 47 +++ pages/index.vue | 1 + pages/post/_slug/index.vue | 16 +- pages/post/_slug/more-info.vue | 16 +- pages/profile/_slug.vue | 21 +- pages/settings/index.vue | 202 +++++++++++- store/auth.js | 21 +- .../components/data-display/Avatar/style.scss | 2 +- .../components/data-display/Table/Table.vue | 22 +- .../components/data-display/Table/style.scss | 29 +- .../data-input/FormItem/FormItem.vue | 9 +- .../data-input/FormItem/InputError.vue | 0 .../data-input/FormItem/InputLabel.vue | 0 .../components/data-input/FormItem/style.scss | 0 .../components/data-input/Input/Input.vue | 3 +- .../components/data-input/Input/demo.md | 0 .../components/data-input/Input/style.scss | 0 .../components/data-input/Select/Select.vue | 248 ++++++++++++-- .../Select/__snapshots__/spec.js.snap | 69 ++++ .../components/data-input/Select/demo.md | 154 +++++++++ .../components/data-input/Select/spec.js | 309 ++++++++++++++++++ .../components/data-input/Select/style.scss | 148 ++++++++- .../components/data-input/shared/input.js | 23 +- .../components/data-input/shared/input.scss | 79 +++-- .../data-input/shared/multiinput.js | 49 +++ .../system/components/layout/Card/Card.vue | 23 +- .../src/system/components/layout/Card/demo.md | 17 + .../components/typography/Chip/Chip.vue | 93 ++++++ .../system/components/typography/Chip/demo.md | 62 ++++ .../components/typography/Chip/style.scss | 81 +++++ .../components/typography/Icon/Icon.vue | 14 + .../components/typography/Icon/style.scss | 27 +- styleguide/src/system/icons/svg/angellist.svg | 5 + .../src/system/icons/svg/balance-scale.svg | 5 + styleguide/src/system/icons/svg/bell.svg | 5 + styleguide/src/system/icons/svg/bullhorn.svg | 5 + styleguide/src/system/icons/svg/gamepad.svg | 5 + .../src/system/icons/svg/graduation-cap.svg | 5 + styleguide/src/system/icons/svg/leaf.svg | 5 + .../src/system/icons/svg/mouse-pointer.svg | 5 + .../src/system/icons/svg/paint-brush.svg | 5 + styleguide/src/system/icons/svg/paw.svg | 5 + styleguide/src/system/icons/svg/recycle.svg | 5 + .../src/system/icons/svg/toggle-off.svg | 5 + styleguide/src/system/icons/svg/toggle-on.svg | 5 + styleguide/src/system/icons/svg/tree.svg | 5 + .../src/system/icons/svg/university.svg | 5 + .../src/system/styles/shared/_form.scss | 12 +- .../src/system/styles/shared/_mixins.scss | 32 +- styleguide/src/system/tokens/color.yml | 4 + styleguide/src/system/tokens/font-size.yml | 2 +- styleguide/src/system/tokens/z-index.yml | 2 + yarn.lock | 98 ++++-- 61 files changed, 1960 insertions(+), 155 deletions(-) create mode 100644 pages/admin/tags.vue mode change 100644 => 100755 styleguide/src/system/components/data-input/FormItem/FormItem.vue mode change 100644 => 100755 styleguide/src/system/components/data-input/FormItem/InputError.vue mode change 100644 => 100755 styleguide/src/system/components/data-input/FormItem/InputLabel.vue mode change 100644 => 100755 styleguide/src/system/components/data-input/FormItem/style.scss mode change 100644 => 100755 styleguide/src/system/components/data-input/Input/Input.vue mode change 100644 => 100755 styleguide/src/system/components/data-input/Input/demo.md mode change 100644 => 100755 styleguide/src/system/components/data-input/Input/style.scss mode change 100644 => 100755 styleguide/src/system/components/data-input/Select/Select.vue create mode 100755 styleguide/src/system/components/data-input/Select/__snapshots__/spec.js.snap mode change 100644 => 100755 styleguide/src/system/components/data-input/Select/demo.md create mode 100755 styleguide/src/system/components/data-input/Select/spec.js mode change 100644 => 100755 styleguide/src/system/components/data-input/Select/style.scss mode change 100644 => 100755 styleguide/src/system/components/data-input/shared/input.js mode change 100644 => 100755 styleguide/src/system/components/data-input/shared/input.scss create mode 100755 styleguide/src/system/components/data-input/shared/multiinput.js create mode 100755 styleguide/src/system/components/typography/Chip/Chip.vue create mode 100755 styleguide/src/system/components/typography/Chip/demo.md create mode 100755 styleguide/src/system/components/typography/Chip/style.scss create mode 100755 styleguide/src/system/icons/svg/angellist.svg create mode 100755 styleguide/src/system/icons/svg/balance-scale.svg create mode 100755 styleguide/src/system/icons/svg/bell.svg create mode 100755 styleguide/src/system/icons/svg/bullhorn.svg create mode 100755 styleguide/src/system/icons/svg/gamepad.svg create mode 100755 styleguide/src/system/icons/svg/graduation-cap.svg create mode 100755 styleguide/src/system/icons/svg/leaf.svg create mode 100755 styleguide/src/system/icons/svg/mouse-pointer.svg create mode 100755 styleguide/src/system/icons/svg/paint-brush.svg create mode 100755 styleguide/src/system/icons/svg/paw.svg create mode 100755 styleguide/src/system/icons/svg/recycle.svg create mode 100755 styleguide/src/system/icons/svg/toggle-off.svg create mode 100755 styleguide/src/system/icons/svg/toggle-on.svg create mode 100755 styleguide/src/system/icons/svg/tree.svg create mode 100755 styleguide/src/system/icons/svg/university.svg diff --git a/assets/styles/main.scss b/assets/styles/main.scss index a631016f3..c0b082ee1 100644 --- a/assets/styles/main.scss +++ b/assets/styles/main.scss @@ -119,3 +119,11 @@ blockquote { margin-top: 0; } } + +hr { + border: 0; + width: 100%; + color: $color-neutral-80; + background-color: $color-neutral-80; + height: 1px !important; +} diff --git a/components/PostCard.vue b/components/PostCard.vue index 59f19d1f2..fbe6a0996 100644 --- a/components/PostCard.vue +++ b/components/PostCard.vue @@ -24,13 +24,22 @@ diff --git a/components/ShoutButton.vue b/components/ShoutButton.vue index 84de685f1..011b30f38 100644 --- a/components/ShoutButton.vue +++ b/components/ShoutButton.vue @@ -6,7 +6,7 @@ :disabled="disabled || loading" danger size="x-large" - icon="heart" + icon="bullhorn" @click="shout" /> diff --git a/graphql/UserProfileQuery.js b/graphql/UserProfileQuery.js index 38646e386..de1992885 100644 --- a/graphql/UserProfileQuery.js +++ b/graphql/UserProfileQuery.js @@ -6,14 +6,11 @@ export default gql(` id name avatar - createdAt - friendsCount - friends { - id + about + location { name - slug - avatar } + createdAt badges { id key @@ -63,6 +60,11 @@ export default gql(` deleted image createdAt + categories { + id + name + icon + } author { User { id diff --git a/nuxt.config.js b/nuxt.config.js index 59588a8ee..33a1cc314 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -1,10 +1,5 @@ const pkg = require('./package') -const envWhitelist = [ - 'NODE_ENV', - 'BACKEND_URL', - 'MAINTENANCE' -] - +const envWhitelist = ['NODE_ENV', 'BACKEND_URL', 'MAINTENANCE'] module.exports = { mode: 'universal', @@ -102,6 +97,7 @@ module.exports = { */ modules: [ '@nuxtjs/apollo', + '@nuxtjs/axios', ['@nuxtjs/dotenv', { only: envWhitelist }], ['nuxt-env', { keys: envWhitelist }] ], @@ -129,7 +125,7 @@ module.exports = { // }, // required clientConfigs: { - default: '~/plugins/apollo-config.js', + default: '~/plugins/apollo-config.js' } }, diff --git a/package.json b/package.json index 2125914ff..f24b443e0 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ }, "dependencies": { "@nuxtjs/apollo": "^4.0.0-rc3", + "@nuxtjs/axios": "^5.3.4", "@nuxtjs/dotenv": "^1.3.0", "accounting": "^0.4.1", "cross-env": "^5.2.0", diff --git a/pages/admin.vue b/pages/admin.vue index 13f4b6705..48250e000 100644 --- a/pages/admin.vue +++ b/pages/admin.vue @@ -47,6 +47,10 @@ export default { name: 'Categories', path: `/admin/categories` }, + { + name: 'Tags', + path: `/admin/tags` + }, { name: 'Settings', path: `/admin/settings` diff --git a/pages/admin/categories.vue b/pages/admin/categories.vue index 0c7f18075..045542541 100644 --- a/pages/admin/categories.vue +++ b/pages/admin/categories.vue @@ -1,7 +1,42 @@ + + diff --git a/pages/admin/tags.vue b/pages/admin/tags.vue new file mode 100644 index 000000000..45ab9a2a3 --- /dev/null +++ b/pages/admin/tags.vue @@ -0,0 +1,47 @@ + + + diff --git a/pages/index.vue b/pages/index.vue index e267c6121..846dc9f98 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -106,6 +106,7 @@ export default { categories { id name + icon } shoutedCount } diff --git a/pages/post/_slug/index.vue b/pages/post/_slug/index.vue index 528be4fd4..adda11db9 100644 --- a/pages/post/_slug/index.vue +++ b/pages/post/_slug/index.vue @@ -17,11 +17,18 @@ :count="post.shoutedCount" :post-id="post.id" /> -
+   + +