From 804b705c65c97e0656af95d6424baee8a6937751 Mon Sep 17 00:00:00 2001 From: hamdy Date: Fri, 13 Nov 2020 15:03:51 +0200 Subject: [PATCH] fix project page --- gridsome.config.js | 2 + gridsome.server.js | 2 +- src/pages/Projects.vue | 7 ++- src/templates/Project.vue | 112 ++++++++++++++++++++++++++++++-------- 4 files changed, 99 insertions(+), 24 deletions(-) diff --git a/gridsome.config.js b/gridsome.config.js index 18b2ef133..d871f0cfe 100644 --- a/gridsome.config.js +++ b/gridsome.config.js @@ -71,6 +71,8 @@ module.exports = { }, refs: { author: 'Person', + members: 'Person', + tags: { typeName: 'Tag', create: true diff --git a/gridsome.server.js b/gridsome.server.js index f14ef4f8d..cf44cf8a9 100644 --- a/gridsome.server.js +++ b/gridsome.server.js @@ -32,7 +32,7 @@ module.exports = function (api) { options.tags = (typeof options.tags === 'string') ? options.tags.split(',').map(string => string.trim()) : options.tags; options.countries = (typeof options.countries === 'string') ? options.countries.split(',').map(string => string.trim()) : options.countries; options.cities = (typeof options.cities === 'string') ? options.cities.split(',').map(string => string.trim()) : options.cities; - options.members = (typeof options.cities === 'string') ? options.members.split(',').map(string => string.trim()) : options.members; + options.members = (typeof options.members === 'string') ? options.members.split(',').map(string => string.trim()) : options.members; options.author = (typeof options.author === 'string') ? options.author.split(',').map(string => string.trim()) : options.author; return { ...options diff --git a/src/pages/Projects.vue b/src/pages/Projects.vue index 6794b6684..45208e4fa 100644 --- a/src/pages/Projects.vue +++ b/src/pages/Projects.vue @@ -30,7 +30,12 @@ query($page:Int) { node { title path - members + members { + id + name + image(width:64, height:64, fit:inside) + path + } rank linkedin startDate : startdate(format:"MM YYYY") diff --git a/src/templates/Project.vue b/src/templates/Project.vue index 9de41ff65..b10f157dd 100644 --- a/src/templates/Project.vue +++ b/src/templates/Project.vue @@ -10,8 +10,47 @@

{{ $page.project.title }}

+

{{ $page.project.bio }}

-
+
+
+
+
    +
  • + + + +
  • +
+
+
+

+ + {{ + $page.project.humanTime + }} + +

+

+ + {{ + $page.project.startDate + }} + + {{ $page.project.status }} +

+
+
 · 
+ +
+
+
+
+
+
+
    +
  • + + + +
  • +
+
+
+
+
+
+ {{ tag.title }} +
+
@@ -31,25 +105,6 @@
- - -
- -
- -
-
- {{ tag.title }} -