-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
79 lines (63 loc) · 2.45 KB
/
Copy pathindex.html
File metadata and controls
79 lines (63 loc) · 2.45 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.css">
<style type="text/css">
#input {
background-color: #000;
color: green;
border: none;
}
#console {
background-color: rgb(240, 240, 240);
border: none;
}
</style>
<title>Grails em cinco minutos! </title>
</head>
<body>
<iframe src="https://docs.google.com/presentation/d/1QipY1Q8XnUEIVicej9vHH29MnTw12WtHD4_SJFU-fzI/embed?start=false&loop=false&delayms=3000" frameborder="0" width="721" height="434" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe><br/>
<textarea id="input" cols="100" rows="15" placeholder="Enter the command..." ></textarea> <a id="run" href="javascript:void(0)"><i class="fa fa-play-circle fa-3x"></i><br/>
<textarea id="console" cols="100" rows="6" placeholder="console..." disabled></textarea>
<script type="text/javascript">
var runLink = document.getElementById('run');
runLink.addEventListener('click', processInput, false);
function processInput() {
var input = document.getElementById('input');
var console = document.getElementById('console');
if (!input.value) {
console.value = "Putz cara! Não sei ler mente... Insira algum comando!";
} else {
inputList = input.value.split(' ');
if (inputList[0] != 'grails') {
console.value = "Acho que está faltando o comando principal meu chapa!";
return;
}
if (inputList.length == 1) {
console.value = "Muito bem... O comando principal você já conhece, mas o que você pretende fazer mesmo?";
return;
}else {
if (inputList[1] != 'create-app' ) {
console.value = "Hum... Tem certeza que é assim que criamos uma aplicação em Grails?";
return;
}
if (inputList.length == 2 ) {
console.value = "Eita Cara! Estamos quase lá... Falta só o nome do projeto!";
return;
}
if (inputList.length == 3 ) {
console.value = "Creating application...!\nApplication " + inputList[2] + " created with success!\n\nMuito bem Cara!";
return;
}
if (inputList.length > 3 ) {
console.value = "Então... Eu sei que seria legal, mas o nome do projeto não pode conter espaços";
return;
}
}
console.value = "Putz!!! Tem alguma coisa errada... Melhor dar uma olhada com calma do seu código.";
}
}
</script>
</body>
</html>