Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat search #52

Merged
merged 18 commits into from
Jun 16, 2021
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ module.exports = {
root: true,
env: {
browser: true,
node: true
node: true,
},
parserOptions: {
parser: 'babel-eslint'
parser: 'babel-eslint',
},
extends: [
'@nuxtjs',
'prettier',
'plugin:prettier/recommended',
'plugin:nuxt/recommended'
'plugin:nuxt/recommended',
],
plugins: ['prettier'],
rules: {
quotes: ['warn', 'single'],
semi: ['warn', 'always'],
indent: ['warn', 2],
'no-multi-spaces': ['warn'],
'vue/comment-directive': 'off'
}
'vue/comment-directive': 'off',
},
};
11 changes: 0 additions & 11 deletions assets/logos/ccv-logo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,7 @@
</template>

<style lang="scss" scoped>
@import 'bulma';
.ccv-logo {
margin-left: $size-5;
z-index: 100;
}
.c1 {
fill: var(--color-yellow);
}
.c2 {
fill: var(--color-green);
}
.v {
fill: var(--color-yellow);
}
</style>
14 changes: 13 additions & 1 deletion assets/scss/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,21 @@
@extend .button;
border-radius: 0 !important;
font-family: $font-family-bold;
white-space: normal;
line-height: 1.2;
}

.d-button-delete {
@extend .delete;
border-radius: 0 !important;
}
}

.button-nostyle {
background: transparent;
border: none;
cursor: pointer;
color: var(--color-link);
&:hover {
color: var(--color-dark);
}
}
14 changes: 12 additions & 2 deletions assets/scss/_color.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import './node_modules/bulma/bulma.sass';

$variants: "yellow",
"yellow-light",
"yellow-lighter",
Expand Down Expand Up @@ -56,3 +54,15 @@ $variants: "yellow",
@extend .has-text-grey-dark;
@extend .has-background-light;
}

svg {
.c1 {
fill: var(--color-yellow);
}
.c2 {
fill: var(--color-green);
}
.v {
fill: var(--color-yellow);
}
}
20 changes: 0 additions & 20 deletions assets/scss/_footer.scss

This file was deleted.

4 changes: 1 addition & 3 deletions assets/scss/_helpers.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import "./node_modules/bulma/bulma.sass";

// cursor
.has-cursor-pointer {
cursor: pointer;
Expand Down Expand Up @@ -57,4 +55,4 @@
@include mobile {
padding-top: 2rem;
}
}
}
14 changes: 0 additions & 14 deletions assets/scss/_navbar.scss

This file was deleted.

5 changes: 1 addition & 4 deletions assets/scss/disco.scss
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
@charset "utf-8";
@import 'variables';

@import './node_modules/bulma/bulma.sass';
@import 'bulma/bulma.sass';

@import 'helpers';

@import 'banner';
@import 'button';
@import 'border';
@import 'card';
@import 'color';
@import 'dialog';
@import 'expandable';
@import 'footer';
@import 'hero';
@import 'icon';
@import 'layout';
@import 'navbar';
@import 'typography';
26 changes: 13 additions & 13 deletions components/ComparisonTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
:key="cat"
class="px-4 py-4"
:class="[
ind % 2 === 0 ? 'has-background-light' : 'has-background-white'
ind % 2 === 0 ? 'has-background-light' : 'has-background-white',
]"
>
<h2 class="subtitle">{{ cat | humanize }}</h2>
Expand All @@ -37,45 +37,45 @@
<div v-if="feat.name === cat" class="class-item">
<span v-if="feat.class === 'fast'" class="title class-item"
><span class="icon is-size-3 has-text-warning"
><i class="mdi mdi-speedometer"/></span
><i class="mdi mdi-speedometer" /></span
>{{ feat.class }}</span
>
<span
v-else-if="feat.class === 'faster'"
class="title class-item"
><span class="icon is-size-3 has-text-link"
><i class="mdi mdi-speedometer"/></span
><i class="mdi mdi-speedometer" /></span
>{{ feat.class }}</span
>
<span
v-else-if="feat.class === 'fastest'"
class="title class-item"
><span class="icon is-size-3 has-text-success"
><i class="mdi mdi-speedometer"/></span
><i class="mdi mdi-speedometer" /></span
>{{ feat.class }}</span
>
<span v-else-if="feat.class === true" class="title class-item"
><span class="icon is-size-3 has-text-success"
><i class="mdi mdi-check"/></span
><i class="mdi mdi-check" /></span
>Yes</span
>
<span
v-else-if="feat.class === 'partial'"
class="title class-item"
><span class="icon is-size-3 has-text-success"
><i class="mdi mdi-check"/></span
><i class="mdi mdi-check" /></span
>{{ feat.class }}</span
>
<span v-else-if="feat.class === false" class="title class-item"
><span class="icon is-size-3 has-text-danger"
><i class="mdi mdi-close"/></span
><i class="mdi mdi-close" /></span
>No</span
>
<span
v-else-if="[1, 2, 3].includes(feat.class)"
class="title class-item"
><span class="icon is-size-3 has-text-warning"
><i class="mdi mdi-shield-half-full"/></span
><i class="mdi mdi-shield-half-full" /></span
>{{ feat.class }}</span
>
<span v-else class="title">{{ feat.class }}</span>
Expand All @@ -100,18 +100,18 @@ export default {
const cleanStr = str.replace(/_/g, ' ');
const upperFirst = cleanStr.charAt(0).toUpperCase() + cleanStr.slice(1);
return upperFirst;
}
},
},
props: {
data: {
type: [Array, Object],
required: true
required: true,
},
categories: {
type: Array,
required: true
}
}
required: true,
},
},
};
</script>

Expand Down
44 changes: 15 additions & 29 deletions components/ServiceSelection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
v-for="(s, i) in data"
:id="'field' + s.service + i"
:key="'field' + s.service + i"
class="field service-box"
class="field service-box my-1 p-4"
:class="[
selectedData.includes(s.service)
? 'has-background-info'
: 'has-background-light'
: 'has-background-light',
]"
>
<button
Expand All @@ -19,12 +19,12 @@
<span v-if="selectedData.includes(s.service)" class="icon is-size-2"
><i class="mdi mdi-checkbox-marked"
/></span>
<span v-else class="icon is-size-2"><i class="mdi mdi-square"/></span>
<span v-else class="icon is-size-2"><i class="mdi mdi-square" /></span>
</button>
<button class="button-nostyle service-label" @click="toggleShowModal(s)">
<span
>{{ s.service | humanize }}
<span class="icon"><i class="mdi mdi-information"/></span>
<span class="icon"><i class="mdi mdi-information" /></span>
</span>
</button>
</div>
Expand All @@ -48,34 +48,34 @@
</template>

<script>
import DModal from '@/components/base/DModal';
import DModal from '@/components/base/DModal.vue';

export default {
components: {
DModal
DModal,
},
filters: {
humanize(str) {
const cleanStr = str.replace(/_/g, ' ');
const upperFirst = cleanStr.charAt(0).toUpperCase() + cleanStr.slice(1);
return upperFirst;
}
},
},
props: {
data: {
type: Array,
required: true
required: true,
},
selectedData: {
type: Array,
required: true
}
required: true,
},
},
data() {
return {
selected: [],
showModal: false,
modalData: ''
modalData: '',
};
},
watch: {
Expand All @@ -85,8 +85,8 @@ export default {
if (newVal.length === 0) {
this.selected = [];
}
}
}
},
},
},
methods: {
change(service) {
Expand All @@ -100,24 +100,19 @@ export default {
toggleShowModal(data) {
this.modalData = data;
this.showModal = true;
}
}
},
},
};
</script>

<style lang="scss" scoped>
@import '~bulma/sass/utilities/_all';
@import '~bulma/sass/helpers/spacing';
.service-selection {
display: flex;
flex-basis: 30%;
flex-wrap: wrap;
align-content: flex-start;
}
.service-box {
@extend .my-1;
@extend .px-4;
@extend .py-4;
width: 100%;
border-radius: 0;
border: none;
Expand All @@ -132,13 +127,4 @@ export default {
.mdi-checkbox-marked {
align-self: flex-end;
}
.button-nostyle {
background: transparent;
border: none;
cursor: pointer;
color: var(--color-link);
&:hover {
color: var(--color-dark);
}
}
</style>
8 changes: 4 additions & 4 deletions components/base/BrownLogo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import BrownLogo from '@/assets/logos/brown-logo.vue';

export default {
components: {
BrownLogo
BrownLogo,
},
props: {
size: {
Expand All @@ -18,8 +18,8 @@ export default {
validator(value) {
// The value must match one of these strings
return ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'].includes(value);
}
}
}
},
},
},
};
</script>
Loading