From 8a2843452d79c709c54365939a96f3ba7dcd716d Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Fri, 27 Nov 2020 16:36:21 -0600 Subject: [PATCH 1/5] Remove redundant option --- nuxt.config.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/nuxt.config.js b/nuxt.config.js index 3854a8d..c8578e6 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -10,12 +10,10 @@ const listsOptions = [ { buildMethod: buildAppList, path: '/static/app-list.json', - route: app => '/app/' + app.slug }, { buildMethod: buildGamesList, path: '/static/game-list.json', - route: app => '/game/' + app.slug } ] From f3d275935e794fa77d6431253434f2003ab2180f Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Fri, 27 Nov 2020 16:36:28 -0600 Subject: [PATCH 2/5] Add Categories page --- components/navbar.vue | 4 ++ pages/categories.vue | 99 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 pages/categories.vue diff --git a/components/navbar.vue b/components/navbar.vue index def8a9b..5c6d0dd 100644 --- a/components/navbar.vue +++ b/components/navbar.vue @@ -142,6 +142,10 @@ export default { label: 'Home', url: '/', }, + { + label: 'Categories', + url: '/categories', + }, { label: 'Developer Tools', url: '/kind/developer-tools', diff --git a/pages/categories.vue b/pages/categories.vue new file mode 100644 index 0000000..71b032b --- /dev/null +++ b/pages/categories.vue @@ -0,0 +1,99 @@ + + + From 02e90c2f965a8296ff5c4882637c019bc7455e96 Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Fri, 27 Nov 2020 16:37:08 -0600 Subject: [PATCH 3/5] Import lists dynamically --- pages/categories.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/categories.vue b/pages/categories.vue index 71b032b..0e706eb 100644 --- a/pages/categories.vue +++ b/pages/categories.vue @@ -40,14 +40,14 @@ import LinkButton from '~/components/link-button.vue' import { byTimeThenNull } from '~/helpers/sort-list.js' -import appList from '~/static/app-list.json' -import gamelist from '~/static/game-list.json' +// import appList from '~/static/app-list.json' +// import gamelist from '~/static/game-list.json' export default { async asyncData () { - // const { default: appList } = await import('~/static/app-list.json') - // const { default: gamelist } = await import('~/static/game-list.json') + const { default: appList } = await import('~/static/app-list.json') + const { default: gamelist } = await import('~/static/game-list.json') const allList = [ ...appList.sort(byTimeThenNull), From 61a9aa3356b2d6c49ca0c9415167498d28ce7438 Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Fri, 27 Nov 2020 16:56:21 -0600 Subject: [PATCH 4/5] List example apps below categories --- pages/categories.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pages/categories.vue b/pages/categories.vue index 0e706eb..822317c 100644 --- a/pages/categories.vue +++ b/pages/categories.vue @@ -17,12 +17,12 @@
{{ section.label }}
-
{{ section.label }}
+
{{ section.appNames.slice(0, 25).join(', ') }}, etc...
@@ -61,9 +61,16 @@ export default { // console.log('app.section.slug', app.section.slug) - if (sectionList.hasOwnProperty(app.section.slug)) return + if (sectionList.hasOwnProperty(app.section.slug)) { + sectionList[app.section.slug].appNames.push(app.name) - sectionList[app.section.slug] = app.section + return + } + + sectionList[app.section.slug] = { + ...app.section, + appNames: [ app.name ] + } }) return { From 188a0277236cdc5397c26b6597acb2ba0a451626 Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Fri, 27 Nov 2020 16:56:56 -0600 Subject: [PATCH 5/5] Remove categories from main menu --- components/navbar.vue | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/components/navbar.vue b/components/navbar.vue index 5c6d0dd..d5d611d 100644 --- a/components/navbar.vue +++ b/components/navbar.vue @@ -146,26 +146,6 @@ export default { label: 'Categories', url: '/categories', }, - { - label: 'Developer Tools', - url: '/kind/developer-tools', - }, - { - label: 'Music Tools', - url: '/kind/music-and-audio-tools', - }, - { - label: 'Video and Motion Tools', - url: '/kind/video-and-motion-tools', - }, - { - label: 'Photo Tools', - url: '/kind/photo-and-graphic-tools', - }, - { - label: 'Entertainment', - url: '/kind/entertainment-and-media-apps', - }, { label: 'Games', url: '/games',