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: Add WIP lineup app #138

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/lineup/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead
15 changes: 15 additions & 0 deletions apps/lineup/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
root: true,
env: {
node: true,
},
extends: ["plugin:vue/essential", "eslint:recommended", "@vue/prettier"],
parserOptions: {
parser: "babel-eslint",
},
rules: {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
"comma-dangle": "off",
},
};
22 changes: 22 additions & 0 deletions apps/lineup/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.DS_Store
node_modules
/dist

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
24 changes: 24 additions & 0 deletions apps/lineup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# lineup

## Project setup
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Lints and fixes files
```
npm run lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
3 changes: 3 additions & 0 deletions apps/lineup/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"]
};
33 changes: 33 additions & 0 deletions apps/lineup/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "lineup",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.8.0",
"vue": "^2.6.12",
"vue-material": "^1.0.0-beta-15",
"vue-router": "^3.4.9",
"vue-the-mask": "^0.11.1",
"vuex": "^3.6.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.4.0",
"@vue/cli-plugin-eslint": "~4.4.0",
"@vue/cli-plugin-router": "~4.4.0",
"@vue/cli-plugin-vuex": "~4.4.0",
"@vue/cli-service": "~4.4.0",
"@vue/eslint-config-prettier": "^6.0.0",
"babel-eslint": "^10.1.0",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^6.2.2",
"node-sass": "^4.12.0",
"prettier": "^1.19.1",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.12"
}
}
Binary file added apps/lineup/public/favicon.ico
Binary file not shown.
25 changes: 25 additions & 0 deletions apps/lineup/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<link
rel="stylesheet"
href="//fonts.googleapis.com/css?family=Roboto:400,500,700,400italic|Material+Icons"
/>
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
properly without JavaScript enabled. Please enable it to
continue.</strong
>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
23 changes: 23 additions & 0 deletions apps/lineup/src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<template>
<div id="app">
<router-link :to="{ name: 'Home' }"><h1>Lineup</h1></router-link>
<main class="container">
<router-view />
</main>
</div>
</template>

<style lang="scss">
@import "./index.scss";

@import "~vue-material/dist/theme/engine"; // Import the theme engine

@import "~vue-material/dist/theme/all";

#app {
padding: 2rem;
.md-button {
margin-left: 0;
}
}
</style>
Binary file added apps/lineup/src/assets/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Empty file.
25 changes: 25 additions & 0 deletions apps/lineup/src/components/Eval-Values.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<template>
<div class="eval-values">
Values
<picker-btn
v-for="value in values"
:key="value.id"
:id="value.id"
:name="value.name"
/>
</div>
</template>

<script>
import { values } from "../store/framework/values";
import PickerBtn from "./PickerBtn.vue";
export default {
name: "EvalValues",
data() {
return { values };
},
components: { PickerBtn },
};
</script>

<style lang="sass" scoped></style>
18 changes: 18 additions & 0 deletions apps/lineup/src/components/PickerBtn.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<template>
<div :id="id">
<button type="button">{{ name }}</button>
<select></select>
</div>
</template>

<script>
export default {
name: "PickerBtn",
props: {
id: String,
name: String,
},
};
</script>

<style lang="scss" scoped></style>
66 changes: 66 additions & 0 deletions apps/lineup/src/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
$lilac: #edc9ffff;
$pink: #fed4e7ff;
$melon: #f2b79fff;
$golden: #e5b769ff;
$citrine: #d8cc34ff;
$green: #94c794;
$opal: #c0d8cf;
$black: #222222;
$text: #ddd;





body {
margin: 0;
padding: 0;

p {
font-size: 16px;
}

h1,
h2,
h3,
h4 {
font-weight: 700;
margin-top: 0;
}

h1 {
font-size: 2.5rem;
}

h2 {
font-size: 2rem;
}

h3 {
font-size: 1.5rem;
}



.container {
width: 80%;
margin: 0 auto;
max-width: 1280px;
}
}

#app {
font-family: "Roboto", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: $text;
// background-color: $black;
min-height: 100vh;
width: 100%;
box-sizing: border-box;
padding-top: 3rem;

a {
color: $citrine;
}
}
27 changes: 27 additions & 0 deletions apps/lineup/src/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import {
MdField,
MdCard,
MdDatepicker,
MdButton,
MdDialog
} from "vue-material/dist/components";
import "vue-material/dist/vue-material.min.css";
import "vue-material/dist/theme/default-dark.css";

Vue.use(MdField);
Vue.use(MdCard);
Vue.use(MdDatepicker);
Vue.use(MdButton);
Vue.use(MdDialog);

Vue.config.productionTip = false;

new Vue({
router,
store,
render: h => h(App)
}).$mount("#app");
58 changes: 58 additions & 0 deletions apps/lineup/src/router/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";

Vue.use(VueRouter);

const routes = [
{
path: "/",
name: "Home",
component: Home,
},
{
path: "/add",
name: "Add",
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ "../views/Add.vue"),
},
{
path: "/eval",
component: () =>
import(/* webpackChunkName: "eval-values"*/ "../views/Eval.vue"),
children: [
{
path: "",
component: () => import("../components/Eval-Values.vue"),
},
{
path: "funcs",
component: () =>
import(
/* webpackChunkName: "eval-funcs"*/ "../components/Eval-Functions.vue"
),
},
{
path: "powerups",
component: () =>
import(
/* webpackChunkName: "eval-powerup"*/ "../components/Eval-Powerups.vue"
),
},
],
},
{
path: "/review",
name: "Review",
component: () => import("../views/Review.vue"),
},
];

const router = new VueRouter({
mode: "history",
base: process.env.BASE_URL,
routes,
});
export default router;
18 changes: 18 additions & 0 deletions apps/lineup/src/store/framework/functions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export default [
{
id: "func0",
name: "Work",
subtypes: ["Independent", "Collaborative"],
},
{ id: "func1", name: "Cooking" },
{ id: "func2", name: "Storage" },
{
id: "func3",
name: "Gaming",
subtypes: ["Independent", "Collaborative"],
},
{ id: "func4", name: "Eating" },
{ id: "func5", name: "Relaxing", subtypes: ["Independent", "Group"] },
{ id: "func6", name: "Gardening", subtypes: ["Food", "Nonfood"] },
{ id: "func7", name: "Hobbies", subtypes: ["V", "J", "Shared", "Jim"] },
];
5 changes: 5 additions & 0 deletions apps/lineup/src/store/framework/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import values from "./values";
import powerUps from "./powerUps";
import funcs from "./functions";

module.exports = { values, funcs, powerUps };
1 change: 1 addition & 0 deletions apps/lineup/src/store/framework/powerUps.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default [{ id: "powerUp0", name: "Urgent", action: "*2" }];
8 changes: 8 additions & 0 deletions apps/lineup/src/store/framework/values.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default [
{ id: "val0", name: "Safety", "max-val": 6 },
{ id: "val1", name: "QOL - Function", "max-val": 5 },
{ id: "val2", name: "QOL - Comfort", "max-val": 4 },
{ id: "val3", name: "Eco conscious", "max-val": 3 },
{ id: "val4", name: "Aesthetic", "max-val": 3 },
{ id: "val5", name: "Money Saving", "max-val": 3 },
];