diff --git a/client/src/graphql/gql/surveyQuery.gql b/client/src/graphql/gql/surveyQuery.gql new file mode 100644 index 00000000..19f60bd7 --- /dev/null +++ b/client/src/graphql/gql/surveyQuery.gql @@ -0,0 +1,10 @@ +query SurveyQuery($id: ID!) { + survey(id: $id) { + id + title + data + answer { + data + } + } +} diff --git a/client/src/main.js b/client/src/main.js index d8157873..d34edd7c 100644 --- a/client/src/main.js +++ b/client/src/main.js @@ -108,7 +108,6 @@ Vue.use(VeeValidate, { Vue.filter('date', dateFilter); - /* eslint-disable no-new */ new Vue({ el: '#app', diff --git a/client/src/pages/survey.vue b/client/src/pages/survey.vue index 2ab45cdd..fc8e0e62 100644 --- a/client/src/pages/survey.vue +++ b/client/src/pages/survey.vue @@ -1,37 +1,107 @@ + + diff --git a/client/src/router/index.js b/client/src/router/index.js index 6b9b54b3..a06fc241 100644 --- a/client/src/router/index.js +++ b/client/src/router/index.js @@ -25,6 +25,7 @@ import Router from 'vue-router' import editProject from '@/pages/editProject' import newProject from '@/pages/newProject' import surveyPage from '@/pages/survey' +// import styleGuidePage from '@/pages/styleguide' import store from '@/store/index'; @@ -87,9 +88,11 @@ const routes = [ ] }, { - path: '/survey', - component: surveyPage + path: '/survey/:id', + component: surveyPage, + props: true }, + // {path: '/styleguide', component: styleGuidePage}, {path: '*', component: p404} ]; diff --git a/client/src/styles/_survey.scss b/client/src/styles/_survey.scss new file mode 100644 index 00000000..c854eb23 --- /dev/null +++ b/client/src/styles/_survey.scss @@ -0,0 +1,28 @@ +.survey { + &__panel-title { + @include main-title; + margin-bottom: $large-spacing*2; + span { + @include main-title; + } + } + + &__panel-description { + @include regular-paragraph; + line-height: 1.5; + margin-bottom: $large-spacing; + } + + &__question-title { + @include heading-4; + margin-bottom: $medium-spacing; + span { + @include heading-4; + } + } + + &__input { + width: 100%; + margin-bottom: $medium-spacing; + } +} diff --git a/client/src/styles/main.scss b/client/src/styles/main.scss index 87f9760f..7315029b 100644 --- a/client/src/styles/main.scss +++ b/client/src/styles/main.scss @@ -14,3 +14,4 @@ @import "article"; @import "actions"; @import "top-navigation"; +@import "survey";