-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
172 lines (149 loc) · 5.63 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!DOCTYPE html>
<html lang="en">
<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" />
<title>Ronak_Terminal</title>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal/js/jquery.terminal.min.js"></script>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/jquery.terminal/css/jquery.terminal.min.css"
/>
<style>
.content {
height: 90vh;
width: 70%;
margin: auto;
margin-top: 20px;
border-radius: 10px;
box-shadow: 5px 10px 20px rgb(96, 94, 94);
}
:root {
--size:2.1;
--color:rgb(0, 255, 0);
}
@media only screen and (max-width: 600px) {
body {
background-color: lightblue;
}
.content {
height: 90vh;
width: 95vw;
margin: auto;
margin-top: 20px;
border-radius: 10px;
box-shadow: 5px 10px 20px rgb(96, 94, 94);
}
:root {
--size:1.22;
--color:rgb(0, 255, 0);
}
}
</style>
</head>
<body>
<div class="content" ></div>
<template id="easter">
__
\#\
|_|
____ |_|
____/ \___ |_|
(____RONAK ___| _ |_|
______\`/____\`/______________________/ \__|_|_
</template>
<template id="who">
_______
_____ _ | |
| / \ |\_/| | img: |
| /___\ | | | NULL |
__|__ / \ | | "RONAK" |______|
' student ' at ____ institute.
being ready...
</template>
<script>
// $('.content').terminal('service.php', {login: true});
$('.content').terminal({
hello: function()
{
this.echo('hi,iam ronak (admin).',{ typing: true,delay: 100}).then(read=>
this.read("you ? ").then(name=>
this.echo("hello,"+name,{typing:true,delay:60}))).then(reply=>
this.echo("im 20 and teen",{ typing: true,delay: 100}).then(read1=>
this.read("what about you ?").then(reply1=>
this.echo("wow its amazing nice meeting you :)",{typing:true,delay:100}))))
},
whoami:function()
{
this.echo('/root/home')
},
"img(cat)":function(width,height)
{
var image=$('<img src="https://placekitten.com/'+width+'/'+height+'">')
this.echo(image)
},
easter:function()
{
var hello=easter.innerHTML
this.echo(hello)
},
add:function(a,b){
this.echo(a+b)
},
subt:function(a,b){
this.echo(a-b)
},
product:function(a,b){
this.echo(a*b)
},
time:function()
{
this.echo(Date())
},
"img(dog)":function(){
var url=fetch('https://random.dog/woof')
var img=url.then(res=>res.text()).then(data=>this.echo($('<img style="width:500px; height:600px;" src="https://random.dog/'+data+'">')))
},
whoareyou:function(){
var wau=who.innerHTML
this.echo(wau)
this.echo(". . . .",{typing:true,delay:210})
},
follow:function(){
var h=document.createElement('h4');
var foll=document.createElement("a");
foll.href="https://www.instagram.com/ronak._.2002/";
var email=document.createElement("a");
email.href="mailto:ronakronu02@gmail.com"
this.echo(foll.href+"\t<-- FOLLOW"+"\n"+email.href+"\t <-- EMAIL ME")
},
ls:function(){
this.echo("under construction. cant use:[ls,cd,cat.mkdir,rm,chmod,\netc]")
},
addmyprompt:function(symbol){
this.set_prompt(symbol,{typing:true,delay:100})
},
random:function(width,height){
var rnmd_image=$('<img style="width:500px; height:600px;" src="https://picsum.photos/'+width+'/'+height+'">')
this.echo(rnmd_image);
},
generate:function(query){
var rnmd_image=$('<img style="width:500px; height:600px;" src="https://image.pollinations.ai/prompt/'+query+'">')
this.echo(rnmd_image);
},
echo:function(text){
const cmd = $.terminal.parse_command(text);
this.echo('[[bi;#fff;]' + JSON.stringify(text) + ']')
}
},
{
greetings: '\t\t\t\t\t| HELLO WORLD |\n-----------------------------------------------------try:\n-hello\t\t-whoami\t\t-img(cat) width height\n-clear\t\t-easter\t\t-time\n-add 10 20 | subt 10 20 | product 10 20\n-whoareyou\t-follow\t\t-addmyprompt symbol\n-img(dog)\t-random <w> <h>\t-generate <query>\n-----------------------------------------------------',prompt:'$ '
},
);
</script>
<script src="https://platform.linkedin.com/in.js" type="text/javascript">lang: en_US</script>
<script type="IN/Share" data-url="https://ronak-ronu.github.io/Terminal_Demo/"></script>
</body>
</html>