diff --git a/src/components/console.vue b/src/components/console.vue index aa2316b..40f0637 100644 --- a/src/components/console.vue +++ b/src/components/console.vue @@ -4,7 +4,9 @@
{{group.host}}{{group.command}}-
{{output.content}}
+ {{
+ typeof output.content === "function"?output.content(group.command):
+ output.content}}
diff --git a/src/render-commands.js b/src/render-commands.js
index 3839a05..a5e36a4 100644
--- a/src/render-commands.js
+++ b/src/render-commands.js
@@ -24,16 +24,34 @@ let commands = [
{color: "white", content: "\nWelcome to:\n", delay: 100},
{
color: "green",
- content:
- " __ __\n" +
- " /\\ \\ /\\ \\__\n" +
- " ____ __ \\_\\ \\____ _____ ____ \\ \\ _\\ ____ __ __ __ ______\n" +
- " / ___\\\\ \\/\\ \\\\ __ \\\\ __\\/ __ \\ \\ \\ \\/ / __ \\\\ \\/\\ \\/\\ \\\\ __ \\\n" +
- "/\\ \\__/ \\ \\_\\ \\\\ \\_\\ \\\\ \\_/\\ __/ __\\ \\ \\_\\ \\_\\ \\\\ \\/ \\/ / \\ \\/\\ \\\n" +
- "\\ \\____\\ \\____ \\\\____/ \\_\\\\ \\____\\/\\_\\\\ \\__\\\\____/ \\__/\\__/ \\ \\_\\ \\_\\\n" +
- " \\/____/\\/___/\\ \\___/ \\/_/ \\/____/\\/_/ \\/__//___/ \\/_/\\/_/ \\/_/\\/_/\n" +
- " /\\___/\n" +
- " \\/__/ @adb.sh\n\n",
+ content(){
+ let fontSize = window.getComputedStyle(document.body,null).fontSize.split("px")[0];
+ return window.innerWidth/fontSize<35?
+ " __ \n" +
+ " /\\ \\ \n" +
+ " ____ __ \\_\\ \\____ _____ ____ \n" +
+ " / ___\\\\ \\/\\ \\\\ __ \\\\ __\\/ __ \\ \n" +
+ "/\\ \\__/ \\ \\_\\ \\\\ \\_\\ \\\\ \\_/\\ __/ \n" +
+ "\\ \\____\\ \\____ \\\\____/ \\_\\\\ \\____\\\n" +
+ " \\/____/\\/___/\\ \\___/ \\/_/ \\/____/\n" +
+ " __ /\\___/ \n" +
+ " /\\ \\__ \\/__/ @adb.sh\n" +
+ " \\ \\ _\\ ____ __ __ __ ______\n" +
+ " \\ \\ \\/ / __ \\\\ \\/\\ \\/\\ \\\\ __ \\\n" +
+ " __\\ \\ \\_\\ \\_\\ \\\\ \\/ \\/ / \\ \\/\\ \\\n" +
+ " /\\_\\\\ \\__\\\\____/ \\__/\\__/ \\ \\_\\ \\_\\\n" +
+ " \\/_/ \\/__//___/ \\/_/\\/_/ \\/_/\\/_/\n\n"
+ :
+ " __ __\n" +
+ " /\\ \\ /\\ \\__\n" +
+ " ____ __ \\_\\ \\____ _____ ____ \\ \\ _\\ ____ __ __ __ ______\n" +
+ " / ___\\\\ \\/\\ \\\\ __ \\\\ __\\/ __ \\ \\ \\ \\/ / __ \\\\ \\/\\ \\/\\ \\\\ __ \\\n" +
+ "/\\ \\__/ \\ \\_\\ \\\\ \\_\\ \\\\ \\_/\\ __/ __\\ \\ \\_\\ \\_\\ \\\\ \\/ \\/ / \\ \\/\\ \\\n" +
+ "\\ \\____\\ \\____ \\\\____/ \\_\\\\ \\____\\/\\_\\\\ \\__\\\\____/ \\__/\\__/ \\ \\_\\ \\_\\\n" +
+ " \\/____/\\/___/\\ \\___/ \\/_/ \\/____/\\/_/ \\/__//___/ \\/_/\\/_/ \\/_/\\/_/\n" +
+ " /\\___/\n" +
+ " \\/__/ @adb.sh\n\n";
+ },
delay: 300
},
{