Browse Source

Re-init skeleton to latest package versions vue.js, nuxt.js with vuetify

feature/yolo2
Elwin Buisman 1 year ago
parent
commit
b03091b4ac
  1. 13
      .editorconfig
  2. 14
      .env
  3. 31
      .eslintrc.js
  4. 89
      .gitignore
  5. 1
      .nvmrc
  6. 60
      Dockerfile
  7. 4
      Dockerfile.styleguide
  8. 110
      README.md
  9. 4
      assets/variables.scss
  10. 11
      components/NuxtLogo.vue
  11. 46
      components/Tutorial.vue
  12. 22
      components/VuetifyLogo.vue
  13. 36
      css.webpack.config.js
  14. 44
      docker/nginx.conf.template
  15. 47
      docker/server.conf.template
  16. 18
      docker/start.sh
  17. 117
      layouts/default.vue
  18. 44
      layouts/error.vue
  19. 216
      nuxt.config.js
  20. 88
      package.json
  21. 77
      pages/index.vue
  22. 19
      pages/inspire.vue
  23. 28
      pm2.config.js
  24. 10
      postcss.config.js
  25. 3
      scripts/i18n/appendKeys.js
  26. 3
      scripts/i18n/purgeKeys.js
  27. 8
      src/assets/README.md
  28. 6
      src/components/README.md
  29. 142
      src/components/compositions/ArticlePage/ArticlePage.vue
  30. 1
      src/components/compositions/ArticlePage/index.js
  31. 108
      src/components/compositions/DetailPage/DetailPage.vue
  32. 1
      src/components/compositions/DetailPage/index.js
  33. 58
      src/components/compositions/IndexPage/IndexPage.vue
  34. 1
      src/components/compositions/IndexPage/index.js
  35. 103
      src/components/compositions/SearchIndexPage/SearchIndexPage.vue
  36. 1
      src/components/compositions/SearchIndexPage/index.js
  37. 37
      src/components/domain/Activity/ActivityConfirmDeleteButton/ActivityConfirmDeleteButton.vue
  38. 1
      src/components/domain/Activity/ActivityConfirmDeleteButton/index.js
  39. 146
      src/components/domain/AgeCategories/AgeCategories.vue
  40. 1
      src/components/domain/AgeCategories/index.js
  41. 170
      src/components/domain/Auth/AuthNavigation/AuthNavigation.vue
  42. 1
      src/components/domain/Auth/AuthNavigation/index.js
  43. 81
      src/components/domain/Auth/AuthRequiredModal/AuthRequiredModal.vue
  44. 1
      src/components/domain/Auth/AuthRequiredModal/index.js
  45. 30
      src/components/domain/BreadcrumbNavWithRootSite/BreadcrumbNavWithRootSite.vue
  46. 1
      src/components/domain/BreadcrumbNavWithRootSite/index.js
  47. 32
      src/components/domain/CallToAction/CallToAction.vue
  48. 1
      src/components/domain/CallToAction/index.js
  49. 37
      src/components/domain/Contest/ContestConfirmDeleteButton/ContestConfirmDeleteButton.vue
  50. 1
      src/components/domain/Contest/ContestConfirmDeleteButton/index.js
  51. 38
      src/components/domain/Contest/ContestJuryInvitationConfirmDeleteButton/ContestJuryInvitationConfirmDeleteButton.vue
  52. 1
      src/components/domain/Contest/ContestJuryInvitationConfirmDeleteButton/index.js
  53. 38
      src/components/domain/Contest/ContestJuryMemberConfirmDeleteButton/ContestJuryMemberConfirmDeleteButton.vue
  54. 1
      src/components/domain/Contest/ContestJuryMemberConfirmDeleteButton/index.js
  55. 44
      src/components/domain/CookieConsent/CookieConsent.vue
  56. 1
      src/components/domain/CookieConsent/index.js
  57. 24
      src/components/domain/DateInput/DateInput.vue
  58. 1
      src/components/domain/DateInput/index.js
  59. 134
      src/components/domain/DateTimeInput/DateTimeInput.vue
  60. 1
      src/components/domain/DateTimeInput/index.js
  61. 46
      src/components/domain/HomeFeed/HomeFeed.vue
  62. 1
      src/components/domain/HomeFeed/index.js
  63. 26
      src/components/domain/Image/ImgixImage/ImgixImage.vue
  64. 1
      src/components/domain/Image/ImgixImage/index.js
  65. 149
      src/components/domain/Navigation/Footer/Footer.vue
  66. 1
      src/components/domain/Navigation/Footer/index.js
  67. 38
      src/components/domain/Navigation/SwitchSites/SwitchSites.vue
  68. 1
      src/components/domain/Navigation/SwitchSites/index.js
  69. 116
      src/components/domain/Search/Search.vue
  70. 310
      src/components/domain/Search/SearchSettings.vue
  71. 1
      src/components/domain/Search/index.js
  72. 45
      src/components/domain/Spotlight/Spotlight.vue
  73. 1
      src/components/domain/Spotlight/index.js
  74. 37
      src/components/domain/Text/TextConfirmDeleteButton/TextConfirmDeleteButton.vue
  75. 1
      src/components/domain/Text/TextConfirmDeleteButton/index.js
  76. 27
      src/components/domain/Text/TextGenre/TextGenre.vue
  77. 1
      src/components/domain/Text/TextGenre/index.js
  78. 70
      src/components/domain/Text/TextInfo/TextInfo.vue
  79. 1
      src/components/domain/Text/TextInfo/index.js
  80. 36
      src/components/domain/Text/TextLikeButton/TextLikeButton.vue
  81. 1
      src/components/domain/Text/TextLikeButton/index.js
  82. 37
      src/components/domain/Text/TextReportButton/TextReportButton.vue
  83. 1
      src/components/domain/Text/TextReportButton/index.js
  84. 32
      src/components/domain/Text/TextShareFacebookButton/TextShareFacebookButton.vue
  85. 1
      src/components/domain/Text/TextShareFacebookButton/index.js
  86. 31
      src/components/domain/Text/TextShareTwitterButton/TextShareTwitterButton.vue
  87. 1
      src/components/domain/Text/TextShareTwitterButton/index.js
  88. 75
      src/components/domain/TileList/PaginatedTileList.vue
  89. 42
      src/components/domain/TileList/TileList.vue
  90. 2
      src/components/domain/TileList/index.js
  91. 50
      src/components/domain/User/UserFollowButton/UserFollowButton.vue
  92. 1
      src/components/domain/User/UserFollowButton/index.js
  93. 25
      src/components/domain/User/UserLink/UserLink.vue
  94. 1
      src/components/domain/User/UserLink/index.js
  95. 57
      src/components/generic/AlertModal/AlertModal.vue
  96. 1
      src/components/generic/AlertModal/index.js
  97. 79
      src/components/generic/ConfirmDeleteModal/ConfirmDeleteModal.vue
  98. 1
      src/components/generic/ConfirmDeleteModal/index.js
  99. 78
      src/components/generic/CountdownToDate/CountdownToDate.vue
  100. 1
      src/components/generic/CountdownToDate/index.js
  101. Some files were not shown because too many files have changed in this diff Show More

13
.editorconfig

@ -0,0 +1,13 @@ @@ -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

14
.env

@ -1,14 +0,0 @@ @@ -1,14 +0,0 @@
NODE_ENV=dev
HOST_PROTOCOL=http
HOST_PORT=3000
HOST_ORGANIZATION=cs.local
HOST_ACCOUNT=m.cs.local
HOST_COMMUNITY=af.local
HOST_AUTH=id.cs.local
HOST_COURSES=cursus.cs.local
API_URL=http://192.168.10.10
SESSION_SECRET=1234567890
NODE_ICU_DATA=./node_modules/full-icu

31
.eslintrc.js

@ -1,31 +0,0 @@ @@ -1,31 +0,0 @@
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
parserOptions: {
parser: 'babel-eslint',
},
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'eslint:recommended',
'plugin:vue/recommended',
],
// required to lint *.vue files
plugins: [
'vue',
],
// add your custom rules here
rules: {
'vue/require-default-prop': 'off',
// TODO re-enable when not in conflict anymore with latest nuxt version
'vue/component-name-in-template-casing': 'off',
'vue/html-self-closing': 'off',
'vue/no-v-html': 'off',
'no-console': 'warn',
'vue/no-unused-vars': 'warn',
'vue/no-unused-components': 'warn',
},
};

89
.gitignore vendored

@ -1,21 +1,90 @@ @@ -1,21 +1,90 @@
# dependencies
node_modules
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
/logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# logs
npm-debug.log
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Styleguide
css-build
# 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
# Nuxt build
# next.js build output
.next
# nuxt.js build output
.nuxt
# Nuxt generate
dist
# Webstorm
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless
# IDE / Editor
.idea
# Trash
.DS_Store
# Service worker
sw.*
# macOS
.DS_Store
# Vim swap files
*.swp

1
.nvmrc

@ -1 +0,0 @@ @@ -1 +0,0 @@
lts/carbon

60
Dockerfile

@ -1,60 +0,0 @@ @@ -1,60 +0,0 @@
# Build stage
FROM node:carbon as build
RUN mkdir /repo
WORKDIR /repo
COPY src src
COPY docker docker
COPY .eslintrc.js ./.eslintrc.js
COPY nuxt.config.js ./nuxt.config.js
COPY package.json ./package.json
COPY postcss.config.js ./postcss.config.js
COPY yarn.lock ./yarn.lock
COPY styleguide ./styleguide
RUN set -x \
&& yarn \
&& yarn run build
# Run stage
FROM node:carbon-alpine
RUN set -x \
# Add more repositories for our convenience
&& echo http://dl-cdn.alpinelinux.org/alpine/edge/main | tee /etc/apk/repositories \
&& echo @testing http://dl-cdn.alpinelinux.org/alpine/edge/testing | tee -a /etc/apk/repositories \
&& echo @community http://dl-cdn.alpinelinux.org/alpine/edge/community | tee -a /etc/apk/repositories \
# Install envsubst command for replacing config files in system startup
# - it needs libintl package
# - only weights 100KB combined with its libraries
&& apk add --update gettext libintl \
# && mv /usr/bin/envsubst /usr/local/sbin/envsubst \
# install nginx
&& apk add --update nginx \
&& rm -rf /var/cache/apk/*
# redirect logs to stdout/stderr
RUN set -x \
&& ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
RUN set -x \
&& mkdir -p /rw-volume \
&& chown -R nginx:nginx /rw-volume
VOLUME ["/rw-volume"]
COPY --from=build /repo/.nuxt /web/.nuxt
COPY --from=build /repo/package.json /web/package.json
COPY --from=build /repo/docker/nginx.conf.template /nginx.conf.template
COPY --from=build /repo/docker/server.conf.template /server.conf.template
COPY --from=build /repo/docker/start.sh /start.sh
RUN chown -R nginx:nginx /web
USER "nginx"
EXPOSE 8080
CMD [ "/start.sh" ]

4
Dockerfile.styleguide

@ -1,4 +0,0 @@ @@ -1,4 +0,0 @@
# specify the node base image with your desired version node:<version>
FROM node:10.13
# replace this with your application's default port
EXPOSE 9001

110
README.md

@ -1,105 +1,69 @@ @@ -1,105 +1,69 @@
# General
# vre-frontend
## Prerequisites
## Build Setup
- Docker
- Node (with nvm to manage versions)
- Yarn
- NVM
```bash
# install dependencies
$ yarn install
# Development
# serve with hot reload at localhost:3000
$ yarn dev
To install follow below instructions
## Manual set-up
- First install the latest node.js
- Then Install node.js carbon (8) with nvm ```nvm install 6.14.4```
- At last install package.json using yarn ```yarn install```
## Docker
The whole development environment is streamlined with docker-compose. Just run `docker-compose up -d`
## Host
add the following to your hosts file:
# build for production and launch server
$ yarn build
$ yarn start
# generate static project
$ yarn generate
```
127.0.0.1 vre.local
```
## app-web
The frontend of the application is built with a clean seperation of view logic and business logic. You find the view logic in `app-web/styleguide`. The business logic is inside `app-web/src`.
### styleguide
For detailed explanation on how things work, check out the [documentation](https://nuxtjs.org).
You can find the styleguide in `app-web/styleguide`. The styleguide is developed with Storybook. After starting docker-compose, you can access storybook through [http://localhost:9001](http://localhost:9001).
## Special Directories
#### Components
You can create the following extra directories, some of which have special behaviors. Only `pages` is required; you can delete them if you don't want to use their functionality.
- **UI**:
These components are the smallest building blocks of the application. Like buttons, lists, titles, ...
- **Modules**:
These components are a combination of UI components that are frequently used together, like a search form or an image with caption.
- **Layouts**:
These components are used to layout different UI and module components together. These are examples of how pages will look in the finished app.
### `assets`
#### Styles
The assets directory contains your uncompiled assets such as Stylus or Sass files, images, or fonts.
Here you find all the css style definitions for the project.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/assets).
Running `yarn build-css` inside the `app-web` directory will produce the css only, so this can be used outside this project as well.
### `components`
### src
The components directory contains your Vue.js components. Components make up the different parts of your page and can be reused and imported into your pages, layouts and even other components.
When docker-compose is running and you updated your hosts file, you can access the following websites:
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/components).
### `layouts`
The `webb-app` is built using https://nuxtjs.org/
Layouts are a great help when you want to change the look and feel of your Nuxt app, whether you want to include a sidebar or have distinct layouts for mobile and desktop.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/layouts).
# Working on your machine
#### Docker
- cd to root of project
- run `docker-compose up --build`
### `pages`
#### Dev mode web-app:
- go to folder `cd ./app-web`
- run `nvm use`
- run `dotenv yarn run dev`
- Alternatively run `yarn dev`
This directory contains your application views and routes. Nuxt will read all the `*.vue` files inside this directory and setup Vue Router automatically.
#### Storybook
- go to folder `cd ./app-web`
- run `nvm use`
- run `dotenv yarn run storybook`
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/get-started/routing).
#### Vagrant
- run `vagrant global-status`
- copy the id of your vm
- OR go to the ./app-api folder and skip the $id part
- run `vagrant up $id`
- run `vagrant ssh $id`
### `plugins`
# Translations
The plugins directory contains JavaScript plugins that you want to run before instantiating the root Vue.js Application. This is the place to add Vue plugins and to inject functions or constants. Every time you need to use `Vue.use()`, you should create a file in `plugins/` and add its path to plugins in `nuxt.config.js`.
#### Po editor
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/plugins).
Download a po editor from: https://poedit.net/
### `static`
#### Prepare for translation
This directory contains your static files. Each file inside this directory is mapped to `/`.
Get the `nl.json` file and upload it to https://localise.biz/free/converter/po-to-json
choose To: Gettext -> Gettext PO
Example: `/static/robots.txt` is mapped as `/robots.txt`.
#### Edit content
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/static).
Open de .po file with the po editor
### `store`
#### Finishing translations
This directory contains your Vuex store files. Creating a file in this directory automatically activates Vuex.
Get the .po file and upload it to https://localise.biz/free/converter/po-to-json
choose To: JSON -> Angular Gettext
store the updated .json file in the repo and re-deploy.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/store).

4
assets/variables.scss

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
// Ref: https://github.com/nuxt-community/vuetify-module#customvariables
//
// The variables you want to modify
// $font-size-root: 20px;

11
components/NuxtLogo.vue

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
<template>
<svg class="nuxt-logo" viewBox="0 0 45 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M24.7203 29.704H41.1008C41.6211 29.7041 42.1322 29.5669 42.5828 29.3061C43.0334 29.0454 43.4075 28.6704 43.6675 28.2188C43.9275 27.7672 44.0643 27.2549 44.0641 26.7335C44.0639 26.2121 43.9266 25.6999 43.6662 25.2485L32.6655 6.15312C32.4055 5.70162 32.0315 5.32667 31.581 5.06598C31.1305 4.8053 30.6195 4.66805 30.0994 4.66805C29.5792 4.66805 29.0682 4.8053 28.6177 5.06598C28.1672 5.32667 27.7932 5.70162 27.5332 6.15312L24.7203 11.039L19.2208 1.48485C18.9606 1.03338 18.5864 0.658493 18.1358 0.397853C17.6852 0.137213 17.1741 0 16.6538 0C16.1336 0 15.6225 0.137213 15.1719 0.397853C14.7213 0.658493 14.3471 1.03338 14.0868 1.48485L0.397874 25.2485C0.137452 25.6999 0.000226653 26.2121 2.8053e-07 26.7335C-0.000226092 27.2549 0.136554 27.7672 0.396584 28.2188C0.656614 28.6704 1.03072 29.0454 1.48129 29.3061C1.93185 29.5669 2.44298 29.7041 2.96326 29.704H13.2456C17.3195 29.704 20.3239 27.9106 22.3912 24.4118L27.4102 15.7008L30.0986 11.039L38.1667 25.0422H27.4102L24.7203 29.704ZM13.0779 25.0374L5.9022 25.0358L16.6586 6.36589L22.0257 15.7008L18.4322 21.9401C17.0593 24.2103 15.4996 25.0374 13.0779 25.0374Z" fill="#00DC82" />
</svg>
</template>
<style>
.nuxt-logo {
height: 180px;
}
</style>

46
components/Tutorial.vue

@ -0,0 +1,46 @@ @@ -0,0 +1,46 @@
<!-- Please remove this file from your project -->
<template>
<div class="relative flex items-top justify-center min-h-screen bg-gray-100 sm:items-center sm:pt-0">
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.1.2/dist/tailwind.min.css" rel="stylesheet">
<div class="max-w-4xl mx-auto sm:px-6 lg:px-8">
<a class="flex justify-center pt-8 sm:pt-0" href="https://nuxtjs.org" target="_blank">
<svg width="218" height="45" viewBox="0 0 159 30" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M55.5017 6.81866H60.1727L70.0719 22.9912V6.81866H74.3837V29.7345H69.7446L59.8135 13.5955V29.7345H55.5017V6.81866Z" fill="#003543" /> <path d="M93.657 29.7344H89.6389V27.1747C88.7241 28.9761 86.8628 29.9904 84.5113 29.9904C80.7869 29.9904 78.3684 27.3059 78.3684 23.4423V13.2339H82.3865V22.5976C82.3865 24.8566 83.7594 26.4276 85.8171 26.4276C88.0712 26.4276 89.6389 24.6598 89.6389 22.2377V13.2339H93.657V29.7344Z" fill="#003543" /> <path d="M107.64 29.7344L103.784 24.2342L99.9291 29.7344H95.6492L101.596 21.1242L96.1074 13.2339H100.485L103.784 17.9821L107.051 13.2339H111.461L105.94 21.1242L111.886 29.7344H107.64Z" fill="#003543" /> <path d="M120.053 8.25848V13.2339H124.627V16.6063H120.053V24.7974C120.053 25.0725 120.162 25.3363 120.356 25.531C120.55 25.7257 120.813 25.8353 121.087 25.8357H124.627V29.728H121.98C118.386 29.728 116.035 27.6323 116.035 23.9687V16.6095H112.801V13.2339H114.83C115.776 13.2339 116.327 12.6692 116.327 11.7349V8.25848H120.053Z" fill="#003543" /> <path d="M134.756 24.5446V6.81866H139.066V23.1864C139.066 27.6067 136.943 29.7345 133.349 29.7345H128.332V25.8421H133.461C133.804 25.8421 134.134 25.7054 134.377 25.4621C134.619 25.2188 134.756 24.8888 134.756 24.5446Z" fill="#003543" /> <path d="M141.649 22.0409H145.799C146.029 24.6006 147.728 26.2308 150.472 26.2308C152.923 26.2308 154.623 25.2501 154.623 23.2199C154.623 18.3085 142.331 21.7129 142.331 12.9395C142.334 9.17515 145.568 6.55945 150.215 6.55945C155.05 6.55945 158.317 9.34153 158.516 13.6306H154.388C154.193 11.6341 152.632 10.2918 150.207 10.2918C147.953 10.2918 146.548 11.3397 146.548 12.9427C146.548 18.0173 159 14.2226 159 23.1576C159 27.4131 155.504 30 150.474 30C145.279 30 141.882 26.8563 141.654 22.0441" fill="#003543" /> <path d="M24.7203 29.704H41.1008C41.6211 29.7041 42.1322 29.5669 42.5828 29.3061C43.0334 29.0454 43.4075 28.6704 43.6675 28.2188C43.9275 27.7672 44.0643 27.2549 44.0641 26.7335C44.0639 26.2121 43.9266 25.6999 43.6662 25.2485L32.6655 6.15312C32.4055 5.70162 32.0315 5.32667 31.581 5.06598C31.1305 4.8053 30.6195 4.66805 30.0994 4.66805C29.5792 4.66805 29.0682 4.8053 28.6177 5.06598C28.1672 5.32667 27.7932 5.70162 27.5332 6.15312L24.7203 11.039L19.2208 1.48485C18.9606 1.03338 18.5864 0.658493 18.1358 0.397853C17.6852 0.137213 17.1741 0 16.6538 0C16.1336 0 15.6225 0.137213 15.1719 0.397853C14.7213 0.658493 14.3471 1.03338 14.0868 1.48485L0.397874 25.2485C0.137452 25.6999 0.000226653 26.2121 2.8053e-07 26.7335C-0.000226092 27.2549 0.136554 27.7672 0.396584 28.2188C0.656614 28.6704 1.03072 29.0454 1.48129 29.3061C1.93185 29.5669 2.44298 29.7041 2.96326 29.704H13.2456C17.3195 29.704 20.3239 27.9106 22.3912 24.4118L27.4102 15.7008L30.0986 11.039L38.1667 25.0422H27.4102L24.7203 29.704ZM13.0779 25.0374L5.9022 25.0358L16.6586 6.36589L22.0257 15.7008L18.4322 21.9401C17.0593 24.2103 15.4996 25.0374 13.0779 25.0374Z" fill="#00DC82" /></svg>
</a>
<div class="mt-8 bg-white overflow-hidden shadow sm:rounded-lg p-6">
<h2 class="text-2xl leading-7 font-semibold">
Welcome to your Nuxt Application
</h2>
<p class="mt-3 text-gray-600">
We recommend you take a look at the <a href="https://nuxtjs.org" target="_blank" class="text-green-500 hover:underline">Nuxt documentation</a>, whether you are new or have previous experience with the framework.<br>
</p>
<p class="mt-4 pt-4 text-gray-800 border-t border-dashed">
To get started, remove <code class="bg-gray-100 text-sm p-1 rounded border">components/Tutorial.vue</code> and start coding in <code class="bg-gray-100 text-sm p-1 rounded border">pages/index.vue</code>. Have fun!
</p>
</div>
<div class="flex justify-center pt-4 space-x-2">
<a href="https://github.com/nuxt/nuxt.js" target="_blank"><svg
class="w-6 h-6 text-gray-600 hover:text-gray-800"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
aria-hidden="true"
role="img"
width="32"
height="32"
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 24 24"
><path d="M12 2.247a10 10 0 0 0-3.162 19.487c.5.088.687-.212.687-.475c0-.237-.012-1.025-.012-1.862c-2.513.462-3.163-.613-3.363-1.175a3.636 3.636 0 0 0-1.025-1.413c-.35-.187-.85-.65-.013-.662a2.001 2.001 0 0 1 1.538 1.025a2.137 2.137 0 0 0 2.912.825a2.104 2.104 0 0 1 .638-1.338c-2.225-.25-4.55-1.112-4.55-4.937a3.892 3.892 0 0 1 1.025-2.688a3.594 3.594 0 0 1 .1-2.65s.837-.262 2.75 1.025a9.427 9.427 0 0 1 5 0c1.912-1.3 2.75-1.025 2.75-1.025a3.593 3.593 0 0 1 .1 2.65a3.869 3.869 0 0 1 1.025 2.688c0 3.837-2.338 4.687-4.563 4.937a2.368 2.368 0 0 1 .675 1.85c0 1.338-.012 2.413-.012 2.75c0 .263.187.575.687.475A10.005 10.005 0 0 0 12 2.247z" fill="currentColor" /></svg></a>
<a href="https://twitter.com/nuxt_js" target="_blank"><svg
class="w-6 h-6 text-gray-600 hover:text-gray-800"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
aria-hidden="true"
role="img"
width="32"
height="32"
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 24 24"
><path d="M22.46 6c-.77.35-1.6.58-2.46.69c.88-.53 1.56-1.37 1.88-2.38c-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29c0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15c0 1.49.75 2.81 1.91 3.56c-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07a4.28 4.28 0 0 0 4 2.98a8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21C16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56c.84-.6 1.56-1.36 2.14-2.23z" fill="currentColor" /></svg></a>
</div>
</div>
</div>
</template>

22
components/VuetifyLogo.vue

@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
<template>
<img
class="VuetifyLogo"
alt="Vuetify Logo"
src="/vuetify-logo.svg"
>
</template>
<style>
.VuetifyLogo {
height: 180px;
width: 180px;
transform: rotateY(560deg);
animation: turn 3.5s ease-out forwards 1s;
}
@keyframes turn {
100% {
transform: rotateY(0deg);
}
}
</style>

36
css.webpack.config.js

@ -1,36 +0,0 @@ @@ -1,36 +0,0 @@
const path = require('path');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
entry: [
'./styleguide/styles/index.css',
],
output: {
path: path.resolve(__dirname, 'css-build'),
filename: '[name].js',
},
plugins: [
new CleanWebpackPlugin(['css-build']),
new MiniCssExtractPlugin({ filename: '[name].css' }),
],
mode: 'production',
module: {
rules: [
{
test: /\.css$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
importLoaders: 1,
},
},
'postcss-loader',
],
},
],
},
devtool: "source-map",
};

44
docker/nginx.conf.template

@ -1,44 +0,0 @@ @@ -1,44 +0,0 @@
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /rw-volume/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
client_body_temp_path /rw-volume/client_body;
proxy_temp_path /rw-volume/proxy;
fastcgi_temp_path /rw-volume/fastcgi;
uwsgi_temp_path /rw-volume/uwsgi;
scgi_temp_path /rw-volume/scgi;
log_format json '{'
'"timestamp": "$time_iso8601", '
'"remote_addr": "$remote_addr", '
'"upstream_addr": "$upstream_addr", '
'"remote_user": "$remote_user", '
'"body_bytes_sent": "$body_bytes_sent", '
'"request_time": "$request_time", '
'"upstream_response_time": "$request_time", '
'"status": "$status", '
'"request": "$request", '
'"request_method": "$request_method", '
'"http_referrer": "$http_referer", '
'"http_user_agent": "$http_user_agent"'
'}';
access_log /var/log/nginx/access.log json;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
gzip on;
include server.conf;
}

47
docker/server.conf.template

@ -1,47 +0,0 @@ @@ -1,47 +0,0 @@
server {
listen ${PORT};
listen [::]:${PORT};
server_name ${HOST_CS};
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:3000/creatiefschrijven-be/;
proxy_read_timeout 90s;
}
}
server {
listen ${PORT};
listen [::]:${PORT};
server_name ${HOST_MYCS};
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:3000/mijn-creatiefschrijven-be/;
proxy_read_timeout 90s;
}
}
server {
listen ${PORT};
listen [::]:${PORT};
server_name ${HOST_AF};
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:3000/azertyfactor-be/;
proxy_read_timeout 90s;
}
}

18
docker/start.sh

@ -1,18 +0,0 @@ @@ -1,18 +0,0 @@
#!/bin/sh
set -eo pipefail
echo "Starting nginx"
envsubst '${PORT}' < /nginx.conf.template > /rw-volume/nginx.conf
envsubst '${PORT} ${HOST_CS} ${HOST_MYCS} ${HOST_AF}' < /server.conf.template > /rw-volume/server.conf
nginx -c /rw-volume/nginx.conf
echo "Starting app"
# If we have a start command, we use that, otherwise we just run the build.
if [ -z "$START_COMMAND" ]
then
yarn --cwd /web run start;
else
$START_COMMAND;
fi

117
layouts/default.vue

@ -0,0 +1,117 @@ @@ -0,0 +1,117 @@
<template>
<v-app dark>
<v-navigation-drawer
v-model="drawer"
:mini-variant="miniVariant"
:clipped="clipped"
fixed
app
>
<v-list>
<v-list-item
v-for="(item, i) in items"
:key="i"
:to="item.to"
router
exact
>
<v-list-item-action>
<v-icon>{{ item.icon }}</v-icon>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title v-text="item.title" />
</v-list-item-content>
</v-list-item>
</v-list>
</v-navigation-drawer>
<v-app-bar
:clipped-left="clipped"
fixed
app
>
<v-app-bar-nav-icon @click.stop="drawer = !drawer" />
<v-btn
icon
@click.stop="miniVariant = !miniVariant"
>
<v-icon>mdi-{{ `chevron-${miniVariant ? 'right' : 'left'}` }}</v-icon>
</v-btn>
<v-btn
icon
@click.stop="clipped = !clipped"
>
<v-icon>mdi-application</v-icon>
</v-btn>
<v-btn
icon
@click.stop="fixed = !fixed"
>
<v-icon>mdi-minus</v-icon>
</v-btn>
<v-toolbar-title v-text="title" />
<v-spacer />
<v-btn
icon
@click.stop="rightDrawer = !rightDrawer"
>
<v-icon>mdi-menu</v-icon>
</v-btn>
</v-app-bar>
<v-main>
<v-container>
<Nuxt />
</v-container>
</v-main>
<v-navigation-drawer
v-model="rightDrawer"
:right="right"
temporary
fixed
>
<v-list>
<v-list-item @click.native="right = !right">
<v-list-item-action>
<v-icon light>
mdi-repeat
</v-icon>
</v-list-item-action>
<v-list-item-title>Switch drawer (click me)</v-list-item-title>
</v-list-item>
</v-list>
</v-navigation-drawer>
<v-footer
:absolute="!fixed"
app
>
<span>&copy; {{ new Date().getFullYear() }}</span>
</v-footer>
</v-app>
</template>
<script>
export default {
data () {
return {
clipped: false,
drawer: false,
fixed: false,
items: [
{
icon: 'mdi-apps',
title: 'Welcome',
to: '/'
},
{
icon: 'mdi-chart-bubble',
title: 'Inspire',
to: '/inspire'
}
],
miniVariant: false,
right: true,
rightDrawer: false,
title: 'Vuetify.js'
}
}
}
</script>

44
layouts/error.vue

@ -0,0 +1,44 @@ @@ -0,0 +1,44 @@
<template>
<v-app dark>
<h1 v-if="error.statusCode === 404">
{{ pageNotFound }}
</h1>
<h1 v-else>
{{ otherError }}
</h1>
<NuxtLink to="/">
Home page
</NuxtLink>
</v-app>
</template>
<script>
export default {
layout: 'empty',
props: {
error: {
type: Object,
default: null
}
},
data () {
return {
pageNotFound: '404 Not Found',
otherError: 'An error occurred'
}
},
head () {
const title =
this.error.statusCode === 404 ? this.pageNotFound : this.otherError
return {
title
}
}
}
</script>
<style scoped>
h1 {
font-size: 20px;
}
</style>

216
nuxt.config.js

@ -1,181 +1,65 @@ @@ -1,181 +1,65 @@
import EventHooksPlugin from 'event-hooks-webpack-plugin';
import i18nAppendKeys from './src/i18n/appendKeys';
import { PromiseTask } from 'event-hooks-webpack-plugin/lib/tasks';
import colors from 'vuetify/es5/util/colors'
const hosts = [
process.env.HOST_ACCOUNT,
process.env.HOST_AUTH,
process.env.HOST_COMMUNITY,
process.env.HOST_ORGANIZATION,
];
module.exports = {
/*
** Headers of the page
*/
export default {
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
titleTemplate: '%s - vre-frontend',
title: 'vre-frontend',
htmlAttrs: {
lang: 'en'
},
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: '' },
{ name: 'format-detection', content: 'telephone=no' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
],
},
env: {
httpProtocol: process.env.HOST_PROTOCOL,
httpPort: process.env.HOST_PORT,
apiUrl: process.env.API_URL,
multidomain: {
sites: {
account: {
hostname: process.env.HOST_ACCOUNT,
routes: 'account',
title: 'general.account.title', // $t('general.account.title')
description: 'general.account.description', // $t('general.account.description')
theme: 'red',
},
auth: {
hostname: process.env.HOST_AUTH,
routes: 'auth',
title: 'general.auth.title', // $t('general.auth.title')
description: 'general.auth.description', // $t('general.auth.description')
theme: 'red',
},
community: {
hostname: process.env.HOST_COMMUNITY,
routes: 'community',
title: 'general.community.title', // $t('general.community.title')
description: 'general.community.description', // $t('general.community.description')
theme: 'mint',
},
organization: {
hostname: process.env.HOST_ORGANIZATION,
routes: 'organization',
title: 'general.organization.title', // $t('general.organization.title')
description: 'general.organization.description', // $t('general.organization.description')
theme: 'red',
},
},
afterLoginDefaultSite: 'organization',
},
analytics: {
ga: process.env.ANALYTICS_GA_ID,
hotjar: process.env.ANALYTICS_HOTJAR_ID,
},
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
srcDir: './src',
// Global CSS: https://go.nuxtjs.dev/config-css
css: [
],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [
'~/plugins/vuex-router-sync',
'~/plugins/auth-redirect',
'~/plugins/axios',
{ src: '~/plugins/vue-imagesloaded', mode: 'client' },
'~/plugins/auth-redirect',
'~/plugins/analytics',
],
css: [
'~/../styleguide/styles/index.css',
// 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/vuetify
'@nuxtjs/vuetify',
],
/*
** Customize the progress bar color
*/
loading: { color: '#3A3A3A' },
/*
** Modules
*/
// Modules: https://go.nuxtjs.dev/config-modules
modules: [
'~/modules/multidomain',
'~/modules/i18n',
'@nuxtjs/axios',
],
/*
** Axios config
*/
axios: {
baseURL: process.env.API_URL,
proxy: true,
https: process.env.API_HTTPS,
},
/*
** The proxy used by Axios
*/
proxy: {
'/api/': {
target: process.env.API_URL,
},
},
/*
** Middleware
*/
router: {
middleware: [
'i18n',
],
linkActiveClass: 'active',
linkExactActiveClass: 'exact-active',
},
/*
** Render
*/
render: {
csp: {
hashAlgorithm: 'sha256',
policies: {
'default-src': [
'\'self\'',
].concat(hosts.map((host) => `https://${host}`))
.concat(hosts),
'style-src': [
'\'self\'',
'*.googleapis.com',
'\'unsafe-inline\'',
],
'font-src': [
'\'self\'',
'fonts.gstatic.com',
],
'script-src': [
'\'unsafe-inline\'',
'\'unsafe-eval\'',
],
'frame-ancestors': [
'\'self\'',
].concat(hosts.map((host) => `https://${host}`))
.concat(hosts),
'img-src': [
'\'self\'',
'*.imgix.net',
],
},
},
},
/*
** Build configuration
*/
build: {
minimize: false,
extend(config, { isDev, isClient, isServer }) {
if (isDev && isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/,
});
}
if (isDev && isServer) {
config.plugins.unshift(
new EventHooksPlugin({
beforeCompile: new PromiseTask(i18nAppendKeys),
}),
);
}
if (isDev) {
config.devtool = 'eval-source-map';
}
config.resolve.alias['vue'] = 'vue/dist/vue.common';
},
watch: ['router', '../styleguide/styles'],
// Vuetify module configuration: https://go.nuxtjs.dev/config-vuetify
vuetify: {
customVariables: ['~/assets/variables.scss'],
theme: {
dark: true,
themes: {
dark: {
primary: colors.blue.darken2,
accent: colors.grey.darken3,
secondary: colors.amber.darken3,
info: colors.teal.lighten1,
warning: colors.amber.base,
error: colors.deepOrange.accent4,
success: colors.green.accent3
}
}
}
},
};
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
}
}

88
package.json

@ -1,91 +1,19 @@ @@ -1,91 +1,19 @@
{
"name": "cso-web",
"name": "vre-frontend",
"version": "1.0.0",
"author": "Jan Verhulst <jan@verhulst.io>",
"private": true,
"scripts": {
"dev": "dotenv nuxt dev --host 0.0.0.0 --port 3000",
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore . --ignore-pattern **/*.test.js --ignore-pattern */static ",
"precommit": "npm run lint",
"storybook": "start-storybook -p 9001 -s ./src/static -c styleguide/.storybook",
"build-css": "webpack --config css.webpack.config.js",
"build-storybook": "build-storybook",
"i18n-extract": "node scripts/i18n/appendKeys",
"i18n-clean": "node scripts/i18n/purgeKeys"
"generate": "nuxt generate"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.2",
"@fortawesome/free-brands-svg-icons": "^5.2.0",
"@fortawesome/free-regular-svg-icons": "^5.2.0",
"@fortawesome/free-solid-svg-icons": "^5.2.0",
"@fortawesome/vue-fontawesome": "^0.1.1",
"@nuxtjs/axios": "^5.3.6",
"@nuxtjs/proxy": "^1.3.1",
"@tinymce/tinymce-vue": "^2.0.0",
"ajv": "^6.7.0",
"ajv-i18n": "^3.4.0",
"axios": "^0.18.0",
"body-parser": "^1.18.3",
"cookie-parser": "^1.4.3",
"dotenv": "^6.2.0",
"full-icu": "^1.2.1",
"i18n-extract": "^0.6.3",
"js-cookie": "^2.2.0",
"lodash": "^4.17.11",
"mini-css-extract-plugin": "^0.4.4",
"moment": "^2.23.0",
"node-fetch": "^2.6.0",
"nuxt": "^2.8.1",
"pm2": "^2.10.1",
"query-string": "^6.2.0",
"tinymce": "^5.0.0",
"validatorjs": "^3.15.1",
"vue": "^2.6.8",
"vue-clickaway": "^2.2.2",
"vue-cookie-accept-decline": "^5.2.3",
"vue-i18n": "^8.4.0",
"vue-images-loaded": "^1.1.2",
"vue-router": "^3.0.1",
"vue-template-loader": "^1.0.0",
"vue-types": "^1.5.3",
"vueisotope": "^3.1.2",
"vuejs-datepicker": "^1.5.4",
"vuex": "^3.1.1",
"vuex-router-sync": "^5.0.0"
"core-js": "^3.15.1",
"nuxt": "^2.15.7",
"vuetify": "^2.5.5"
},
"devDependencies": {
"@babel/core": "^7.1.2",
"@babel/preset-env": "^7.1.0",
"@storybook/addon-actions": "^4.0.2",
"@storybook/addon-links": "^4.0.2",
"@storybook/addon-options": "^4.1.7",
"@storybook/addons": "^4.0.2",
"@storybook/components": "^4.1.7",
"@storybook/vue": "^4.0.2",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.4",
"babel-preset-vue": "^2.0.2",
"clean-webpack-plugin": "^0.1.19",
"cssnano": "^4.0.4",
"dotenv-cli": "^1.4.0",
"eslint": "^5.8.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-loader": "^2.1.1",
"eslint-plugin-vue": "^5.0.0-beta.3",
"event-hooks-webpack-plugin": "^2.1.1",
"normalize.css": "^8.0.0",
"postcss-browser-reporter": "^0.5.0",
"postcss-custom-media": "^6.0.0",
"postcss-import": "^11.1.0",
"postcss-nested": "^3.0.0",
"postcss-preset-env": "^5.3.0",
"postcss-reporter": "^5.0.0",
"postcss-url": "^7.3.2",
"vue-loader": "^15.2.6",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.5.22",
"webpack-cli": "^3.1.2"
"@nuxtjs/vuetify": "^1.12.1"
}
}
}

77
pages/index.vue

@ -0,0 +1,77 @@ @@ -0,0 +1,77 @@
<template>
<v-row justify="center" align="center">
<v-col cols="12" sm="8" md="6">
<v-card class="logo py-4 d-flex justify-center">
<NuxtLogo />
<VuetifyLogo />
</v-card>
<v-card>
<v-card-title class="headline">
Welcome to the Vuetify + Nuxt.js template
</v-card-title>
<v-card-text>
<p>Vuetify is a progressive Material Design component framework for Vue.js. It was designed to empower developers to create amazing applications.</p>
<p>
For more information on Vuetify, check out the <a
href="https://vuetifyjs.com"
target="_blank"
rel="noopener noreferrer"
>
documentation
</a>.
</p>
<p>
If you have questions, please join the official <a
href="https://chat.vuetifyjs.com/"
target="_blank"
rel="noopener noreferrer"
title="chat"
>
discord
</a>.
</p>
<p>
Find a bug? Report it on the github <a
href="https://github.com/vuetifyjs/vuetify/issues"
target="_blank"
rel="noopener noreferrer"
title="contribute"
>
issue board
</a>.
</p>
<p>Thank you for developing with Vuetify and I look forward to bringing more exciting features in the future.</p>
<div class="text-xs-right">
<em><small>&mdash; John Leider</small></em>
</div>
<hr class="my-3">
<a
href="https://nuxtjs.org/"
target="_blank"
rel="noopener noreferrer"
>
Nuxt Documentation
</a>
<br>
<a
href="https://github.com/nuxt/nuxt.js"
target="_blank"
rel="noopener noreferrer"
>
Nuxt GitHub
</a>
</v-card-text>
<v-card-actions>
<v-spacer />
<v-btn
color="primary"
nuxt
to="/inspire"
>
Continue
</v-btn>
</v-card-actions>
</v-card>
</v-col>
</v-row>
</template>

19
pages/inspire.vue

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
<template>
<v-row>
<v-col class="text-center">
<img
src="/v.png"
alt="Vuetify.js"
class="mb-5"
>
<blockquote class="blockquote">
&#8220;First, solve the problem. Then, write the code.&#8221;
<footer>
<small>
<em>&mdash;John Johnson</em>
</small>
</footer>
</blockquote>
</v-col>
</v-row>
</template>

28
pm2.config.js

@ -1,28 +0,0 @@ @@ -1,28 +0,0 @@
module.exports = {
apps: [{
name: 'API',
script: 'dotenv yarn start',
// Options reference: https://pm2.io/doc/en/runtime/reference/ecosystem-file/
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
env: {
NODE_ENV: 'development',
},
env_production: {
NODE_ENV: 'production',
},
}],
// deploy : {
// production : {
// user : 'node',
// host : '212.83.163.1',
// ref : 'origin/master',
// repo : 'git@github.com:repo.git',
// path : '/var/www/production',
// 'post-deploy' : 'npm install && pm2 reload pm2.config.js --env production'
// }
// }
};

10
postcss.config.js

@ -1,10 +0,0 @@ @@ -1,10 +0,0 @@
module.exports = {
plugins: {
'postcss-import': {},
'postcss-nested': {},
'postcss-preset-env': {},
'postcss-custom-media': {},
'postcss-url': {},
'cssnano': {},
},
};

3
scripts/i18n/appendKeys.js

@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
const appendKeys = require('../../src/i18n/appendKeys');
appendKeys();

3
scripts/i18n/purgeKeys.js

@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
const purgeKeys = require('../../src/i18n/purgeKeys');
purgeKeys();

8
src/assets/README.md

@ -1,8 +0,0 @@ @@ -1,8 +0,0 @@
# ASSETS
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
**This directory is not required, you can delete it if you don't want to use it.**

6
src/components/README.md

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

142
src/components/compositions/ArticlePage/ArticlePage.vue

@ -1,142 +0,0 @@ @@ -1,142 +0,0 @@
<template>
<DetailPage
:title="article.title"
:parent-links="parentLinks"
:image-url="article.image ? article.image.url.default : null"
>
<template slot="content">
<Box class="header">
<Box
top-offset="default"
>
<Pretitle v-if="article.type === 'news'">
{{ $t('pages.organization.article.detail.type-news') }}
</Pretitle>
<Pretitle v-if="article.type === 'report'">
{{ $t('pages.organization.article.detail.type-report') }}
</Pretitle>
<Pretitle v-if="article.type === 'tip-of-the-week'">
{{ $t('pages.organization.article.detail.type-tip-of-the-week') }}
</Pretitle>
<DetailPageTitle>{{ article.title }}</DetailPageTitle>
</Box>
</Box>
<div v-html="article.body" />
<Box v-if="article.ctaButtonUrl">
<HorizontalDivider />
<div class="footerbutton">
<Button
tag="a"
:href="article.ctaButtonUrl"
>
{{ article.ctaButtonText }}
</Button>
</div>
</Box>
</template>
<template slot="details_subimage">
<Box
v-if="related"
bottom-offset="default"
>
<PanelSubTitle>{{ $t('pages.organization.article.detail.related') }}</PanelSubTitle>
<TileListTile :item="related" />
</Box>
</template>
<template slot="details">
<PanelSubTitle>{{ $t('pages.organization.article.detail.createdAt') }}</PanelSubTitle>
<p>
{{ $d(new Date(article.createdAt), 'short') }}
</p>
<div v-if="article.genres.length">
<HorizontalDivider />
<PanelSubTitle>{{ $t('pages.organization.article.detail.genres') }}</PanelSubTitle>
<div
class="info__genres"
>
<TextGenre
v-for="genre in article.genres"
:key="genre.id"
:genre="genre"
/>
</div>
</div>
</template>
</DetailPage>
</template>
<script>
import VueTypes from 'vue-types';
import DetailPage from '~/components/compositions/DetailPage';
import Box from '~/components/styleguide/ui/Box';
import { DetailPageTitle, PanelSubTitle } from '~/components/styleguide/ui/Title';
import TextGenre from '~/components/domain/Text/TextGenre';
import HorizontalDivider from '~/components/styleguide/ui/HorizontalDivider';
import Pretitle from '~/components/styleguide/ui/Pretitle';
import Button from '~/components/styleguide/ui/Button';
import { TileListTile } from '~/components/styleguide/modules/TileList';
import { mapSearchResultToTile } from '../../../lib/tiles';
import { breadcrumbnavParentLinksType } from '~/components/styleguide/modules/BreadcrumbNav';
export default {
components: {
DetailPage,
Box,
DetailPageTitle,
PanelSubTitle,
HorizontalDivider,
TextGenre,
Pretitle,
Button,
TileListTile,
},
props: {
parentLinks: breadcrumbnavParentLinksType.isRequired,
article: VueTypes.object.isRequired,
},
computed: {
related() {
if (this.article.related) {