{"id":1332,"date":"2024-08-29T11:24:54","date_gmt":"2024-08-29T14:24:54","guid":{"rendered":"https:\/\/desvendandoocodigo.com.br\/?p=1332"},"modified":"2024-08-29T11:25:23","modified_gmt":"2024-08-29T14:25:23","slug":"resumo-da-live-tiktok-29082024","status":"publish","type":"post","link":"https:\/\/desvendandoocodigo.com.br\/?p=1332","title":{"rendered":"Resumo da Live TikTok 29082024"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Ol\u00e1 Pessoal! <\/h2>\n\n\n\n<h2 class=\"wp-block-heading\">Na Live do dia 29\/08\/2024 foram abordados os seguintes temas envolvendo o nosso mini projeto:<\/h2>\n\n\n\n<ul>\n<li>Condicional Aninhada;<\/li>\n\n\n\n<li>Eventos;<\/li>\n\n\n\n<li>DOM;<\/li>\n\n\n\n<li>HTML;<\/li>\n\n\n\n<li>CSS;<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>HTML\n&lt;!DOCTYPE html&gt;\n&lt;html lang=\"pt-br\"&gt;\n&lt;head&gt;\n    &lt;meta charset=\"UTF-8\"&gt;\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\n    &lt;title&gt;IMC&lt;\/title&gt;\n    &lt;link rel=\"stylesheet\" href=\"style.css\"&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n    &lt;main&gt;\n        &lt;div class=\"container\"&gt;\n\n            &lt;div class=\"title\"&gt;\n                IMC - Calculadora&lt;\/div&gt;\n            \n            &lt;div class=\" input\"&gt;\n                &lt;label&gt;Altura:&lt;\/label&gt;\n                &lt;input type=\"number\" \n                id=\"altura\"&gt;\n            &lt;\/div&gt;\n\n            &lt;div class=\" input\"&gt;\n                &lt;label&gt;Peso:&lt;\/label&gt;\n                &lt;input type=\"number\" \n                id=\"peso\"&gt;\n            &lt;\/div&gt;\n\n            &lt;div class=\" input\"&gt;\n                &lt;label&gt;Nome:&lt;\/label&gt;\n                &lt;input type=\"text\" \n                id=\"nome\"&gt;\n            &lt;\/div&gt;\n            &lt;button id=\"calcular\"&gt;\n                Calcular IMC&lt;\/button&gt;\n            \n                &lt;div class=\"result\"\n                 id=\"resultado\"&gt; &lt;\/div&gt;\n        &lt;\/div&gt;\n    &lt;\/main&gt;\n    &lt;script src=\"script.js\"&gt;&lt;\/script&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n\nJAVASCRIPT\n\nconst calcular =\n document.getElementById('calcular');\n\nfunction imc(){\n    const nome =\n     document.getElementById('nome').value;\n\n     const altura = \n     document.getElementById('altura').value;\n\n     const peso = \n     document.getElementById('peso').value;\n\n     const resultado = \n     document.getElementById('resultado');\n\n     if(nome !== ' ' &amp;&amp; altura\n         !== ' ' &amp;&amp; peso !== ''){\n\n            const valorIMC =\n             (peso \/ (altura * altura)).toFixed(1);\n        \n        let  classificacao = '';\n\n        if(valorIMC &lt; 18.5){\n            classificacao = 'abaixo do peso.';\n        }else if(valorIMC &lt; 25){\n            classificacao = 'Com peso ideal.';\n        }else if(valorIMC &lt; 30){\n            classificacao =\n             'Levemente acima do peso.';\n        }else if(valorIMC &lt; 35){\n            classificacao =\n            'com obesidade grau 1.';\n        }else if(valorIMC &lt; 40){\n            classificacao =\n            'com obesidade grau 2.';\n        }else{\n            classificacao =\n            'com obesidade grau 3.';\n        }\n        resultado.textContent = `${nome} \n        seu IMC \u00e9 ${valorIMC}\n         e voc\u00ea est\u00e1 ${classificacao}` \n\n     }else{\n        resultado.textContent =\n         \"Preencha todos os campos\"\n     }\n\n    }\n\n    calcular.addEventListener('click', imc);\n\n\nCSS\n\n\nmain{\n    display: flex;\n    width:100vw;\n    height: 100vh;\n    justify-content: center;\n    align-items: center; \n}\n\n.container{\n\n    display: flex;\n    flex-direction: column;\n    background: rgb(126,189,244);\n    width: 400px;\n    height: 600px;\n    align-items: center;\n    justify-content: space-evenly;\n    border-radius: 20px;\n    box-shadow: 0 0 10px rgb(88, 3,15);\n}\n\n.title{\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    width: 100%;\n    height: 50px;\n    font: bold 2.5rem serif;\n    margin-bottom: 20px;\n    color: rgb(80, 79 ,79);\n}\n.input{\n\n    display: flex;\n    width: 300px;\n    height: 50px;\n    justify-content: space-between;\n    align-items: center;\n}\n\n.input input{\n    width: 200px;\n    height: 50px;\n    border-radius: 5px;\n    border: none;\n    outline: 0;\n    font: bold 1.5rem serif;\n    text-align: center;\n    color: rgb(80, 79,79);\n    background: #e9e7e7;\n}\n.input label{\n    font: bold 1.5rem serif;\n    color: rgb(80, 79,79);\n}\nbutton{\n    width: 300px;\n    height: 40px;\n    font: bold 1.2rem serif;\n    background: #e9e7e7;\n    color: #ec5959;\n    outline: none;\n    border-radius: 5px;\n    cursor: pointer;\n\n}\n\n.result{\n    display: flex;\n    margin-top: 20px;\n    align-items: center;\n    width: 300px;\n    height: 150px;\n    border-radius: 5px;\n    font: bold 1.2rem serif;\n    box-shadow: 0 0 10px rgb(88, 3,15);\n    background: #e9e7e7;\n    color: #ec5959;\n    padding: 20px;\n    box-sizing: border-box;\n    user-select: none;\n}\n\n\n\n\n\n\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"321\" src=\"https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/01\/hotmart.png\" alt=\"\" class=\"wp-image-162\" style=\"width:134px;height:auto\" srcset=\"https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/01\/hotmart.png 1000w, https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/01\/hotmart-300x96.png 300w, https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/01\/hotmart-768x247.png 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><a href=\"https:\/\/go.hotmart.com\/V89811082M?dp=1\">https:\/\/go.hotmart.com\/V89811082M?dp=1<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/go.hotmart.com\/X90111663X?dp=1\">https:\/\/go.hotmart.com\/X90111663X?dp=1<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">PR\u00d3XIMAS LIVES<\/h2>\n\n\n\n<p>30\/08\/2024 \u00e0s 10:00hs<\/p>\n\n\n\n<p>31\/08\/2024 \u00e0s 10:00hs<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"558\" height=\"1024\" src=\"https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/07\/image-4.png\" alt=\"\" class=\"wp-image-1144\" style=\"width:242px;height:auto\" srcset=\"https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/07\/image-4.png 558w, https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/07\/image-4-163x300.png 163w\" sizes=\"(max-width: 558px) 100vw, 558px\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ol\u00e1 Pessoal! Na Live do dia 29\/08\/2024 foram abordados os seguintes temas envolvendo o nosso mini projeto: https:\/\/go.hotmart.com\/V89811082M?dp=1 https:\/\/go.hotmart.com\/X90111663X?dp=1 PR\u00d3XIMAS LIVES 30\/08\/2024 \u00e0s 10:00hs 31\/08\/2024 \u00e0s 10:00hs<\/p>\n","protected":false},"author":1,"featured_media":1097,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[18],"tags":[],"_links":{"self":[{"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1332"}],"collection":[{"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1332"}],"version-history":[{"count":2,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1332\/revisions"}],"predecessor-version":[{"id":1335,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1332\/revisions\/1335"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/media\/1097"}],"wp:attachment":[{"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1332"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1332"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}