From 66db4de7ee6362e54a5aa6264bb9112edfd42549 Mon Sep 17 00:00:00 2001 From: adb Date: Thu, 28 Jan 2021 00:04:14 +0100 Subject: [PATCH] render console dynamically --- .eslintrc.js | 54 +++++++++++++++++++++++++++----------- package.json | 2 +- public/index.html | 17 ++++++++++++ public/robots.txt | 2 ++ src/App.vue | 51 +++++------------------------------ src/components/console.vue | 50 +++++++++++++++++++++++++++++++++++ src/render-commands.js | 46 ++++++++++++++++++++++++++++++++ 7 files changed, 161 insertions(+), 61 deletions(-) create mode 100644 public/index.html create mode 100644 public/robots.txt create mode 100644 src/components/console.vue create mode 100644 src/render-commands.js diff --git a/.eslintrc.js b/.eslintrc.js index 3391da1..64506b9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,17 +1,39 @@ module.exports = { - root: true, - env: { - node: true - }, - 'extends': [ - 'plugin:vue/vue3-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' - } -} + "env": { + "browser": true, + "es6": true + }, + "extends": [ + "eslint:recommended", + "plugin:vue/essential" + ], + "globals": { + "Atomics": "readonly", + "SharedArrayBuffer": "readonly" + }, + "parserOptions": { + "ecmaVersion": 2018, + "sourceType": "module" + }, + "plugins": [ + "vue" + ], + "rules": { + "indent": [ + "error", + 2 + ], + "linebreak-style": [ + "error", + "unix" + ], + "quotes": [ + "error", + "double" + ], + "semi": [ + "error", + "never" + ] + } +} \ No newline at end of file diff --git a/package.json b/package.json index eae23f0..8beefa2 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "@vue/compiler-sfc": "^3.0.0", "babel-eslint": "^10.1.0", "eslint": "^6.7.2", - "eslint-plugin-vue": "^7.0.0-0", + "eslint-plugin-vue": "^7.5.0", "node-sass": "^5.0.0", "sass-loader": "^10.1.1" } diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..84cd880 --- /dev/null +++ b/public/index.html @@ -0,0 +1,17 @@ + + + + + + + + <%= htmlWebpackPlugin.options.title %> + + + +
+ + + diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..eb05362 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: diff --git a/src/App.vue b/src/App.vue index dcb205f..24582d7 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,38 +1,16 @@ @@ -40,25 +18,10 @@ export default { + \ No newline at end of file diff --git a/src/components/console.vue b/src/components/console.vue new file mode 100644 index 0000000..ab27ffb --- /dev/null +++ b/src/components/console.vue @@ -0,0 +1,50 @@ + + + + + \ No newline at end of file diff --git a/src/render-commands.js b/src/render-commands.js new file mode 100644 index 0000000..c1f49a1 --- /dev/null +++ b/src/render-commands.js @@ -0,0 +1,46 @@ +let commands = { + welcome:{ + output:[ + { + color: "white", + content: "\nWelcome to:\n", + delay: 100 + }, + { + color: "green", + content: + " __ __\n" + + " /\\ \\ /\\ \\__\n" + + " ___ __ __\\ \\ \\____ _____ ____ \\ \\ _\\ ____ __ __ __ ______\n" + + " / ___\\/\\ \\/\\ \\\\ \\ __ \\/\\ __\\/ __ \\ \\ \\ \\/ / __ \\/\\ \\/\\ \\/\\ \\/\\ __ \\\n" + + "/\\ \\__/\\ \\ \\_\\ \\\\ \\ \\_\\ \\ \\ \\_/\\ __/ __\\ \\ \\_/\\ \\_\\ \\ \\ \\_\\ \\_\\ \\ \\ \\/\\ \\\n" + + "\\ \\____\\\\ \\____ \\\\ \\____/\\ \\_\\\\ \\____\\/\\_\\\\ \\__\\ \\____/\\ \\________/\\ \\_\\ \\_\\\n" + + " \\/____/ \\/___/ \\\\/___/ \\/_/ \\/____/\\/_/ \\/__/\\/___/ \\/_______/ \\/_/\\/_/\n" + + " /\\___/\n" + + " \\/__/ @adb.sh\n\n", + delay: 100 + }, + { + color: "white", + content: + "free services on this server:\n" + + "\n" + + " - Mastodon > social\n" + + " - Gitea > git\n" + + " - Matrix > element\n" + + " - Etherpad > ether\n" + + " - short url > surl\n" + + " - Jitsi > meet\n", + delay: 100 + }, + ] + } +} + +export default { + data(){ + return { + commands:commands + } + } +} \ No newline at end of file