From 10304968c894be9481024bd0a4d9afa74fe343d0 Mon Sep 17 00:00:00 2001 From: Troplo Date: Sat, 5 Feb 2022 14:39:37 +1100 Subject: [PATCH] updates --- ui/.browserslistrc => .browserslistrc | 0 .eslintrc.js | 14 + .gitignore | 51 +- .prettierignore | 4 + .prettierrc | 13 + ui/README.md => README.md | 5 + babel.config.js | 3 + package.json | 78 +- {ui/patches => patches}/vuetify+2.5.9.patch | 0 {ui/public => public}/favicon.ico | Bin .../img/icons/android-chrome-192x192.png | Bin .../img/icons/android-chrome-512x512.png | Bin .../icons/android-chrome-maskable-192x192.png | Bin .../icons/android-chrome-maskable-512x512.png | Bin .../img/icons/apple-touch-icon-120x120.png | Bin .../img/icons/apple-touch-icon-152x152.png | Bin .../img/icons/apple-touch-icon-180x180.png | Bin .../img/icons/apple-touch-icon-60x60.png | Bin .../img/icons/apple-touch-icon-76x76.png | Bin .../img/icons/apple-touch-icon.png | Bin .../img/icons/favicon-16x16.png | Bin .../img/icons/favicon-32x32.png | Bin .../img/icons/msapplication-icon-144x144.png | Bin .../img/icons/mstile-150x150.png | Bin .../img/icons/safari-pinned-tab.svg | 6 +- {ui/public => public}/index.html | 44 +- {ui/public => public}/robots.txt | 4 +- {ui/src => src}/App.vue | 161 +- {ui/src => src}/assets/images/kaverti.png | Bin {ui/src => src}/assets/images/polytoria.png | Bin {ui/src => src}/assets/images/proj01.png | Bin {ui/src => src}/assets/images/troplo-plex.png | Bin .../assets/images/troplo-website.png | Bin {ui/src => src}/assets/logo.png | Bin {ui/src => src}/assets/logo.svg | 0 src/components/Header.vue | 94 + src/main.js | 14 + src/plugins/vuetify.js | 25 + src/registerServiceWorker.js | 34 + src/router/index.js | 46 + {ui/src => src}/store/index.js | 10 +- src/views/Contact.vue | 99 + {ui/src => src}/views/Home.vue | 44 +- {ui/src => src}/views/Nexus.vue | 26 +- {ui/src => src}/views/NotFound.vue | 6 +- {ui/src => src}/views/Projects.vue | 138 +- ui/.eslintrc.js | 17 - ui/.gitignore | 23 - ui/babel.config.js | 5 - ui/package.json | 36 - ui/src/components/Header.vue | 87 - ui/src/main.js | 14 - ui/src/plugins/vuetify.js | 25 - ui/src/registerServiceWorker.js | 32 - ui/src/router/index.js | 51 - ui/src/views/Contact.vue | 98 - ui/vue.config.js | 5 - vue.config.js | 3 + yarn.lock | 9014 +++++++++++++++++ 59 files changed, 9653 insertions(+), 676 deletions(-) rename ui/.browserslistrc => .browserslistrc (100%) create mode 100644 .eslintrc.js create mode 100644 .prettierignore create mode 100644 .prettierrc rename ui/README.md => README.md (98%) create mode 100644 babel.config.js rename {ui/patches => patches}/vuetify+2.5.9.patch (100%) rename {ui/public => public}/favicon.ico (100%) rename {ui/public => public}/img/icons/android-chrome-192x192.png (100%) rename {ui/public => public}/img/icons/android-chrome-512x512.png (100%) rename {ui/public => public}/img/icons/android-chrome-maskable-192x192.png (100%) rename {ui/public => public}/img/icons/android-chrome-maskable-512x512.png (100%) rename {ui/public => public}/img/icons/apple-touch-icon-120x120.png (100%) rename {ui/public => public}/img/icons/apple-touch-icon-152x152.png (100%) rename {ui/public => public}/img/icons/apple-touch-icon-180x180.png (100%) rename {ui/public => public}/img/icons/apple-touch-icon-60x60.png (100%) rename {ui/public => public}/img/icons/apple-touch-icon-76x76.png (100%) rename {ui/public => public}/img/icons/apple-touch-icon.png (100%) rename {ui/public => public}/img/icons/favicon-16x16.png (100%) rename {ui/public => public}/img/icons/favicon-32x32.png (100%) rename {ui/public => public}/img/icons/msapplication-icon-144x144.png (100%) rename {ui/public => public}/img/icons/mstile-150x150.png (100%) rename {ui/public => public}/img/icons/safari-pinned-tab.svg (98%) rename {ui/public => public}/index.html (98%) rename {ui/public => public}/robots.txt (92%) rename {ui/src => src}/App.vue (74%) rename {ui/src => src}/assets/images/kaverti.png (100%) rename {ui/src => src}/assets/images/polytoria.png (100%) rename {ui/src => src}/assets/images/proj01.png (100%) rename {ui/src => src}/assets/images/troplo-plex.png (100%) rename {ui/src => src}/assets/images/troplo-website.png (100%) rename {ui/src => src}/assets/logo.png (100%) rename {ui/src => src}/assets/logo.svg (100%) create mode 100644 src/components/Header.vue create mode 100644 src/main.js create mode 100644 src/plugins/vuetify.js create mode 100644 src/registerServiceWorker.js create mode 100644 src/router/index.js rename {ui/src => src}/store/index.js (77%) create mode 100644 src/views/Contact.vue rename {ui/src => src}/views/Home.vue (52%) rename {ui/src => src}/views/Nexus.vue (54%) rename {ui/src => src}/views/NotFound.vue (84%) rename {ui/src => src}/views/Projects.vue (76%) delete mode 100644 ui/.eslintrc.js delete mode 100644 ui/.gitignore delete mode 100644 ui/babel.config.js delete mode 100644 ui/package.json delete mode 100644 ui/src/components/Header.vue delete mode 100644 ui/src/main.js delete mode 100644 ui/src/plugins/vuetify.js delete mode 100644 ui/src/registerServiceWorker.js delete mode 100644 ui/src/router/index.js delete mode 100644 ui/src/views/Contact.vue delete mode 100644 ui/vue.config.js create mode 100644 vue.config.js create mode 100644 yarn.lock diff --git a/ui/.browserslistrc b/.browserslistrc similarity index 100% rename from ui/.browserslistrc rename to .browserslistrc diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..18a8d4a --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,14 @@ +module.exports = { + root: true, + env: { + node: true + }, + extends: ["plugin:vue/essential", "eslint:recommended"], + parserOptions: { + parser: "babel-eslint" + }, + rules: { + "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", + "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off" + } +} diff --git a/.gitignore b/.gitignore index e4b2530..403adbc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,28 +1,23 @@ -# Node Modules -node_modules - -# Local ENV files -.env.local -.env.*.local - -# Log files -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* - -# Editor Directories/Files -.idea -.vscode -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? -.DS_Store - -yarn.lock - -# Custom -.env -config/config.json \ No newline at end of file +.DS_Store +node_modules +/dist + + +# local env files +.env.local +.env.*.local + +# Log files +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..4d64c55 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,4 @@ +# Ignore artifacts: +dist +public +patches \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..43c1c8e --- /dev/null +++ b/.prettierrc @@ -0,0 +1,13 @@ +{ + "tabWidth": 2, + "useTabs": false, + "semi": false, + "singleQuote": false, + "trailingComma": "none", + "bracketSpacing": true, + "jsxBracketSameLine": false, + "arrowParens": "always", + "requirePragma": false, + "insertPragma": false, + "proseWrap": "always" +} diff --git a/ui/README.md b/README.md similarity index 98% rename from ui/README.md rename to README.md index 6ac42d9..013cee4 100644 --- a/ui/README.md +++ b/README.md @@ -1,24 +1,29 @@ # ui ## Project setup + ``` yarn install ``` ### Compiles and hot-reloads for development + ``` yarn serve ``` ### Compiles and minifies for production + ``` yarn build ``` ### Lints and fixes files + ``` yarn lint ``` ### Customize configuration + See [Configuration Reference](https://cli.vuejs.org/config/). diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..db68ff1 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,3 @@ +module.exports = { + presets: ["@vue/cli-plugin-babel/preset"] +} diff --git a/package.json b/package.json index cf87009..9a7e9ed 100644 --- a/package.json +++ b/package.json @@ -1,41 +1,37 @@ -{ - "name": "troplo-base", - "version": "1.0.0", - "description": "troplo-base", - "main": "index.js", - "scripts": { - "serve": "nodemon --ignore ./ui/" - }, - "author": "Troplo", - "license": "Internal use only.", - "private": true, - "dependencies": { - "@discordjs/rest": "^0.1.0-canary.0", - "axios": "^0.21.1", - "bcryptjs": "^2.4.3", - "body-parser": "^1.19.0", - "btcpay": "^0.2.5", - "btoa": "^1.2.1", - "cloudflare": "^2.8.0", - "cors": "^2.8.5", - "crypto-random-string": "3.3.1", - "discord.js": "^13.1.0", - "dotenv": "^10.0.0", - "express": "^4.17.1", - "express-autosanitizer": "^1.0.2", - "form-data": "^4.0.0", - "helmet": "^4.6.0", - "is-valid-domain": "^0.1.2", - "jsonwebtoken": "^8.5.1", - "jw-paginate": "^1.0.4", - "microstats": "^0.1.2", - "moment": "^2.29.1", - "multer": "^1.4.2", - "mysql2": "^2.2.5", - "nodemon": "^2.0.12", - "sequelize": "^6.6.5", - "sequelize-cli": "^6.2.0", - "speakeasy": "^2.0.0", - "whois": "^2.13.5" - } -} +{ + "name": "troplo-site", + "version": "1.0.0", + "private": true, + "scripts": { + "serve": "vue-cli-service serve", + "build": "vue-cli-service build --no-clean", + "lint": "vue-cli-service lint", + "postinstall": "patch-package" + }, + "dependencies": { + "core-js": "^3.6.5", + "patch-package": "^6.4.7", + "register-service-worker": "^1.7.1", + "vue": "^2.6.11", + "vue-router": "^3.2.0", + "vuetify": "^2.5.10", + "vuex": "^3.4.0" + }, + "devDependencies": { + "@vue/cli-plugin-babel": "~4.5.0", + "@vue/cli-plugin-eslint": "~4.5.0", + "@vue/cli-plugin-pwa": "~4.5.0", + "@vue/cli-plugin-router": "~4.5.0", + "@vue/cli-plugin-vuex": "~4.5.0", + "@vue/cli-service": "~4.5.0", + "babel-eslint": "^10.1.0", + "eslint": "^6.7.2", + "eslint-plugin-vue": "^6.2.2", + "sass": "~1.32.0", + "sass-loader": "^10.0.0", + "vue-cli-plugin-vuetify": "~2.4.2", + "vue-template-compiler": "^2.6.11", + "vuetify-loader": "^1.7.0", + "prettier": "^2.5.1" + } +} diff --git a/ui/patches/vuetify+2.5.9.patch b/patches/vuetify+2.5.9.patch similarity index 100% rename from ui/patches/vuetify+2.5.9.patch rename to patches/vuetify+2.5.9.patch diff --git a/ui/public/favicon.ico b/public/favicon.ico similarity index 100% rename from ui/public/favicon.ico rename to public/favicon.ico diff --git a/ui/public/img/icons/android-chrome-192x192.png b/public/img/icons/android-chrome-192x192.png similarity index 100% rename from ui/public/img/icons/android-chrome-192x192.png rename to public/img/icons/android-chrome-192x192.png diff --git a/ui/public/img/icons/android-chrome-512x512.png b/public/img/icons/android-chrome-512x512.png similarity index 100% rename from ui/public/img/icons/android-chrome-512x512.png rename to public/img/icons/android-chrome-512x512.png diff --git a/ui/public/img/icons/android-chrome-maskable-192x192.png b/public/img/icons/android-chrome-maskable-192x192.png similarity index 100% rename from ui/public/img/icons/android-chrome-maskable-192x192.png rename to public/img/icons/android-chrome-maskable-192x192.png diff --git a/ui/public/img/icons/android-chrome-maskable-512x512.png b/public/img/icons/android-chrome-maskable-512x512.png similarity index 100% rename from ui/public/img/icons/android-chrome-maskable-512x512.png rename to public/img/icons/android-chrome-maskable-512x512.png diff --git a/ui/public/img/icons/apple-touch-icon-120x120.png b/public/img/icons/apple-touch-icon-120x120.png similarity index 100% rename from ui/public/img/icons/apple-touch-icon-120x120.png rename to public/img/icons/apple-touch-icon-120x120.png diff --git a/ui/public/img/icons/apple-touch-icon-152x152.png b/public/img/icons/apple-touch-icon-152x152.png similarity index 100% rename from ui/public/img/icons/apple-touch-icon-152x152.png rename to public/img/icons/apple-touch-icon-152x152.png diff --git a/ui/public/img/icons/apple-touch-icon-180x180.png b/public/img/icons/apple-touch-icon-180x180.png similarity index 100% rename from ui/public/img/icons/apple-touch-icon-180x180.png rename to public/img/icons/apple-touch-icon-180x180.png diff --git a/ui/public/img/icons/apple-touch-icon-60x60.png b/public/img/icons/apple-touch-icon-60x60.png similarity index 100% rename from ui/public/img/icons/apple-touch-icon-60x60.png rename to public/img/icons/apple-touch-icon-60x60.png diff --git a/ui/public/img/icons/apple-touch-icon-76x76.png b/public/img/icons/apple-touch-icon-76x76.png similarity index 100% rename from ui/public/img/icons/apple-touch-icon-76x76.png rename to public/img/icons/apple-touch-icon-76x76.png diff --git a/ui/public/img/icons/apple-touch-icon.png b/public/img/icons/apple-touch-icon.png similarity index 100% rename from ui/public/img/icons/apple-touch-icon.png rename to public/img/icons/apple-touch-icon.png diff --git a/ui/public/img/icons/favicon-16x16.png b/public/img/icons/favicon-16x16.png similarity index 100% rename from ui/public/img/icons/favicon-16x16.png rename to public/img/icons/favicon-16x16.png diff --git a/ui/public/img/icons/favicon-32x32.png b/public/img/icons/favicon-32x32.png similarity index 100% rename from ui/public/img/icons/favicon-32x32.png rename to public/img/icons/favicon-32x32.png diff --git a/ui/public/img/icons/msapplication-icon-144x144.png b/public/img/icons/msapplication-icon-144x144.png similarity index 100% rename from ui/public/img/icons/msapplication-icon-144x144.png rename to public/img/icons/msapplication-icon-144x144.png diff --git a/ui/public/img/icons/mstile-150x150.png b/public/img/icons/mstile-150x150.png similarity index 100% rename from ui/public/img/icons/mstile-150x150.png rename to public/img/icons/mstile-150x150.png diff --git a/ui/public/img/icons/safari-pinned-tab.svg b/public/img/icons/safari-pinned-tab.svg similarity index 98% rename from ui/public/img/icons/safari-pinned-tab.svg rename to public/img/icons/safari-pinned-tab.svg index c011013..e44c0d5 100644 --- a/ui/public/img/icons/safari-pinned-tab.svg +++ b/public/img/icons/safari-pinned-tab.svg @@ -1,3 +1,3 @@ - - - + + + diff --git a/ui/public/index.html b/public/index.html similarity index 98% rename from ui/public/index.html rename to public/index.html index f5dcffe..351665d 100644 --- a/ui/public/index.html +++ b/public/index.html @@ -1,22 +1,22 @@ - - - - - - - - <%= htmlWebpackPlugin.options.title %> - - - - - - - - -
- - - + + + + + + + + <%= htmlWebpackPlugin.options.title %> + + + + + + + + +
+ + + diff --git a/ui/public/robots.txt b/public/robots.txt similarity index 92% rename from ui/public/robots.txt rename to public/robots.txt index a82d96e..eb05362 100644 --- a/ui/public/robots.txt +++ b/public/robots.txt @@ -1,2 +1,2 @@ -User-agent: * -Disallow: +User-agent: * +Disallow: diff --git a/ui/src/App.vue b/src/App.vue similarity index 74% rename from ui/src/App.vue rename to src/App.vue index 31bc61d..8c5bc1c 100644 --- a/ui/src/App.vue +++ b/src/App.vue @@ -1,81 +1,80 @@ - - - + + + diff --git a/ui/src/assets/images/kaverti.png b/src/assets/images/kaverti.png similarity index 100% rename from ui/src/assets/images/kaverti.png rename to src/assets/images/kaverti.png diff --git a/ui/src/assets/images/polytoria.png b/src/assets/images/polytoria.png similarity index 100% rename from ui/src/assets/images/polytoria.png rename to src/assets/images/polytoria.png diff --git a/ui/src/assets/images/proj01.png b/src/assets/images/proj01.png similarity index 100% rename from ui/src/assets/images/proj01.png rename to src/assets/images/proj01.png diff --git a/ui/src/assets/images/troplo-plex.png b/src/assets/images/troplo-plex.png similarity index 100% rename from ui/src/assets/images/troplo-plex.png rename to src/assets/images/troplo-plex.png diff --git a/ui/src/assets/images/troplo-website.png b/src/assets/images/troplo-website.png similarity index 100% rename from ui/src/assets/images/troplo-website.png rename to src/assets/images/troplo-website.png diff --git a/ui/src/assets/logo.png b/src/assets/logo.png similarity index 100% rename from ui/src/assets/logo.png rename to src/assets/logo.png diff --git a/ui/src/assets/logo.svg b/src/assets/logo.svg similarity index 100% rename from ui/src/assets/logo.svg rename to src/assets/logo.svg diff --git a/src/components/Header.vue b/src/components/Header.vue new file mode 100644 index 0000000..e92633a --- /dev/null +++ b/src/components/Header.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..ce74ade --- /dev/null +++ b/src/main.js @@ -0,0 +1,14 @@ +import Vue from "vue" +import App from "./App.vue" +import "./registerServiceWorker" +import router from "./router" +import vuetify from "./plugins/vuetify" +import store from "./store" +Vue.config.productionTip = false + +new Vue({ + router, + vuetify, + store, + render: (h) => h(App) +}).$mount("#app") diff --git a/src/plugins/vuetify.js b/src/plugins/vuetify.js new file mode 100644 index 0000000..082eb5c --- /dev/null +++ b/src/plugins/vuetify.js @@ -0,0 +1,25 @@ +import Vue from "vue" +import Vuetify from "vuetify/lib/framework" +import colors from "vuetify/es5/util/colors" + +Vue.use(Vuetify) + +export default new Vuetify({ + theme: { + themes: { + light: { + primary: colors.blue.lighten3, + secondary: colors.grey.darken1, + accent: colors.shades.black, + error: colors.red.accent3, + dark: "#151515", + text: "#000000" + }, + dark: { + primary: colors.blue, + dark: "#151515", + text: "#ffffff" + } + } + } +}) diff --git a/src/registerServiceWorker.js b/src/registerServiceWorker.js new file mode 100644 index 0000000..45fff5c --- /dev/null +++ b/src/registerServiceWorker.js @@ -0,0 +1,34 @@ +/* eslint-disable no-console */ + +import { register } from "register-service-worker" + +if (process.env.NODE_ENV === "production") { + register(`${process.env.BASE_URL}service-worker.js`, { + ready() { + console.log( + "App is being served from cache by a service worker.\n" + + "For more details, visit https://goo.gl/AFskqB" + ) + }, + registered() { + console.log("Service worker has been registered.") + }, + cached() { + console.log("Content has been cached for offline use.") + }, + updatefound() { + console.log("New content is downloading.") + }, + updated() { + console.log("New content is available; please refresh.") + }, + offline() { + console.log( + "No internet connection found. App is running in offline mode." + ) + }, + error(error) { + console.error("Error during service worker registration:", error) + } + }) +} diff --git a/src/router/index.js b/src/router/index.js new file mode 100644 index 0000000..f24e1e3 --- /dev/null +++ b/src/router/index.js @@ -0,0 +1,46 @@ +import Vue from "vue" +import VueRouter from "vue-router" + +Vue.use(VueRouter) + +const routes = [ + { + path: "/", + name: "Home", + component: () => import(/* webpackChunkName: "home" */ "../views/Home.vue") + }, + { + path: "/projects", + name: "Projects", + // route level code-splitting + // this generates a separate chunk (about.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => + import(/* webpackChunkName: "projects" */ "../views/Projects.vue") + }, + { + path: "/contact", + name: "Contact", + // route level code-splitting + // this generates a separate chunk (about.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => + import(/* webpackChunkName: "contact" */ "../views/Contact.vue") + }, + { + path: "*", + name: "Not Found", + // route level code-splitting + // this generates a separate chunk (about.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => + import(/* webpackChunkName: "notFound" */ "../views/NotFound.vue") + } +] + +const router = new VueRouter({ + routes, + mode: "history" +}) + +export default router diff --git a/ui/src/store/index.js b/src/store/index.js similarity index 77% rename from ui/src/store/index.js rename to src/store/index.js index 1ccdb87..48c8320 100644 --- a/ui/src/store/index.js +++ b/src/store/index.js @@ -1,5 +1,5 @@ -import Vue from 'vue' -import Vuex from 'vuex' +import Vue from "vue" +import Vuex from "vuex" Vue.use(Vuex) @@ -18,8 +18,6 @@ export default new Vuex.Store({ state.site.route = data } }, - actions: { - }, - modules: { - } + actions: {}, + modules: {} }) diff --git a/src/views/Contact.vue b/src/views/Contact.vue new file mode 100644 index 0000000..4645116 --- /dev/null +++ b/src/views/Contact.vue @@ -0,0 +1,99 @@ + + + + + diff --git a/ui/src/views/Home.vue b/src/views/Home.vue similarity index 52% rename from ui/src/views/Home.vue rename to src/views/Home.vue index aaacecb..d29e00c 100644 --- a/ui/src/views/Home.vue +++ b/src/views/Home.vue @@ -1,18 +1,26 @@ - - - \ No newline at end of file + + + diff --git a/ui/src/views/Nexus.vue b/src/views/Nexus.vue similarity index 54% rename from ui/src/views/Nexus.vue rename to src/views/Nexus.vue index 32d76be..e7982a9 100644 --- a/ui/src/views/Nexus.vue +++ b/src/views/Nexus.vue @@ -1,15 +1,11 @@ - - - - - \ No newline at end of file + + + + + diff --git a/ui/src/views/NotFound.vue b/src/views/NotFound.vue similarity index 84% rename from ui/src/views/NotFound.vue rename to src/views/NotFound.vue index 53ce4fb..79b6e5c 100644 --- a/ui/src/views/NotFound.vue +++ b/src/views/NotFound.vue @@ -1,7 +1,7 @@