From dbb12fb635cf5928d37be1b0436093edb7dd81f5 Mon Sep 17 00:00:00 2001 From: FernandaBroch Date: Wed, 2 Sep 2020 14:49:32 -0300 Subject: [PATCH 1/3] Add Fernanda Broch list to exercicios/aula1 --- Aulas-HTML/exercicios/aula1/index.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Aulas-HTML/exercicios/aula1/index.html b/Aulas-HTML/exercicios/aula1/index.html index 45c22c1..2d73e10 100644 --- a/Aulas-HTML/exercicios/aula1/index.html +++ b/Aulas-HTML/exercicios/aula1/index.html @@ -14,3 +14,19 @@ - Abrir um pull request para o repositório original (da Womakers) - Acompanhar o prazo e marcar a entrega no Classroom --> + + + + + + + Fernanda Broch + + + + + From c622fdc4d77a61b6c83fe4afed6a8180813920d6 Mon Sep 17 00:00:00 2001 From: FernandaBroch Date: Tue, 29 Sep 2020 23:23:55 -0300 Subject: [PATCH 2/3] exercicio 2 javascript --- aulas-javascript/exercicios/aula2/index.html | 21 +++++++++++++++ aulas-javascript/exercicios/aula2/script.js | 27 ++++++++++++++++++++ aulas-javascript/exercicios/aula2/style.css | 6 +++++ 3 files changed, 54 insertions(+) create mode 100644 aulas-javascript/exercicios/aula2/script.js create mode 100644 aulas-javascript/exercicios/aula2/style.css diff --git a/aulas-javascript/exercicios/aula2/index.html b/aulas-javascript/exercicios/aula2/index.html index e69de29..6f02001 100644 --- a/aulas-javascript/exercicios/aula2/index.html +++ b/aulas-javascript/exercicios/aula2/index.html @@ -0,0 +1,21 @@ + + + + + + + + Checar Números + + +
+ + + + + + +
+ + + \ No newline at end of file diff --git a/aulas-javascript/exercicios/aula2/script.js b/aulas-javascript/exercicios/aula2/script.js new file mode 100644 index 0000000..ff6810e --- /dev/null +++ b/aulas-javascript/exercicios/aula2/script.js @@ -0,0 +1,27 @@ +function saoDiferentes(){ + checkDiv() + let input1 = document.getElementById('number1').value + let input2 = document.getElementById('number2').value + let div = document.createElement('div') + div.id='result' + if(input1 != input2){ + div.innerText='Os valores são diferentes' + div.classList.add('green') + }else{ + div.innerText='Não são diferentes' + div.classList.add('red') + } + document.body.append(div) +} + +function resetar(){ + document.getElementById('number1').value = '' + document.getElementById('number2').value = '' + checkDiv() +} + +function checkDiv(){ + if(null != document.getElementById('result')){ + document.getElementById('result').remove() + } +} \ No newline at end of file diff --git a/aulas-javascript/exercicios/aula2/style.css b/aulas-javascript/exercicios/aula2/style.css new file mode 100644 index 0000000..74e6a84 --- /dev/null +++ b/aulas-javascript/exercicios/aula2/style.css @@ -0,0 +1,6 @@ +.green{ + color: rgb(40, 172, 0); +} +.red{ + color: rgb(252, 0, 42); +} \ No newline at end of file From d6179c54a28e9b0ec38b940674cdeee8d7a06761 Mon Sep 17 00:00:00 2001 From: FernandaBroch Date: Tue, 29 Sep 2020 23:29:00 -0300 Subject: [PATCH 3/3] exercicio 2 javascript --- aulas-javascript/exercicios/aula2/script.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/aulas-javascript/exercicios/aula2/script.js b/aulas-javascript/exercicios/aula2/script.js index ff6810e..559357a 100644 --- a/aulas-javascript/exercicios/aula2/script.js +++ b/aulas-javascript/exercicios/aula2/script.js @@ -2,15 +2,17 @@ function saoDiferentes(){ checkDiv() let input1 = document.getElementById('number1').value let input2 = document.getElementById('number2').value - let div = document.createElement('div') - div.id='result' if(input1 != input2){ - div.innerText='Os valores são diferentes' - div.classList.add('green') + changeDiv('Os valores são diferentes', 'green') }else{ - div.innerText='Não são diferentes' - div.classList.add('red') + changeDiv('Não são diferentes','red') } +} +function changeDiv(text, className){ + let div = document.createElement('div') + div.id='result' + div.innerText=text + div.classList.add(className) document.body.append(div) }