render console dynamically
parent
ee8480c1e9
commit
66db4de7ee
@ -1,17 +1,39 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
node: true
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true
|
||||
},
|
||||
'extends': [
|
||||
'plugin:vue/vue3-essential',
|
||||
'eslint:recommended'
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:vue/essential"
|
||||
],
|
||||
parserOptions: {
|
||||
parser: 'babel-eslint'
|
||||
"globals": {
|
||||
"Atomics": "readonly",
|
||||
"SharedArrayBuffer": "readonly"
|
||||
},
|
||||
rules: {
|
||||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2018,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": [
|
||||
"vue"
|
||||
],
|
||||
"rules": {
|
||||
"indent": [
|
||||
"error",
|
||||
2
|
||||
],
|
||||
"linebreak-style": [
|
||||
"error",
|
||||
"unix"
|
||||
],
|
||||
"quotes": [
|
||||
"error",
|
||||
"double"
|
||||
],
|
||||
"semi": [
|
||||
"error",
|
||||
"never"
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
</head>
|
||||
<body style="background-color: #1d1d1d;">
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow:
|
@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<div class="console">
|
||||
<div class="group" v-for="group in history" :key="group">
|
||||
<pre><span class="host">{{group.host}}</span><span>{{group.command}}</span></pre>
|
||||
<pre><span v-for="output in group.output" :key="output" :class="output.color">{{output.content}}</span></pre>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import commands from "@/render-commands.js"
|
||||
|
||||
export default {
|
||||
name: "console",
|
||||
data(){
|
||||
return{
|
||||
console:{
|
||||
},
|
||||
history:[
|
||||
{
|
||||
host: "[cybre.town]$ > ",
|
||||
command: "welcome --help",
|
||||
output: commands.data().commands.welcome.output
|
||||
},
|
||||
{
|
||||
host: "[cybre.town]$ > ",
|
||||
command: "_",
|
||||
output: []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
pre{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.console{
|
||||
color: #fff;
|
||||
.group{
|
||||
.host{color: #02a594;}
|
||||
.white{color: #fff}
|
||||
.green{color: #44dd88;}
|
||||
.blue{color: #0081b1;}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue