diff --git a/api/campuses.js b/api/campuses.js new file mode 100644 index 0000000..e37f29f --- /dev/null +++ b/api/campuses.js @@ -0,0 +1,14 @@ +export const ENTITY_PLURAL = 'campuses'; + +export default axios => ({ + async getCampuses(mask, { search = null } = {}) { + const response = await axios.get( + `/${ENTITY_PLURAL}`, + { + params: { mask, search }, + }, + ); + + return response; + }, +}); diff --git a/api/forms.js b/api/forms.js new file mode 100644 index 0000000..2874a8a --- /dev/null +++ b/api/forms.js @@ -0,0 +1,10 @@ +export const ENTITY_PLURAL = 'forms'; + +export default axios => ({ + async postFormContact(fields) { + return axios.post( + `/${ENTITY_PLURAL}/contact`, + fields, + ); + }, +}); diff --git a/api/index.js b/api/index.js index 1822ad0..5bce9f7 100644 --- a/api/index.js +++ b/api/index.js @@ -1,12 +1,16 @@ import rides from './rides'; import routing from './routing'; import status from './status'; +import campuses from './campuses'; +import forms from './forms'; export default function (ctx, inject) { const api = { rides: rides(ctx.$axios), routing, status, + campuses: campuses(ctx.$axios), + forms: forms(ctx.$axios), }; ctx.$api = api; inject('api', api); diff --git a/assets/css/_variables.scss b/assets/css/_variables.scss index dc7289d..100bd7b 100644 --- a/assets/css/_variables.scss +++ b/assets/css/_variables.scss @@ -1,9 +1,10 @@ /************** * Colors * **************/ -$blue-medium: #005cee; +$blue-medium: #0053b3; $blue-light: #006be6; $blue-dark: #003b80; +$color-input: #abb8cb; $white: hsl(0, 0%, 100%); $white-20: rgba($white, 0.2); @@ -21,24 +22,30 @@ $background: $blue-light; $primary: $blue-medium; $family-sans-serif: 'Source Sans Pro', sans-serif; $link: $white; -$link-hover: darken($white, 15%); +$link-hover: $white; $title-color: $text; $menu-item-radius: 0; +//Navbar +$navbar-item-hover-background-color: transparent; +$navbar-item-color: $white; +$navbar-item-img-max-height: none; + +//Title +$subtitle-color: $text; + // Forms -$radius: 0; -$input-background-color: transparent; -$input-border-color: $text; -$input-hover-border-color: $text; -$input-color: $text; -$input-hover-color: $text; -$input-icon-color: $text; -$input-icon-active-color: $text; +$label-color: $blue-medium; +$input-background-color: $white; +$input-border-color: $color-input; +$input-hover-border-color: $color-input; +$input-color: $black; +$input-hover-color: $color-input; $input-shadow: none; $input-focus-box-shadow-size: 0; -$input-focus-border-color: $link-hover; +$input-focus-border-color: $color-input; // Buttons - $button-color: $primary; $button-hover-color: $button-color; +$button-background-color:transparent; diff --git a/assets/css/elements/button.scss b/assets/css/elements/button.scss deleted file mode 100644 index 6d7925f..0000000 --- a/assets/css/elements/button.scss +++ /dev/null @@ -1,4 +0,0 @@ -.button { - text-transform: uppercase; - font-weight: $weight-semibold; -} diff --git a/assets/css/elements/form.scss b/assets/css/elements/form.scss deleted file mode 100644 index 6463d26..0000000 --- a/assets/css/elements/form.scss +++ /dev/null @@ -1,18 +0,0 @@ -.input { - border: none; - border-bottom: 1px solid; - &::placeholder { - color: white; - opacity: 0.9; - } -} - -label.vfl-label { - color: $text; - &.vfl-label-on-input { - color: $text; - } - &.vfl-label-on-focus { - color: $text; - } -} diff --git a/assets/css/main.scss b/assets/css/main.scss index 710b745..2312b76 100644 --- a/assets/css/main.scss +++ b/assets/css/main.scss @@ -7,18 +7,17 @@ @import "~bulma/sass/base/helpers.sass"; @import "~bulma/sass/elements/button.sass"; -@import "elements/button"; @import "~bulma/sass/elements/container.sass"; //@import "~bulma/sass/elements/content.sass"; @import "~bulma/sass/elements/form.sass"; -@import "elements/form"; @import "~bulma/sass/elements/icon.sass"; +@import "~bulma/sass/elements/notification.sass"; //@import "~bulma/sass/elements/image.sass"; //@import "~bulma/sass/elements/progress.sass"; //@import "~bulma/sass/elements/table.sass"; //@import "~bulma/sass/elements/tag.sass"; -//@import "~bulma/sass/elements/title.sass"; -//@import "~bulma/sass/elements/other.sass"; +@import "~bulma/sass/elements/title.sass"; +@import "~bulma/sass/elements/other.sass"; //@import "~bulma/sass/components/breadcrumb.sass"; //@import "~bulma/sass/components/card.sass"; @@ -30,17 +29,10 @@ //@import "~bulma/sass/components/pagination.sass"; //@import "~bulma/sass/components/panel.sass"; //@import "~bulma/sass/components/tabs.sass"; +@import "~bulma/sass/components/navbar.sass"; -//@import "~bulma/sass/grid/columns.sass"; -//@import "~bulma/sass/grid/tiles.sass"; +@import "~bulma/sass/grid/columns.sass"; +@import "~bulma/sass/grid/tiles.sass"; //@import "~bulma/sass/layout/hero.sass"; -//@import "~bulma/sass/layout/section.sass"; - - -html, body, #__nuxt, #__layout { - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - background: $background; - height: 100%; -} +@import "~bulma/sass/layout/section.sass"; diff --git a/components/footer.vue b/components/footer.vue new file mode 100644 index 0000000..5625bde --- /dev/null +++ b/components/footer.vue @@ -0,0 +1,66 @@ + + + diff --git a/components/form/field.vue b/components/form/field.vue index 2312aca..9ea4895 100644 --- a/components/form/field.vue +++ b/components/form/field.vue @@ -1,48 +1,26 @@ - diff --git a/components/header.vue b/components/header.vue new file mode 100644 index 0000000..3cb53ae --- /dev/null +++ b/components/header.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/layouts/default.vue b/layouts/default.vue index 772a283..19bfb1f 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -1,3 +1,16 @@ + + diff --git a/layouts/ride.vue b/layouts/ride.vue new file mode 100644 index 0000000..772a283 --- /dev/null +++ b/layouts/ride.vue @@ -0,0 +1,3 @@ + diff --git a/nuxt.config.js b/nuxt.config.js index 72c202b..dc8dc22 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -41,6 +41,8 @@ module.exports = { '~/api', '~/plugins/axios.js', '~/plugins/socket.js', + '~/plugins/markdown.js', + '~/plugins/validator.js', ], /* @@ -63,7 +65,7 @@ module.exports = { packs: [ { package: '@fortawesome/free-solid-svg-icons', - icons: ['faFlag', 'faMapMarkerAlt', 'faDotCircle'], + icons: ['faFlag', 'faMapMarkerAlt', 'faDotCircle', 'faChevronRight'], }, ], }, diff --git a/package.json b/package.json index 52e07a6..a9080e4 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,9 @@ "qs": "^6.6.0", "sass-loader": "^7.1.0", "socket.io-client": "^2.2.0", + "vee-validate": "^2.1.7", "vue-float-label": "^1.6.1", + "vue-simple-markdown": "^1.0.9", "vue-socket.io-extended": "^3.2.1" }, "devDependencies": { diff --git a/pages/_ride_id.vue b/pages/_ride_id.vue index 4edfd19..e716808 100644 --- a/pages/_ride_id.vue +++ b/pages/_ride_id.vue @@ -126,6 +126,8 @@ export default { ecBox, }, + layout: 'ride', + computed: { ...mapGetters({ ride: 'ride/ride', diff --git a/pages/contact.vue b/pages/contact.vue new file mode 100644 index 0000000..fd97522 --- /dev/null +++ b/pages/contact.vue @@ -0,0 +1,423 @@ +