Browse Source

Initial commit.

main
Atridad Lahiji 2 months ago
parent
commit
dd37eced35
  1. 16
      .babelrc
  2. 13
      .editorconfig
  3. 18
      .eslintrc.js
  4. 90
      .gitignore
  5. 34
      .gitlab-ci.yml
  6. 20
      README.md
  7. 7
      assets/README.md
  8. 3
      assets/logo.svg
  9. 3
      components/Logo.vue
  10. 7
      components/README.md
  11. 21
      jest.config.js
  12. 12
      jsconfig.json
  13. 7
      layouts/README.md
  14. 231
      layouts/default.vue
  15. BIN
      logo.png
  16. 8
      middleware/README.md
  17. 56
      nuxt.config.js
  18. 37
      package.json
  19. 6
      pages/README.md
  20. 60
      pages/index.vue
  21. 529
      pages/retro.vue
  22. 7
      plugins/README.md
  23. 11
      static/README.md
  24. BIN
      static/favicon.ico
  25. BIN
      static/icon.png
  26. 10
      store/README.md
  27. 124
      store/index.js
  28. 13
      test/Index.spec.js
  29. 9
      test/Logo.spec.js
  30. 57
      test/Retro.spec.js
  31. 12402
      yarn.lock

16
.babelrc

@ -0,0 +1,16 @@
{
"env": {
"test": {
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
]
]
}
}
}

13
.editorconfig

@ -0,0 +1,13 @@
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

18
.eslintrc.js

@ -0,0 +1,18 @@
module.exports = {
root: true,
env: {
browser: true,
node: true
},
parserOptions: {
parser: 'babel-eslint'
},
extends: [
'@nuxtjs',
'plugin:nuxt/recommended'
],
plugins: [
],
// add your custom rules here
rules: {}
}

90
.gitignore

@ -0,0 +1,90 @@
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
/logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# Nuxt generate
dist
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless
# IDE / Editor
.idea
# Service worker
sw.*
# macOS
.DS_Store
# Vim swap files
*.swp

34
.gitlab-ci.yml

@ -0,0 +1,34 @@
image: node:latest
stages:
- build
- test
- deploy
build:
stage: build
script:
- yarn
- yarn generate
artifacts:
paths:
- dist/
only:
- master
test:
stage: test
script:
- yarn
- yarn build
- yarn test
only:
- merge_requests
deploy:
stage: deploy
script:
- npm -g install cloudron-surfer
- surfer put --token $SURFER_KEY --server $SURFER_DOMAIN dist/* /
only:
- master

20
README.md

@ -1,2 +1,20 @@
# fridayapp
# Fridayapp
Lightweight Sprint Reprospective Tool
## Running
```bash
cd friday
yarn dev
```
## Run Tests
```bash
cd friday
yarn test
```
## Building for Production
```bash
cd friday
yarn generate
```

7
assets/README.md

@ -0,0 +1,7 @@
# ASSETS
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked).

3
assets/logo.svg

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid meet" viewBox="188.23076923076923 220.10576923076934 59.861782051525694 120.05769230769232" width="55.86" height="116.06"><defs><path d="M198.77 221.11L189.23 288.49L198.77 288.49L191.96 337.16L217.84 269.78L204.22 269.78L213.76 221.11L198.77 221.11Z" id="a8e2RY5wQj"></path><path d="" id="j6BcpTg0lH"></path><path d="M191.82 269.77L189.23 288.49L210.62 288.49L217.84 269.77L191.82 269.77Z" id="fCjf2HbQG"></path><path d="M198.74 221.11L196.15 239.82L217.53 239.82L224.76 221.11L198.74 221.11Z" id="b7h1AJdkEe"></path><path d="M219.07 221.11L216.48 239.82L237.86 239.82L245.09 221.11L219.07 221.11Z" id="b3sduBFWBM"></path></defs><g><g><use xlink:href="#a8e2RY5wQj" opacity="1" fill="#ff3d57" fill-opacity="1"></use><g></g></g><g><g><use xlink:href="#j6BcpTg0lH" opacity="1" fill-opacity="0" stroke="#00d747" stroke-width="1" stroke-opacity="0.98"></use></g></g><g><use xlink:href="#fCjf2HbQG" opacity="1" fill="#00d748" fill-opacity="1"></use><g><use xlink:href="#fCjf2HbQG" opacity="1" fill-opacity="0" stroke="#39de1e" stroke-width="1" stroke-opacity="0"></use></g></g><g><use xlink:href="#b7h1AJdkEe" opacity="1" fill="#ffca00" fill-opacity="1"></use><g><use xlink:href="#b7h1AJdkEe" opacity="1" fill-opacity="0" stroke="#39de1e" stroke-width="1" stroke-opacity="0"></use></g></g><g><use xlink:href="#b3sduBFWBM" opacity="1" fill="#ffca00" fill-opacity="1"></use><g><use xlink:href="#b3sduBFWBM" opacity="1" fill-opacity="0" stroke="#39de1e" stroke-width="1" stroke-opacity="0"></use></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

3
components/Logo.vue

@ -0,0 +1,3 @@
<template>
<img src="@/assets/logo.svg" alt="">
</template>

7
components/README.md

@ -0,0 +1,7 @@
# COMPONENTS
**This directory is not required, you can delete it if you don't want to use it.**
The components directory contains your Vue.js Components.
_Nuxt.js doesn't supercharge these components._

21
jest.config.js

@ -0,0 +1,21 @@
module.exports = {
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1',
'^~/(.*)$': '<rootDir>/$1',
'^vue$': 'vue/dist/vue.common.js'
},
moduleFileExtensions: [
'js',
'vue',
'json'
],
transform: {
'^.+\\.js$': 'babel-jest',
'.*\\.(vue)$': 'vue-jest'
},
collectCoverage: true,
collectCoverageFrom: [
'<rootDir>/components/**/*.vue',
'<rootDir>/pages/**/*.vue'
]
}

12
jsconfig.json

@ -0,0 +1,12 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/*": ["./*"],
"@/*": ["./*"],
"~~/*": ["./*"],
"@@/*": ["./*"]
}
},
"exclude": ["node_modules", ".nuxt", "dist"]
}

7
layouts/README.md

@ -0,0 +1,7 @@
# LAYOUTS
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your Application Layouts.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts).

231
layouts/default.vue

@ -0,0 +1,231 @@
<template>
<div>
<a
v-if="!darkMode"
>
<moon-icon
size="1.5x"
class="iconButton themeIcon"
@click="darkMode = true"
/>
</a>
<a
v-else
>
<sun-icon
size="1.5x"
class="iconButton themeIcon"
@click="darkMode = false"
/>
</a>
<Nuxt />
</div>
</template>
<script>
import {
MoonIcon,
SunIcon
} from 'vue-feather-icons'
export default {
components: {
MoonIcon,
SunIcon
},
data: () => ({
darkMode: false
}),
watch: {
darkMode () {
if (this.darkMode) {
localStorage.setItem('theme', 'dark')
document.documentElement.setAttribute('data-theme', 'dark')
} else {
localStorage.setItem('theme', 'light')
document.documentElement.setAttribute('data-theme', 'light')
}
}
},
mounted () {
const theme = localStorage.getItem('theme')
if (theme === 'dark') {
document.documentElement.setAttribute('data-theme', 'dark')
this.darkMode = true
} else {
document.documentElement.setAttribute('data-theme', 'light')
this.darkMode = false
}
}
}
</script>
<style>
html {
font-family:
'Source Sans Pro',
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
'Helvetica Neue',
Arial,
sans-serif;
font-size: 16px;
word-spacing: 1px;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
box-sizing: border-box;
}
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
}
:root {
--bg-color: #ffffff;
--text-color: #35495e;
--button-color: #ffffff;
--button-text-color: #35495e;
--button-border-color: #35495e;
--button-hover-color: #35495e;
--button-text-hover-color: #ffffff;
--button-border-hover-color: #ffffff;
--card-background-color: #ffffff;
--card-border-color: #35495e;
--card-text-color: #35495e;
}
[data-theme="dark"] {
--bg-color: #35495e;
--text-color: #ffffff;
--button-color: #35495e;
--button-text-color: #ffffff;
--button-border-color: #ffffff;
--button-hover-color: #ffffff;
--button-text-hover-color: #35495e;
--button-border-hover-color: #35495e;
--card-background-color: #ffffff;
--card-border-color: #ffffff;
--card-text-color: #35495e;
}
body {
background-color: var(--bg-color);
}
legend,label,h1,h2,h3,h4,h5,h6,p {
color: var(--text-color);
}
svg {
display: inherit;
}
/* Attempting to make this look reasonable on mobile */
@media only screen and (min-width: 768px) {
.subtitle {
font-weight: 300;
font-size: 36px;
color: var(--text-color);
padding-bottom: 15px;
word-wrap: normal;
max-width: 40vw;
margin: auto;
}
.title {
font-family:
'Quicksand',
'Source Sans Pro',
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
'Helvetica Neue',
Arial,
sans-serif;
display: block;
font-weight: 300;
font-size: 100px;
color: var(--text-color);
letter-spacing: 1px;
}
}
@media only screen and (max-width: 768px) {
.subtitle {
font-weight: 300;
font-size: 24px;
color: var(--text-color);
padding-bottom: 15px;
word-wrap: normal;
max-width: 40vw;
margin: auto;
}
.title {
font-family:
'Quicksand',
'Source Sans Pro',
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
'Helvetica Neue',
Arial,
sans-serif;
display: block;
font-weight: 300;
font-size: 64px;
color: var(--text-color);
letter-spacing: 1px;
}
}
.iconButton {
color: var(--button-text-color);
}
.iconButton:hover {
filter: invert(0.5);
cursor: pointer;
}
.navIcon {
position: absolute;
top: 10px;
left: 10px;
}
.themeIcon {
position: absolute;
top: 10px;
right: 10px;
}
.button {
display: inline-block;
border-radius: 4px;
border: 1px solid var(--button-border-color);
color: var(--button-text-color);
background-color: var(--button-color);
text-decoration: none;
padding: 10px 30px;
}
.button:hover {
border: 1px solid var(--button-border-hover-color);
color: var(--button-text-hover-color);
background-color: var(--button-hover-color);
}
</style>

BIN
logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

8
middleware/README.md

@ -0,0 +1,8 @@
# MIDDLEWARE
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your application middleware.
Middleware let you define custom functions that can be run before rendering either a page or a group of pages.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware).

56
nuxt.config.js

@ -0,0 +1,56 @@
export default {
// Disable server-side rendering (https://go.nuxtjs.dev/ssr-mode)
ssr: false,
// Target (https://go.nuxtjs.dev/config-target)
target: 'static',
// Global page headers (https://go.nuxtjs.dev/config-head)
head: {
title: 'Fridayapp',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'Lightweight Sprint Reprospective Tool' },
{ hid: 'og:title', property: 'og:title', content: 'Fridayapp' },
{ hid: 'og:description', property: 'og:description', content: 'Lightweight Sprint Reprospective Tool' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
// Global CSS (https://go.nuxtjs.dev/config-css)
css: [
],
// Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins)
plugins: [
],
// Auto import components (https://go.nuxtjs.dev/config-components)
components: true,
// Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules)
buildModules: [
// https://go.nuxtjs.dev/eslint
'@nuxtjs/eslint-module',
// https://go.nuxtjs.dev/tailwindcss
'@nuxtjs/tailwindcss'
],
// Modules (https://go.nuxtjs.dev/config-modules)
modules: [
// https://go.nuxtjs.dev/axios
'@nuxtjs/axios',
// https://go.nuxtjs.dev/pwa
'@nuxtjs/pwa'
],
// Axios module configuration (https://go.nuxtjs.dev/config-axios)
axios: {},
// Build Configuration (https://go.nuxtjs.dev/config-build)
build: {
}
}

37
package.json

@ -0,0 +1,37 @@
{
"name": "fridayapp",
"version": "0.5.0",
"private": true,
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
"lint:js": "eslint --ext .js,.vue --ignore-path .gitignore .",
"lint": "yarn lint:js",
"test": "jest"
},
"dependencies": {
"@nuxtjs/axios": "^5.12.2",
"@nuxtjs/pwa": "^3.0.2",
"@vue/cli-service": "^4.5.9",
"core-js": "^3.6.5",
"nuxt": "^2.14.6",
"vue-feather-icons": "^5.1.0",
"vuedraggable": "^2.24.3",
"vuex-persistedstate": "3.1.0"
},
"devDependencies": {
"@nuxtjs/eslint-config": "^3.1.0",
"@nuxtjs/eslint-module": "^2.0.0",
"@nuxtjs/tailwindcss": "^3.1.0",
"@vue/test-utils": "^1.1.0",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.5.0",
"eslint": "^7.10.0",
"eslint-plugin-nuxt": "^1.0.0",
"jest": "^26.5.0",
"vue-jest": "^3.0.4"
}
}

6
pages/README.md

@ -0,0 +1,6 @@
# PAGES
This directory contains your Application Views and Routes.
The framework reads all the `*.vue` files inside this directory and creates the router of your application.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing).

60
pages/index.vue

@ -0,0 +1,60 @@
<template>
<div class="container">
<div>
<span class="flex intro justify-center">
<img src="@/assets/logo.svg" alt="">
<div class="hidden md:block">
<h1 class="title">
<b>friday</b>app
</h1>
</div>
</span>
<h2 class="subtitle intro">
Lightweight Sprint Reprospective Tool
</h2>
<router-link
to="/retro"
class="button"
>
Enter
</router-link>
</div>
</div>
</template>
<script>
export default {}
</script>
<style scoped>
.container {
margin: 0 auto;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
.intro {
animation: 1s intro;
}
@keyframes intro {
from {
opacity: 0;
}
50% {
transform: scale(0.5);
opacity: 0.25;
}
75% {
transform: scale(1.25);
opacity: 0.50;
}
to {
transform: scale(1);
opacity: 1;
}
}
</style>

529
pages/retro.vue

@ -0,0 +1,529 @@
<template>
<div class="container">
<div style="margin: auto;">
<router-link
to="/"
class="iconButton navIcon"
>
<arrow-left-circle-icon size="1.5x" />
</router-link>
<h1 class="subtitle">
Retrospective Board
</h1>
<div class="inputContainer">
<input
id="name"
v-model="newItem"
placeholder="Enter new item"
type="text"
name="name"
>
<div class="dropdown">
<button class="dropbtn">
Add Item
</button>
<div class="dropdownContent">
<ul>
<li @click="addKeep">
Keep
</li>
<li @click="addAdd">
Add
</li>
<li @click="addMore">
More
</li>
<li @click="addLess">
Less
</li>
<li @click="addAction">
Action Items
</li>
</ul>
</div>
</div>
<a
@click="exportBoard()"
>
<download-icon class="iconButton" />
</a>
</div>
<div class="flex justify-center flex-wrap cardContainer">
<div class="card">
<h2 class="cardTitle">
<b>Keep</b>
</h2>
<draggable
v-model="keepList"
tag="ul"
class="listColumn"
group="retro"
handle=".handle"
>
<li
v-for="item in keepList"
:key="item.id"
class="listItem"
>
<move-icon class="handle" />
<span class="text">{{ item.name }} </span>
<x-circle-icon class="delete" @click="removeFromKeep(item)" />
</li>
</draggable>
</div>
<div class="card">
<h2 class="cardTitle">
<b>Add</b>
</h2>
<draggable
v-model="addList"
tag="ul"
class="listColumn"
group="retro"
handle=".handle"
>
<li
v-for="item in addList"
:key="item.id"
class="listItem"
>
<move-icon class="handle" />
<span class="text">{{ item.name }} </span>
<x-circle-icon class="delete" @click="removeFromAdd(item)" />
</li>
</draggable>
</div>
<div class="card">
<h2 class="cardTitle">
<b>More</b>
</h2>
<draggable
v-model="moreList"
tag="ul"
class="listColumn"
group="retro"
handle=".handle"
>
<li
v-for="item in moreList"
:key="item.id"
class="listItem"
>
<move-icon class="handle" />
<span class="text">{{ item.name }} </span>
<x-circle-icon class="delete" @click="removeFromMore(item)" />
</li>
</draggable>
</div>
<div class="card">
<h2 class="cardTitle">
<b>Less</b>
</h2>
<draggable
v-model="lessList"
tag="ul"
class="listColumn"
group="retro"
handle=".handle"
>
<li
v-for="item in lessList"
:key="item.id"
class="listItem"
>
<move-icon class="handle" />
<span class="text">{{ item.name }} </span>
<x-circle-icon class="delete" @click="removeFromLess(item)" />
</li>
</draggable>
</div>
<div class="cardLong">
<h2 class="cardTitle">
<b>Action Items</b>
</h2>
<draggable
v-model="actionList"
tag="ul"
class="listColumnLong"
group="actionItems"
handle=".handle"
>
<li
v-for="item in actionList"
:key="item.id"
class="listItem"
>
<move-icon class="handle" />
<span class="text">{{ item.name }} </span>
<x-circle-icon class="delete" @click="removeFromAction(item)" />
</li>
</draggable>
</div>
</div>
</div>
</div>
</template>
<script>
import { mapGetters, mapMutations } from 'vuex'
import draggable from 'vuedraggable'
import {
ArrowLeftCircleIcon,
XCircleIcon,
DownloadIcon,
MoveIcon
} from 'vue-feather-icons'
export default {
components: {
draggable,
ArrowLeftCircleIcon,
XCircleIcon,
DownloadIcon,
MoveIcon
},
data: () => ({
newItem: ''
}),
computed: {
...mapGetters([
'keep',
'add',
'more',
'less',
'action',
'state'
]),
keepList: {
get () {
return this.keep
},
set (value) {
this.setKeep(value)
}
},
addList: {
get () {
return this.add
},
set (value) {
this.setAdd(value)
}
},
moreList: {
get () {
return this.more
},
set (value) {
this.setMore(value)
}
},
lessList: {
get () {
return this.less
},
set (value) {
this.setLess(value)
}
},
actionList: {
get () {
return this.action
},
set (value) {
this.setAction(value)
}
}
},
methods: {
...mapMutations([
'addToKeep',
'addToAdd',
'addToMore',
'addToLess',
'addToAction',
'setKeep',
'setAdd',
'setMore',
'setLess',
'setAction',
'removeFromKeep',
'removeFromAdd',
'removeFromMore',
'removeFromLess',
'removeFromAction'
]),
addKeep () {
if (this.newItem) {
this.addToKeep({
name: this.newItem
})
this.newItem = ''
}
},
addAdd () {
if (this.newItem) {
this.addToAdd({
name: this.newItem
})
this.newItem = ''
}
},
addMore () {
if (this.newItem) {
this.addToMore({
name: this.newItem
})
this.newItem = ''
}
},
addLess () {
if (this.newItem) {
this.addToLess({
name: this.newItem
})
this.newItem = ''
}
},
addAction () {
if (this.newItem) {
this.addToAction({
name: this.newItem
})
this.newItem = ''
}
},
exportBoard () {
const today = new Date()
const day = String(today.getDate()).padStart(2, '0')
const month = String(today.getMonth() + 1).padStart(2, '0')
const year = today.getFullYear()
const dateString = month + '-' + day + '-' + year
const stateToExport = JSON.stringify(this.state)
const stateBlog = new Blob([stateToExport], { type: 'text/plain' })
const event = document.createEvent('MouseEvents')
const a = document.createElement('a')
a.download = dateString + '.json'
a.href = window.URL.createObjectURL(stateBlog)
a.dataset.downloadurl = ['text/json', a.download, a.href].join(':')
event.initEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null)
a.dispatchEvent(event)
}
}
}
</script>
<style scoped>
.container {
min-height: 100vh;
width: 100vw;
max-width: 100vw;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
.inputContainer {
margin: 2.5%
}
.cardContainer {
width: 100vw;
}
@media only screen and (min-width: 768px) {
.card {
background-color: var(--card-background-color);
border-radius: 4px;
border: 1px solid var(--card-border-color);
transition: 0.3s;
margin: 2.5%;
padding: 10px;
flex: 0 0 20%;
height: 30vh;
}
.listColumn {
height: 25vh;
overflow-y:auto;
}
.cardLong {
background-color: var(--card-background-color);
border-radius: 4px;
border: 1px solid var(--card-border-color);
transition: 0.3s;
margin-top: 2.5%;
margin-bottom: 5%;
margin-left: 2.5%;
margin-right: 2.5%;
padding: 10px;
flex: 0 0 95%;
height: 30vh;
}
.listColumnLong {
height: 25vh;
overflow-y:auto;
}
}
@media only screen and (max-width: 768px) {
.card {
background-color: var(--card-background-color);
border-radius: 4px;
border: 1px solid var(--card-border-color);
transition: 0.3s;
margin: 2.5%;
padding: 10px;
flex: 0 0 40%;
height: 30vh;
min-width: 150px;
}
.listColumn {
height: 25vh;
overflow-y:auto;
}
.cardLong {
background-color: var(--card-background-color);
border-radius: 4px;
border: 1px solid var(--card-border-color);
transition: 0.3s;
margin-top: 2.5%;
margin-bottom: 5%;
margin-left: 2.5%;
margin-right: 2.5%;
padding: 10px;
flex: 0 0 85%;
height: 20vh;
min-width: calc(300px + 5%);
}
.listColumnLong {
height: 15vh;
overflow-y:auto;
}
}
.cardTitle {
color: var(--card-text-color);
}
/* Styling the textbox to match the button */
input[type=text] {
min-width: 100px;
max-width: 300px;
border: 1px solid #35495e;
border-radius: 4px;
padding: 10px 5px;
}
/* This section is for the dropdown button */
.dropbtn {
background: var(--button-color);
color: var(--button-text-color);
border: 1px solid var(--button-border-color);
border-radius: 4px;
margin: 0;
padding: 10px 5px;
font-size: 1em;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdownContent {
display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 100px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdownContent li {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdownContent li:hover {
background-color: #ddd;
cursor: pointer;
}
.dropdown:hover .dropdownContent {
display: block;
animation: 0.25s dropdownhover;
}
.dropdown:hover .dropbtn {
background: var(--button-hover-color);
color: var(--button-text-hover-color);
border: 1px solid var(--button-border-hover-color);
}
@keyframes dropdownhover{
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Styling the column list items */
.listItem {
padding: 4px;
margin: 4px;
background: #eee;
font-size: 18px;
transition: 0.2s;
list-style-type: none;
border: 1px solid #35495e;
border-radius: 4px;
user-select: none;
overflow: hidden;
}
.list li:nth-child(odd) {
background: #f9f9f9;
}
.itemName {
margin: 10px;
}
.handle {
float: left;
}
.delete {
float: right;
}
.delete:hover {
color: #ff0000;
}
.text {
margin: 5px;
}
</style>

7
plugins/README.md

@ -0,0 +1,7 @@
# PLUGINS
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains Javascript plugins that you want to run before mounting the root Vue.js application.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins).

11
static/README.md

@ -0,0 +1,11 @@
# STATIC
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your static files.
Each file inside this directory is mapped to `/`.
Thus you'd want to delete this README.md before deploying to production.
Example: `/static/robots.txt` is mapped as `/robots.txt`.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static).

BIN
static/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
static/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

10
store/README.md

@ -0,0 +1,10 @@
# STORE
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your Vuex Store files.
Vuex Store option is implemented in the Nuxt.js framework.
Creating a file in this directory automatically activates the option in the framework.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store).

124
store/index.js

@ -0,0 +1,124 @@
import createPersistedState from 'vuex-persistedstate'
const state = () => ({
keep: [],
add: [],
more: [],
less: [],
action: []
})
const mutations = {
addToKeep (state, item) {
const newID = state.keep.length + state.add.length + state.more.length + state.less.length
state.keep.push({
id: newID,
name: item.name
})
},
addToAdd (state, item) {
const newID = state.keep.length + state.add.length + state.more.length + state.less.length
state.add.push({
id: newID,
name: item.name
})
},
addToMore (state, item) {
const newID = state.keep.length + state.add.length + state.more.length + state.less.length
state.more.push({
id: newID,
name: item.name
})
},
addToLess (state, item) {
const newID = state.keep.length + state.add.length + state.more.length + state.less.length
state.less.push({
id: newID,
name: item.name
})
},
addToAction (state, item) {
const newID = state.action.length
state.action.push({
id: newID,
name: item.name
})
},
setKeep (state, list) {
state.keep = (list)
},
setAdd (state, list) {
state.add = (list)
},
setMore (state, list) {
state.more = (list)
},
setLess (state, list) {
state.less = (list)
},
setAction (state, list) {
state.action = (list)
},
removeFromKeep (state, itemToRemove) {
const itemIndex = state.keep.map((item) => {
return item.name
}).indexOf(itemToRemove.name)
state.keep.splice(itemIndex, 1)
},
removeFromAdd (state, itemToRemove) {
const itemIndex = state.add.map((item) => {
return item.name
}).indexOf(itemToRemove.name)
state.add.splice(itemIndex, 1)
},
removeFromMore (state, itemToRemove) {
const itemIndex = state.more.map((item) => {
return item.name
}).indexOf(itemToRemove.name)
state.more.splice(itemIndex, 1)
},
removeFromLess (state, itemToRemove) {
const itemIndex = state.less.map((item) => {
return item.name
}).indexOf(itemToRemove.name)
state.less.splice(itemIndex, 1)
},
removeFromAction (state, itemToRemove) {
const itemIndex = state.action.map((item) => {
return item.name
}).indexOf(itemToRemove.name)
state.action.splice(itemIndex, 1)
}
}
const getters = {
keep (state) {
return state.keep
},
add (state) {
return state.add
},
more (state) {
return state.more
},
less (state) {
return state.less
},
action (state) {
return state.action
},
state (state) {
return state
}
}
const plugins = [
createPersistedState()
]
export default {
plugins,
state,
getters,
mutations
}

13
test/Index.spec.js

@ -0,0 +1,13 @@
import { mount, RouterLinkStub } from '@vue/test-utils'
import Index from '@/pages/index.vue'
describe('Index', () => {
test('is a Vue instance', () => {
const wrapper = mount(Index, {
stubs: {
RouterLink: RouterLinkStub
}
})
expect(wrapper.vm).toBeTruthy()
})
})

9
test/Logo.spec.js

@ -0,0 +1,9 @@
import { mount } from '@vue/test-utils'
import Logo from '@/components/Logo.vue'
describe('Logo', () => {
test('is a Vue instance', () => {
const wrapper = mount(Logo)
expect(wrapper.vm).toBeTruthy()
})
})

57
test/Retro.spec.js

@ -0,0 +1,57 @@
import { shallowMount, RouterLinkStub, createLocalVue} from '@vue/test-utils'
import Vuex from 'vuex'
import Retro from '@/pages/retro.vue'
const localVue = createLocalVue()
localVue.use(Vuex)
describe('Retro', () => {
let getters;
let store;
beforeEach(() => {
getters = {
keep: () => [
{
id: 0,
name: 'keep0'
}
],
add: () => [
{
id: 0,
name: 'add0'
}
],
more: () => [
{
id: 0,
name: 'more0'
}
],
less: () => [
{
id: 0,
name: 'less0'
}
]
},
store = new Vuex.Store({
getters
})
})
it('lists are properly populated', () => {
const wrapper = shallowMount(Retro, {
store,
localVue,
stubs: {
RouterLink: RouterLinkStub
}
})
expect(wrapper.text()).toMatch('keep0');
expect(wrapper.text()).toMatch('add0');
expect(wrapper.text()).toMatch('more0');
expect(wrapper.text()).toMatch('less0');
})
})

12402
yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save