diff --git a/webapp/.babelrc b/webapp/.babelrc new file mode 100644 index 000000000..fbd5b7451 --- /dev/null +++ b/webapp/.babelrc @@ -0,0 +1,24 @@ +{ + "presets": [ + [ + "@babel/preset-env", + { + "modules": false + } + ] + ], + "env": { + "test": { + "presets": [ + [ + "@babel/preset-env", + { + "targets": { + "node": "10" + } + } + ] + ] + } + } +} diff --git a/webapp/.dockerignore b/webapp/.dockerignore new file mode 100644 index 000000000..b0980ccfc --- /dev/null +++ b/webapp/.dockerignore @@ -0,0 +1,18 @@ +.vscode/ + +styleguide/ +node_modules/ +npm-debug.log + +Dockerfile +docker-compose*.yml +scripts/ + +.env + +cypress/ + +README.md +screenshot*.png +lokalise.png +.editorconfig diff --git a/webapp/.editorconfig b/webapp/.editorconfig new file mode 100644 index 000000000..5d1263484 --- /dev/null +++ b/webapp/.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 diff --git a/webapp/.env.template b/webapp/.env.template new file mode 100644 index 000000000..1fa2a542a --- /dev/null +++ b/webapp/.env.template @@ -0,0 +1 @@ +MAPBOX_TOKEN="pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.KZ8KK9l70omjXbEkkbHGsQ" diff --git a/webapp/.eslintignore b/webapp/.eslintignore new file mode 100644 index 000000000..d56900caf --- /dev/null +++ b/webapp/.eslintignore @@ -0,0 +1,5 @@ +node_modules +build +.nuxt +styleguide/ +**/*.min.js diff --git a/webapp/.eslintrc.js b/webapp/.eslintrc.js new file mode 100644 index 000000000..fdc9bfb5e --- /dev/null +++ b/webapp/.eslintrc.js @@ -0,0 +1,25 @@ +module.exports = { + root: true, + env: { + browser: true, + node: true + }, + parserOptions: { + parser: 'babel-eslint' + }, + extends: [ + 'plugin:vue/recommended', + 'plugin:prettier/recommended' + ], + // required to lint *.vue files + plugins: [ + 'vue', + 'prettier' + ], + // add your custom rules here + rules: { + 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', + 'vue/component-name-in-template-casing': ['error', 'kebab-case'] + } +} diff --git a/webapp/.github/ISSUE_TEMPLATE/bug_report.md b/webapp/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..fbb83adc2 --- /dev/null +++ b/webapp/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,35 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to 'http...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/webapp/.github/ISSUE_TEMPLATE/feature_request.md b/webapp/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..066b2d920 --- /dev/null +++ b/webapp/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,17 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/webapp/.gitignore b/webapp/.gitignore new file mode 100644 index 000000000..f8c980f7c --- /dev/null +++ b/webapp/.gitignore @@ -0,0 +1,86 @@ +# 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 + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +styleguide/ + +# 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 + +#ignore internal github files +/.github + +# Serverless directories +.serverless + +# IDE +.idea +.vscode + +# TEMORIRY +static/uploads + +cypress/videos +cypress/screenshots/ +cypress.env.json + +# Apple macOS folder attribute file +.DS_Store diff --git a/webapp/.prettierrc b/webapp/.prettierrc new file mode 100644 index 000000000..7dc4f8263 --- /dev/null +++ b/webapp/.prettierrc @@ -0,0 +1,6 @@ +{ + "semi": false, + "singleQuote": true, + "tabWidth": 2, + "bracketSpacing": true +} diff --git a/webapp/.travis.yml b/webapp/.travis.yml new file mode 100644 index 000000000..5e078363e --- /dev/null +++ b/webapp/.travis.yml @@ -0,0 +1,79 @@ +language: node_js +node_js: + - "10" +cache: + yarn: true + directories: + - node_modules +services: + - docker +addons: + chrome: stable + apt: + sources: + - google-chrome + packages: + - google-chrome-stable + +env: + - DOCKER_COMPOSE_VERSION=1.23.2 BACKEND_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH:-${TRAVIS_BRANCH:-master}} + + +before_install: + - echo $BACKEND_BRANCH + - sudo rm /usr/local/bin/docker-compose + - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose + - chmod +x docker-compose + - sudo mv docker-compose /usr/local/bin + - cp cypress.env.template.json cypress.env.json + +install: + - docker build --build-arg BUILD_COMMIT=$TRAVIS_COMMIT --target production -t humanconnection/nitro-web . + - docker-compose -f docker-compose.yml -f docker-compose.travis.yml up -d + - git clone https://github.com/Human-Connection/Nitro-Backend.git ../Nitro-Backend + - git -C "../Nitro-Backend" checkout $BACKEND_BRANCH || git -C "../Nitro-Backend" checkout master + - cd ../Nitro-Backend && yarn install && cd - + - docker-compose -f ../Nitro-Backend/docker-compose.yml -f ../Nitro-Backend/docker-compose.cypress.yml up -d + - yarn global add cypress wait-on + - yarn add cypress-cucumber-preprocessor + +script: + - docker-compose exec -e NODE_ENV=test webapp yarn run lint + - docker-compose exec -e NODE_ENV=test webapp yarn run test + - wait-on http://localhost:7474 && docker-compose -f ../Nitro-Backend/docker-compose.yml exec neo4j migrate + - wait-on http://localhost:3000 && cypress run --browser chrome --record --key $CYPRESS_TOKEN + +after_success: + - wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh + - chmod +x send.sh + - ./send.sh success $WEBHOOK_URL + - if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_EVENT_TYPE == "push" ]; then + wget https://raw.githubusercontent.com/Human-Connection/Discord-Bot/develop/tester.sh && + chmod +x tester.sh && + ./tester.sh staging $WEBHOOK_URL; + fi + +after_failure: + - wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh + - chmod +x send.sh + - ./send.sh failure $WEBHOOK_URL + +deploy: + - provider: script + script: scripts/docker_push.sh + on: + branch: master + - provider: script + script: scripts/deploy.sh nitro.human-connection.org + on: + branch: master + tags: true + - provider: script + script: scripts/deploy.sh nitro-staging.human-connection.org + on: + branch: master + - provider: script + script: scripts/deploy.sh "nitro-$(git rev-parse --short HEAD).human-connection.org" + on: + tags: true + all_branches: true diff --git a/webapp/CODE_OF_CONDUCT.md b/webapp/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..19f3854c1 --- /dev/null +++ b/webapp/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at developer@human-connection.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/webapp/Dockerfile b/webapp/Dockerfile new file mode 100644 index 000000000..7274693a4 --- /dev/null +++ b/webapp/Dockerfile @@ -0,0 +1,27 @@ +FROM node:10-alpine as base +LABEL Description="Web Frontend of the Social Network Human-Connection.org" Vendor="Human-Connection gGmbH" Version="0.0.1" Maintainer="Human-Connection gGmbH (developer@human-connection.org)" + +EXPOSE 3000 +CMD ["yarn", "run", "start"] + +# Expose the app port +ARG BUILD_COMMIT +ENV BUILD_COMMIT=$BUILD_COMMIT +ARG WORKDIR=/nitro-web +RUN mkdir -p $WORKDIR +WORKDIR $WORKDIR + +# See: https://github.com/nodejs/docker-node/pull/367#issuecomment-430807898 +RUN apk --no-cache add git + +COPY . . + +FROM base as build-and-test +RUN cp .env.template .env +RUN yarn install --production=false --frozen-lockfile --non-interactive +RUN yarn run build + +FROM base as production +ENV NODE_ENV=production +COPY --from=build-and-test ./nitro-web/node_modules ./node_modules +COPY --from=build-and-test ./nitro-web/.nuxt ./.nuxt diff --git a/webapp/LICENSE.md b/webapp/LICENSE.md new file mode 100644 index 000000000..9d4508b38 --- /dev/null +++ b/webapp/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Human-Connection gGmbH + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/webapp/README.md b/webapp/README.md new file mode 100644 index 000000000..d395a54e0 --- /dev/null +++ b/webapp/README.md @@ -0,0 +1,68 @@ +
+ +# NITRO Web +[](https://travis-ci.com/Human-Connection/Nitro-Web) +[](https://github.com/Human-Connection/Nitro-Web/blob/master/LICENSE.md) +[](https://app.fossa.io/projects/git%2Bgithub.com%2FHuman-Connection%2FNitro-Web?ref=badge_shield) +[](https://discord.gg/6ub73U3) + + + +## Build Setup + + + +### Install +``` bash +# install all dependencies +$ yarn install +``` + +Copy: +``` +cp .env.template .env +cp cypress.env.template.json cypress.env.json +``` +Configure the files according to your needs and your local setup. + +### Development +``` bash +# serve with hot reload at localhost:3000 +$ yarn dev +``` + +### Build for production +``` bash +# build for production and launch server +$ yarn build +$ yarn start +``` + +## Styleguide + +All reusable Components (for example avatar) should be done inside the [Nitro-Styleguide](https://github.com/Human-Connection/Nitro-Styleguide) repository. + + + +More information can be found here: https://github.com/Human-Connection/Nitro-Styleguide + + +If you need to change something in the styleguide and want to see the effects on the frontend immediately, then we have you covered. +You need to clone the styleguide to the parent directory `../Nitro-Styleguide` and run `yarn && yarn run dev`. After that you run `yarn run dev:styleguide` instead of `yarn run dev` and you will see your changes reflected inside the fronten! + +## Internationalization (i18n) + +You can help translating the interface by joining us on [lokalise.co](https://lokalise.co/public/556252725c18dd752dd546.13222042/). + +Thanks lokalise.co that we can use your premium account! + +
+
+## Attributions
+
+
+
+## License
+[](https://app.fossa.io/projects/git%2Bgithub.com%2FHuman-Connection%2FNitro-Web?ref=badge_large)
diff --git a/webapp/assets/README.md b/webapp/assets/README.md
new file mode 100644
index 000000000..34766f934
--- /dev/null
+++ b/webapp/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).
diff --git a/webapp/assets/styles/imports/_toast.scss b/webapp/assets/styles/imports/_toast.scss
new file mode 100644
index 000000000..0ef81a5b2
--- /dev/null
+++ b/webapp/assets/styles/imports/_toast.scss
@@ -0,0 +1,32 @@
+.iziToast-target, .iziToast {
+ &,
+ &:after,
+ &.iziToast-color-dark:after {
+ box-shadow: none !important;
+ }
+}
+
+.iziToast .iziToast-message {
+ font-weight: 400 !important;
+}
+
+.iziToast.iziToast-color-red {
+ background: $color-danger !important;
+ border-color: $color-danger !important;
+}
+.iziToast.iziToast-color-orange {
+ background: $color-warning !important;
+ border-color: $color-warning !important;
+}
+.iziToast.iziToast-color-yellow {
+ background: $color-yellow !important;
+ border-color: $color-yellow !important;
+}
+.iziToast.iziToast-color-blue {
+ background: $color-secondary !important;
+ border-color: $color-secondary !important;
+}
+.iziToast.iziToast-color-green {
+ background: $color-success !important;
+ border-color: $color-success !important;
+}
diff --git a/webapp/assets/styles/imports/_tooltip.scss b/webapp/assets/styles/imports/_tooltip.scss
new file mode 100644
index 000000000..e3032cb56
--- /dev/null
+++ b/webapp/assets/styles/imports/_tooltip.scss
@@ -0,0 +1,127 @@
+@mixin arrow($size, $type, $color) {
+
+ --#{$type}-arrow-size: $size;
+
+ .#{$type}-arrow {
+ width: 0;
+ height: 0;
+ border-style: solid;
+ position: absolute;
+ margin: $size;
+ border-color: $color;
+ z-index: 1;
+ }
+
+ &[x-placement^="top"] {
+ margin-bottom: $size;
+
+ .#{$type}-arrow {
+ border-width: $size $size 0 $size;
+ border-left-color: transparent !important;
+ border-right-color: transparent !important;
+ border-bottom-color: transparent !important;
+ bottom: -$size;
+ left: calc(50% - var(--#{$type}-arrow-size));
+ margin-top: 0;
+ margin-bottom: 0;
+ }
+ }
+
+ &[x-placement^="bottom"] {
+ margin-top: $size;
+
+ .#{$type}-arrow {
+ border-width: 0 $size $size $size;
+ border-left-color: transparent !important;
+ border-right-color: transparent !important;
+ border-top-color: transparent !important;
+ top: -$size;
+ left: calc(50% - var(--#{$type}-arrow-size));
+ margin-top: 0;
+ margin-bottom: 0;
+ }
+ }
+
+ &[x-placement^="right"] {
+ margin-left: $size;
+
+ .#{$type}-arrow {
+ border-width: $size $size $size 0;
+ border-left-color: transparent !important;
+ border-top-color: transparent !important;
+ border-bottom-color: transparent !important;
+ left: -$size;
+ top: calc(50% - var(--#{$type}-arrow-size));
+ margin-left: 0;
+ margin-right: 0;
+ }
+ }
+
+ &[x-placement^="left"] {
+ margin-right: $size;
+
+ .#{$type}-arrow {
+ border-width: $size 0 $size $size;
+ border-top-color: transparent !important;
+ border-right-color: transparent !important;
+ border-bottom-color: transparent !important;
+ right: -$size;
+ top: calc(50% - var(--#{$type}-arrow-size));
+ margin-left: 0;
+ margin-right: 0;
+ }
+ }
+}
+
+.tooltip {
+ display: block !important;
+ z-index: $z-index-modal - 2;
+
+ .tooltip-inner {
+ background: $background-color-inverse-soft;
+ color: $text-color-inverse;
+ border-radius: $border-radius-base;
+ padding: $space-x-small $space-small;
+ box-shadow: $box-shadow-large;
+ }
+
+ @include arrow(5px, "tooltip", $background-color-inverse-soft);
+
+ &.popover {
+ .popover-inner {
+ background: $background-color-soft;
+ color: $text-color-base;
+ border-radius: $border-radius-base;
+ padding: $space-x-small $space-small;
+ box-shadow: $box-shadow-x-large;
+
+ nav {
+ margin-left: -$space-small;
+ margin-right: -$space-small;
+
+ a {
+ padding-left: 12px;
+ }
+ }
+ }
+
+ .popover-arrow {
+ border-color: $background-color-soft;
+ }
+
+ @include arrow(7px, "popover", $background-color-soft);
+ }
+
+
+ &[aria-hidden='true'] {
+ visibility: hidden;
+ opacity: 0;
+ transition: opacity 60ms;
+ }
+
+ &[aria-hidden='false'] {
+ visibility: visible;
+ opacity: 1;
+ transition: opacity 60ms;
+ }
+}
diff --git a/webapp/assets/styles/main.scss b/webapp/assets/styles/main.scss
new file mode 100644
index 000000000..db967e973
--- /dev/null
+++ b/webapp/assets/styles/main.scss
@@ -0,0 +1,164 @@
+@import './imports/_tooltip.scss';
+@import './imports/_toast.scss';
+
+// Transition Easing
+$easeOut: cubic-bezier(0.19, 1, 0.22, 1);
+
+.disabled-content {
+ position: relative;
+
+ &::before {
+ @include border-radius($border-radius-x-large);
+ box-shadow: inset 0 0 0 5px $color-danger;
+ content: "";
+ display: block;
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ z-index: 2;
+ pointer-events: none;
+ }
+}
+
+.layout-enter-active {
+ transition: opacity 80ms ease-out;
+ transition-delay: 80ms;
+}
+.layout-leave-active {
+ transition: opacity 80ms ease-in;
+}
+.layout-enter,
+.layout-leave-active {
+ opacity: 0;
+}
+
+// slide up ease
+.slide-up-enter-active {
+ transition: all 500ms $easeOut;
+ transition-delay: 20ms;
+ opacity: 1;
+ transform: translate3d(0, 0, 0);
+}
+.slide-up-enter,
+.slide-up-leave-active {
+ opacity: 0;
+ box-shadow: none;
+ transform: translate3d(0, 15px, 0);
+}
+
+.main-navigation {
+ background: #fff;
+}
+
+blockquote {
+ display: block;
+ padding: 15px 20px 15px 45px;
+ margin: 0 0 20px;
+ position: relative;
+
+ /*Font*/
+ font-size: $font-size-base;
+ line-height: 1.2;
+ color: $color-neutral-40;
+ font-family: $font-family-serif;
+ font-style: italic;
+
+ border-left: 3px dotted $color-neutral-70;
+
+ &::before {
+ content: '\201C'; /*Unicode for Left Double Quote*/
+
+ /*Font*/
+ font-size: $font-size-xxxx-large;
+ font-weight: bold;
+ color: $color-neutral-50;
+
+ /*Positioning*/
+ position: absolute;
+ left: 10px;
+ top: 5px;
+ }
+
+ p {
+ margin-top: 0;
+ }
+}
+.main-navigation {
+ box-shadow: $box-shadow-base;
+ position: fixed;
+ width: 100%;
+ z-index: 10;
+
+ a {
+ outline: none;
+ }
+}
+
+hr {
+ border: 0;
+ width: 100%;
+ color: $color-neutral-80;
+ background-color: $color-neutral-80;
+ height: 1px !important;
+}
+
+[class$=menu-trigger] {
+ user-select: none;
+}
+[class$=menu-popover] {
+ display: inline-block;
+
+ nav {
+ margin-left: -17px;
+ margin-right: -15px;
+ }
+}
+
+#overlay {
+ display: block;
+ opacity: 0;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ left: 0;
+ position: fixed;
+ background: rgba(0, 0, 0, 0.15);
+ z-index: 99;
+ pointer-events: none;
+ transition: opacity 150ms ease-out;
+ transition-delay: 50ms;
+
+ .dropdown-open & {
+ opacity: 1;
+ transition-delay: 0;
+ transition: opacity 80ms ease-out;
+ }
+}
+
+.ds-card .ds-section {
+ padding: 0;
+ margin-left: -$space-base;
+ margin-right: -$space-base;
+
+ .ds-container {
+ padding: $space-base;
+ }
+}
+
+[class$="menu-popover"] {
+ min-width: 130px;
+
+ a, button {
+ display: flex;
+ align-content: center;
+ align-items: center;
+
+ .ds-icon {
+ padding-right: $space-xx-small;
+ }
+ }
+}
+
+.v-popover.open .trigger a {
+ color: $text-color-link-active;
+}
diff --git a/webapp/components/Badges.spec.js b/webapp/components/Badges.spec.js
new file mode 100644
index 000000000..5273fca21
--- /dev/null
+++ b/webapp/components/Badges.spec.js
@@ -0,0 +1,21 @@
+import { shallowMount } from '@vue/test-utils'
+import Badges from './Badges.vue'
+
+describe('Badges.vue', () => {
+ let wrapper
+
+ beforeEach(() => {
+ wrapper = shallowMount(Badges, {})
+ })
+
+ it('renders', () => {
+ expect(wrapper.is('div')).toBe(true)
+ })
+
+ it('has class "hc-badges"', () => {
+ expect(wrapper.contains('.hc-badges')).toBe(true)
+ })
+
+ // TODO: add similar software tests for other components
+ // TODO: add more test cases in this file
+})
diff --git a/webapp/components/Badges.vue b/webapp/components/Badges.vue
new file mode 100644
index 000000000..d0cb30e91
--- /dev/null
+++ b/webapp/components/Badges.vue
@@ -0,0 +1,81 @@
+
+